netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: Allow group ownership of TUN/TAP devices.
@ 2009-02-02 14:18 Michael Tokarev
  2009-02-02 14:44 ` Michael Tokarev
  2009-02-05 10:54 ` Guido Günther
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Tokarev @ 2009-02-02 14:18 UTC (permalink / raw)
  To: netdev, Guido Guenther

Hi.  Just noticed an old commit 8c644623fe7e41f59fe97cdf666cba3cb7ced7d8
dated Mon Jul 2 22:50:25 2007 -0700 that allows group ownership for
tun/tap devices.  Here's the comment:

    [NET]: Allow group ownership of TUN/TAP devices.

    Introduce a new syscall TUNSETGROUP for group ownership setting of tap
    devices. The user now is allowed to send packages if either his euid or
    his egid matches the one specified via tunctl (via -u or -g
    respecitvely). If both, gid and uid, are set via tunctl, both have to
    match.

Two questions:

1: why both has to match?  Is it really useful?
 (I understand it's a corner case, somehow)

2, and this is the main one: How about supplementary groups?

Here I have a valid usage case: a group of testers running various
versions of windows using KVM (kernel virtual machine), 1 at a time,
to test some software.  kvm is set up to use bridge with a tap device
(there should be a way to connect to the machine).  Anyone on that group
has to be able to start/stop the virtual machines.

My first attempt - pretty obvious when I saw -g option of tunctl - is
to add group ownership for the tun device and add a supplementary group
to each user (their primary group should be different).  But that fails,
since kernel only checks for egid, not any other group ids.

What's the reasoning to not allow supplementary groups and to only check
for egid?

Thanks!

/mjt

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

end of thread, other threads:[~2009-03-24 18:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-02 14:18 Allow group ownership of TUN/TAP devices Michael Tokarev
2009-02-02 14:44 ` Michael Tokarev
2009-02-03  7:35   ` David Miller
2009-02-05 10:54 ` Guido Günther
2009-03-24 18:10   ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).