All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: CAP_NET_ADMIN (was Re: [Qemu-devel] Two quick requests.)
@ 2007-02-10 12:02 Ben Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Taylor @ 2007-02-10 12:02 UTC (permalink / raw)
  To: qemu-devel


---- "Kevin F. Quinn" <ml@kevquinn.com> wrote: 
> On Fri, 9 Feb 2007 22:48:51 +0000
> Paul Brook <paul@codesourcery.com> wrote:
> 
> > I've very little sympathy (read: none) for people who "accidentally"
> > break things by running them as root.
> 
> On a related note, I've been running qemu(-system 0.8.2) as root
> recently as a hopefully temporary measure so that it can setup the
> network interfaces.  Recent linux kernels require CAP_NET_ADMIN for the
> tun network configuration that qemu does (specifically the TUNSETIFF
> ioctl), and the only way to get the capability is to start the process
> as root.
> 
> Other capabilities could be dropped; as indeed could CAP_NET_ADMIN once
> the network configuration is done, but that means modifications to qemu
> itself to release the capabilities, and would still leave qemu as a
> suid-root binary, which it would be nicer to avoid.
> 
> Is there any way around this?  I expected to be able to configure
> capabilities for executables in the filesystem, but it appears there
> are serious problems with that concept so the kernel doesn't support
> it.

I just dealt with that.  I got a patch for tap for Solaris and I have a setuid script
that creates the tap and uses the /etc/qemu-ifup script to configure the interface,
then calls a script with the file descriptor of the tap interface to a script which
then invokes qemu with the right parameteres.

Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CAP_NET_ADMIN (was Re: [Qemu-devel] Two quick requests.)
  2007-02-10 15:11         ` Paul Brook
@ 2007-02-12  9:49           ` Chris Friedhoff
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Friedhoff @ 2007-02-12  9:49 UTC (permalink / raw)
  To: qemu-devel

Have a look here with links and a description:
http://www.friedhoff.org/fscaps.html
http://www.friedhoff.org/fscaps.html#Qemu

Serges patch is in the mm tree.

Chris


On Sat, 10 Feb 2007 15:11:00 +0000
Paul Brook <paul@codesourcery.com> wrote:

> > Is there any way around this?  I expected to be able to configure
> > capabilities for executables in the filesystem, but it appears there
> > are serious problems with that concept so the kernel doesn't support
> > it.
> 
> Use tunctl to create the device.
> 
> Paul
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel


--------------------
Chris Friedhoff
chris@friedhoff.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CAP_NET_ADMIN (was Re: [Qemu-devel] Two quick requests.)
  2007-02-10 11:53       ` CAP_NET_ADMIN (was Re: [Qemu-devel] Two quick requests.) Kevin F. Quinn
@ 2007-02-10 15:11         ` Paul Brook
  2007-02-12  9:49           ` Chris Friedhoff
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Brook @ 2007-02-10 15:11 UTC (permalink / raw)
  To: qemu-devel

> Is there any way around this?  I expected to be able to configure
> capabilities for executables in the filesystem, but it appears there
> are serious problems with that concept so the kernel doesn't support
> it.

Use tunctl to create the device.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* CAP_NET_ADMIN (was Re: [Qemu-devel] Two quick requests.)
  2007-02-09 22:48     ` Paul Brook
@ 2007-02-10 11:53       ` Kevin F. Quinn
  2007-02-10 15:11         ` Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin F. Quinn @ 2007-02-10 11:53 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

On Fri, 9 Feb 2007 22:48:51 +0000
Paul Brook <paul@codesourcery.com> wrote:

> I've very little sympathy (read: none) for people who "accidentally"
> break things by running them as root.

On a related note, I've been running qemu(-system 0.8.2) as root
recently as a hopefully temporary measure so that it can setup the
network interfaces.  Recent linux kernels require CAP_NET_ADMIN for the
tun network configuration that qemu does (specifically the TUNSETIFF
ioctl), and the only way to get the capability is to start the process
as root.

Other capabilities could be dropped; as indeed could CAP_NET_ADMIN once
the network configuration is done, but that means modifications to qemu
itself to release the capabilities, and would still leave qemu as a
suid-root binary, which it would be nicer to avoid.

Is there any way around this?  I expected to be able to configure
capabilities for executables in the filesystem, but it appears there
are serious problems with that concept so the kernel doesn't support
it.

-- 
Kevin F. Quinn

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-12  9:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-10 12:02 CAP_NET_ADMIN (was Re: [Qemu-devel] Two quick requests.) Ben Taylor
  -- strict thread matches above, loose matches on Subject: below --
2007-02-09 22:19 [Qemu-devel] Two quick requests Rob Landley
2007-02-09 22:27 ` Paul Brook
2007-02-09 22:33   ` Dan Shearer
2007-02-09 22:48     ` Paul Brook
2007-02-10 11:53       ` CAP_NET_ADMIN (was Re: [Qemu-devel] Two quick requests.) Kevin F. Quinn
2007-02-10 15:11         ` Paul Brook
2007-02-12  9:49           ` Chris Friedhoff

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.