]> git.baikalelectronics.ru Git - kernel.git/commit
userns: For /proc/self/{uid,gid}_map derive the lower userns from the struct file
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 15 Aug 2012 04:25:13 +0000 (21:25 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 20 Nov 2012 12:18:55 +0000 (04:18 -0800)
commit68432e1f9c609bcea98212bfa9971ee29ef5ef90
tree7dd5e7c8288d08e47108692664294be27f9b6b8f
parent98e6448ba88661e755180962dd9d4cde20d13cb2
userns: For /proc/self/{uid,gid}_map derive the lower userns from the struct file

To keep things sane in the context of file descriptor passing derive the
user namespace that uids are mapped into from the opener of the file
instead of from current.

When writing to the maps file the lower user namespace must always
be the parent user namespace, or setting the mapping simply does
not make sense.  Enforce that the opener of the file was in
the parent user namespace or the user namespace whose mapping
is being set.

Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/user_namespace.c