Re: group ownership of tun devices -- nonfunctional?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mike Mohr <akihana@...>, <linux-kernel@...>
Date: Sunday, August 19, 2007 - 12:05 pm

Mike Mohr <akihana@gmail.com> wrote:

(intentionally not snipping much)



IMHO the check is broken:

+               if (((tun->owner != -1 &&
+                     current->euid != tun->owner) ||
+                    (tun->group != -1 &&
+                     current->egid != tun->group)) &&
+                    !capable(CAP_NET_ADMIN))
                        return -EPERM;

It should be something like:

+               if (!((tun->owner == tun->owner) ||
+                     (tun->group == tun->group) ||
+                     capable(CAP_NET_ADMIN)))
                        return -EPERM;

Please verify and forward to the maintainers if my guess appears to be correct.
-- 
Never stand when you can sit, never sit when you can lie down, never stay
awake when you can sleep.

Friß, Spammer: xxh@n.btxp.7eggert.dyndns.org
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: group ownership of tun devices -- nonfunctional?, Bodo Eggert, (Sun Aug 19, 12:05 pm)
Re: group ownership of tun devices -- nonfunctional?, Rene Herman, (Sun Aug 19, 12:10 pm)
Re: group ownership of tun devices -- nonfunctional?, Bodo Eggert, (Sun Aug 19, 5:42 pm)
Re: group ownership of tun devices -- nonfunctional?, Guido Guenther, (Thu Aug 23, 3:13 am)
Re: group ownership of tun devices -- nonfunctional?, Rene Herman, (Sun Aug 19, 7:24 pm)
Re: group ownership of tun devices -- nonfunctional?, Bodo Eggert, (Mon Aug 20, 7:45 am)