login
Header Space

 
 

Re: [PATCH 3/4] autofs4 - track uid and gid of last mount requestor

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ian Kent <raven@...>
Cc: Serge E. Hallyn <serue@...>, Jeff Moyer <jmoyer@...>, Andrew Morton <akpm@...>, Kernel Mailing List <linux-kernel@...>, autofs mailing list <autofs@...>, linux-fsdevel <linux-fsdevel@...>, Pavel Emelyanov <xemul@...>, Eric W. Biederman <ebiederm@...>
Date: Friday, February 29, 2008 - 12:09 pm

Quoting Ian Kent (raven@themaw.net):

The way the user namespaces work right now is similar to say the IPC
namespace - a task belongs to one user, that user belongs to precisely
one user namespace.

Even in my additional userns patches, I was changing uid to store the
(uid, userns) so a struct user still belonged to just one user
namespace.

In contrast, with pid namespaces a task is associated with a 'struct
pid' which links it to multiple process ids, one in each pid namespace
to which it belongs.

Perhaps we should be treating user namespaces like pid namespaces?

For autofs this would mean that when autofs wants a uid for some task,
it would be given the uid in the user namespace which autofs 'knows'.

It would also help me fix the siginfo problems I haven't solved yet -
rather than having to worry about user namespace lifetimes with siginfos
(which last a little while but have no clearly defined lifespan) we
could send the uid in an init user namespace or the uid in the target
uid namespace, or just a lightweight user struct proxy akin to 'struct
pid'.

And it also obviates the need for any sort of delegation.

So if I'm user 500 in what I think is the initial user namespace, I can
create a container with a new user namespace, the init task of which is
both uid 0 in the child userns, and uid 500 in the higher level,
automatically giving the container access to any files I own.

Eric, when you get a chance (I know you're overloaded atm) I'd love to
hear your thoughts on this...

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/4] autofs4 - track uid and gid of last mount re..., Eric W. Biederman, (Thu Feb 28, 4:33 pm)
Re: [autofs] [PATCH 3/4] autofs4 - track uid and gid of last..., Fabio Olive Leite, (Thu Feb 28, 8:31 am)
Re: [PATCH 3/4] autofs4 - track uid and gid of last mount re..., Serge E. Hallyn, (Fri Feb 29, 12:09 pm)
speck-geostationary