Re: [PATCH 10/11] Allow CAP_SYS_REBOOT on new enough kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 27, 2012 at 09:59:47AM +0200, Jiri Denemark wrote:
> On Tue, Jul 24, 2012 at 14:22:52 +0100, Daniel P. Berrange wrote:
> > @@ -1651,6 +1730,9 @@ static int lxcContainerChild( void *data )
> >          goto cleanup;
> >      }
> >  
> > +    if ((hasReboot = lxcContainerHasReboot()) < 0)
> > +        goto cleanup;
> > +
> >      cmd = lxcContainerBuildInitCmd(vmDef);
> >      virCommandWriteArgLog(cmd, 1);
> >  
> > @@ -1714,7 +1796,7 @@ static int lxcContainerChild( void *data )
> >      }
> >  
> >      /* drop a set of root capabilities */
> > -    if (lxcContainerDropCapabilities() < 0)
> > +    if (lxcContainerDropCapabilities(!!hasReboot) < 0)
> >          goto cleanup;
> >  
> >      if (lxcContainerSendContinue(argv->handshakefd) < 0) {
> 
> I trust you the clone() and reboot() magic does the right thing :-) ACK.

Well it doesn't cause the host OS to reboot which is the important
thing :-)

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]