Re: [PATCH 3/3] RFC: p9auth: add p9auth fs

Previous thread: [PATCH 3/3] RFC: p9auth: add p9auth fs by Serge E. Hallyn on Tuesday, April 27, 2010 - 9:45 am. (5 messages)

Next thread: Re: 2.6.33.3-rt16: WARNING: at fs/namespace.c:1197 umount_tree+0x127/0x175() by Thomas Gleixner on Tuesday, April 27, 2010 - 1:53 pm. (4 messages)
From: Serge E. Hallyn
Date: Tuesday, April 27, 2010 - 9:41 am

Hi,

Here is an updated version of the p9auth setuid capability
module, which hopefully addresses all previous feedback.  It
is now a separate filesystem instead of a device, as per Eric's
suggestion.

During the last round, Alan Cox made a great suggestion of sending
credentials over AF_UNIX sock allowing the recipient to 'become me.'
I think that's still an interesting idea, and intend to pursue it
as Eric pushes the patches to translate userids across user
namespaces.

The tradeoffs are worth discussing.  On the one
hand, p9auth requires a scary CAP_GRANT_ID capability, while a
SO_PASSAUTH would be more akin to an extension of CAP_SETUID.
Also, SO_PASSAUTH would be usable by any unprivileged app, while
one would hope there would be only one p9auth service for the whole
system.  On the other hand, the p9auth API appears to be pretty
well settled and understood, and only provides for a very simple
setting of all uids and all gids to one value, plus some auxiliary
groups, which is perfect for use by simple login servers.

p9auth and SO_PASSAUTH don't appear to be mutually exclusive.  I don't
know how painful it would be for plan-9 folks to make use of the
SO_PASSAUTH feature.  (It should definately be possible)  But in any
case here is the next iteration of p9auth fs for discussion and
consideration.

thanks,
-serge
--

From: David Howells
Date: Tuesday, May 4, 2010 - 7:52 am

Acked-by: David Howells <dhowells@redhat.com>
--

From: David Howells
Date: Tuesday, May 4, 2010 - 7:57 am

user_buf doesn't need preclearing.  It's just a waste of time.  This occurs
three times.

David
--

From: Serge E. Hallyn
Date: Tuesday, May 4, 2010 - 8:14 am

Hm, yeah, the first doesn't need it at all, and the latter two
should just kmalloc and set user_buf[count] = '\0'.

thanks,

-serge
--

Previous thread: [PATCH 3/3] RFC: p9auth: add p9auth fs by Serge E. Hallyn on Tuesday, April 27, 2010 - 9:45 am. (5 messages)

Next thread: Re: 2.6.33.3-rt16: WARNING: at fs/namespace.c:1197 umount_tree+0x127/0x175() by Thomas Gleixner on Tuesday, April 27, 2010 - 1:53 pm. (4 messages)