mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-13 11:15:08 +00:00
* configure.in: when configuring with --prefix=/usr i.e. the same
prefix as the installed libvirt, use the same localstatedir /var (instead of /usr/var) and sysconfdir /etc (instead of /usr/etc) to be able to connect to the system daemon, and use the system local options * src/xs_internal.c: avoid error message when non-root cannot open xenstore * src/xend_internal.c: avoid error message when non-root cannot directly access xend, in those 2 cases the proxy (or remote code) should implement the access so there is no need to raise the error there. Daniel
This commit is contained in:
parent
db444b2264
commit
1338ed4f25
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
Tue Nov 27 15:29:01 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: when configuring with --prefix=/usr i.e. the same
|
||||||
|
prefix as the installed libvirt, use the same localstatedir /var
|
||||||
|
(instead of /usr/var) and sysconfdir /etc (instead of /usr/etc) to
|
||||||
|
be able to connect to the system daemon, and use the system local
|
||||||
|
options
|
||||||
|
* src/xs_internal.c: avoid error message when non-root cannot open
|
||||||
|
xenstore
|
||||||
|
* src/xend_internal.c: avoid error message when non-root cannot
|
||||||
|
directly access xend, in those 2 cases the proxy (or remote code)
|
||||||
|
should implement the access so there is no need to raise the error
|
||||||
|
there.
|
||||||
|
|
||||||
Mon Nov 26 15:06:19 CET 2007 Daniel Veillard <veillard@redhat.com>
|
Mon Nov 26 15:06:19 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* doc/*: modified the python page into a bindings page,
|
* doc/*: modified the python page into a bindings page,
|
||||||
|
12
configure.in
12
configure.in
@ -89,6 +89,18 @@ AC_ARG_WITH(html-subdir, AC_HELP_STRING([--with-html-subdir=path],
|
|||||||
[HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
|
[HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
|
||||||
AC_SUBST(HTML_DIR)
|
AC_SUBST(HTML_DIR)
|
||||||
|
|
||||||
|
dnl if --prefix is /usr, don't use /usr/var for localstatedir
|
||||||
|
dnl or /usr/etc for sysconfdir
|
||||||
|
dnl as this makes a lot of things break in testing situations
|
||||||
|
|
||||||
|
if test $prefix = "/usr" -a $localstatedir = '${prefix}/var' ; then
|
||||||
|
localstatedir='/var'
|
||||||
|
fi
|
||||||
|
if test $prefix = "/usr" -a $sysconfdir = '${prefix}/etc' ; then
|
||||||
|
sysconfdir='/etc'
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl Allow to build without Xen, QEMU/KVM, test or remote driver
|
dnl Allow to build without Xen, QEMU/KVM, test or remote driver
|
||||||
AC_ARG_WITH(xen,
|
AC_ARG_WITH(xen,
|
||||||
[ --with-xen add XEN support (on)],[],[with_xen=yes])
|
[ --with-xen add XEN support (on)],[],[with_xen=yes])
|
||||||
|
@ -232,9 +232,16 @@ do_connect(virConnectPtr xend)
|
|||||||
close(s);
|
close(s);
|
||||||
errno = serrno;
|
errno = serrno;
|
||||||
s = -1;
|
s = -1;
|
||||||
|
/*
|
||||||
|
* not being able to connect via the socket as a normal user
|
||||||
|
* is rather normal, this should fallback to the proxy (or
|
||||||
|
* remote) mechanism.
|
||||||
|
*/
|
||||||
|
if ((getuid() == 0) || (xend->flags & VIR_DRV_OPEN_RO)) {
|
||||||
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
||||||
"failed to connect to xend");
|
"failed to connect to xend");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -341,8 +341,15 @@ xenStoreOpen(virConnectPtr conn,
|
|||||||
#endif /* ! PROXY */
|
#endif /* ! PROXY */
|
||||||
|
|
||||||
if (priv->xshandle == NULL) {
|
if (priv->xshandle == NULL) {
|
||||||
|
/*
|
||||||
|
* not being able to connect via the socket as a normal user
|
||||||
|
* is rather normal, this should fallback to the proxy (or
|
||||||
|
* remote) mechanism.
|
||||||
|
*/
|
||||||
|
if (getuid() == 0) {
|
||||||
virXenStoreError(NULL, VIR_ERR_NO_XEN,
|
virXenStoreError(NULL, VIR_ERR_NO_XEN,
|
||||||
_("failed to connect to Xen Store"));
|
_("failed to connect to Xen Store"));
|
||||||
|
}
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user