Re: [PATCH] Send quota messages via netlink

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Eric W. Biederman <ebiederm@...>
Cc: Jan Kara <jack@...>, Andrew Morton <akpm@...>, <linux-kernel@...>, Balbir Singh <balbir@...>, Serge E. Hallyn <serue@...>, <containers@...>
Date: Thursday, August 30, 2007 - 2:54 pm

Quoting Eric W. Biederman (ebiederm@xmission.com):

Sorry, I've lost the original patch from two separate mailboxes...

The proper behavior depends on how we end up tying filesystems to user
namespaces, which isn't actually decided yet.

The way I was recommending doing that was:

A filesystem is tied to a user namespace.  If a uid in another naemspace
is to be allowed to access the filesystem, it will actually - through a
key in it's keyring (which acts like a capability) - be mapped to a uid
in the filesystem's uid namespace.  So in Eric's example, if Alice
brings Bob over quota, Alice would have done so through some user
Charlie who she is authorized to act as through her keyring.  So Charlie
should be the id which would be logged over netlink.

Of course there is currently no support for this.  So I'd recommend one
of two options:  either just punt on uid namespace for now and we'll fix
it when we improve user namespaces - so log Alice's userid.  Or we can
try to do it somewhat correct now, which might be done as follows:

	1. introduce get_uid_in_userns(tsk).  For now this just returns
	   tsk->uid if current->userns == tsk->userns, else it returns
	   0.
	   This way in Eric's scenario, Bob would be told that root,
	   not an invalid user (Alice) had brought him over quota.
	   Eventually, this would walk tsk's keychain for a uid entry
	   in current's active user namespace.
	
	2. Add the userns to the netlink message.

Again I need to find Jan's orginal patch, but I'll take a look at this.

-serge
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Send quota messages via netlink, Jan Kara, (Tue Aug 28, 10:13 am)
Re: [PATCH] Send quota messages via netlink, Andrew Morton, (Wed Aug 29, 12:51 am)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Mon Sep 3, 10:43 am)
Re: [PATCH] Send quota messages via netlink, Randy Dunlap, (Mon Sep 3, 1:12 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Mon Sep 3, 1:48 pm)
Re: [PATCH] Send quota messages via netlink, Andrew Morton, (Mon Sep 3, 2:41 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Wed Aug 29, 6:03 am)
Re: [PATCH] Send quota messages via netlink, Andrew Morton, (Wed Aug 29, 12:13 am)
Re: [PATCH] Send quota messages via netlink, Eric W. Biederman, (Wed Aug 29, 1:41 am)
Re: [PATCH] Send quota messages via netlink, Balbir Singh, (Wed Aug 29, 2:30 am)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Wed Aug 29, 8:46 am)
Re: [PATCH] Send quota messages via netlink, Balbir Singh, (Fri Aug 31, 2:59 am)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Mon Sep 3, 6:18 am)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Wed Aug 29, 8:26 am)
Re: [PATCH] Send quota messages via netlink, Eric W. Biederman, (Wed Aug 29, 2:31 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Wed Aug 29, 3:26 pm)
Re: [PATCH] Send quota messages via netlink, Eric W. Biederman, (Wed Aug 29, 5:06 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Thu Aug 30, 5:25 am)
Re: [PATCH] Send quota messages via netlink, Eric W. Biederman, (Thu Aug 30, 1:33 pm)
Re: [PATCH] Send quota messages via netlink, Serge E. Hallyn, (Thu Aug 30, 3:18 pm)
Re: [PATCH] Send quota messages via netlink, Serge E. Hallyn, (Thu Aug 30, 2:54 pm)
Re: [PATCH] Send quota messages via netlink, Serge E. Hallyn, (Thu Aug 30, 3:10 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Thu Aug 30, 6:18 pm)
Re: [PATCH] Send quota messages via netlink, Serge E. Hallyn, (Thu Aug 30, 6:14 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Mon Sep 3, 10:21 am)
Re: [PATCH] Send quota messages via netlink, Serge E. Hallyn, (Tue Sep 4, 5:32 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Tue Sep 4, 6:49 pm)
Re: [PATCH] Send quota messages via netlink, Serge E. Hallyn, (Tue Sep 4, 7:48 pm)
Re: [PATCH] Send quota messages via netlink, Jan Kara, (Wed Sep 5, 9:32 am)
Re: [PATCH] Send quota messages via netlink, Serge E. Hallyn, (Wed Sep 5, 10:28 am)
Re: [PATCH] Send quota messages via netlink, Randy Dunlap, (Wed Aug 29, 11:57 am)
Re: [PATCH] Send quota messages via netlink, David Miller, (Wed Aug 29, 12:54 am)