> >> If you use fchown(sock->fd) then you avoid any possible race issues.
> >
> > Except that it doesn't work. That was the first thing I tried but fchown()
> > doesn't seem to work on unix sockets. The socket will still ended up with
> > root:root ownership regardless on where I put fchown() --
On 01/07/2011 05:30 AM, Jiri Denemark wrote:
>>> Setting unix_sock_group to something else than default "root" in
>>> /etc/libvirt/libvirtd.conf prevents system libvirtd from dumping core on
>>> crash. This is because we used setgid(unix_sock_group) before binding to
>>> /var/run/libvirt/libvirt-so
> > Setting unix_sock_group to something else than default "root" in
> > /etc/libvirt/libvirtd.conf prevents system libvirtd from dumping core on
> > crash. This is because we used setgid(unix_sock_group) before binding to
> > /var/run/libvirt/libvirt-sock* and setgid() back to original group.
> >
On Fri, Jan 07, 2011 at 12:50:25PM +0100, Jiri Denemark wrote:
> Setting unix_sock_group to something else than default "root" in
> /etc/libvirt/libvirtd.conf prevents system libvirtd from dumping core on
> crash. This is because we used setgid(unix_sock_group) before binding to
> /var/run/libvirt/
Setting unix_sock_group to something else than default "root" in
/etc/libvirt/libvirtd.conf prevents system libvirtd from dumping core on
crash. This is because we used setgid(unix_sock_group) before binding to
/var/run/libvirt/libvirt-sock* and setgid() back to original group.
However, if a proces