Re: group ownership of tun devices -- nonfunctional?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Bodo Eggert <7eggert@...>
Cc: Mike Mohr <akihana@...>, <linux-kernel@...>
Date: Sunday, August 19, 2007 - 7:24 pm

On 08/19/2007 11:42 PM, Bodo Eggert wrote:


Okay. Just had to ask. That looked so odd...


There is a short description of the desired semantics in the link that was 
posted:

http://lkml.org/lkml/2007/6/18/228

===
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.
===

Paraphrasing the original code above, it's saying:

if ((owner_is_set && does_not_match) || (group_is_set && does_not_match))
	bugger_off_unless(CAP_NET_ADMIN);

or reverting the logic:

if ((owner_is_unset || does_match) && (group_is_unset || does_match))
	good_to_go();

which probably matches the intention -- we're good to go only if the 
credentials that are set also match.

Rene.
-
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)