]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/attr.c
userns: Allow chown and setgid preservation
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 3 Sep 2012 02:12:51 +0000 (19:12 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 20 Nov 2012 12:17:24 +0000 (04:17 -0800)
commit7fa294c8991ce0ed4e713f08209eb2ce3e1044ac
treed5f8e946374c75f4b620382b7141c6fdbdc19651
parent5eaf563e53294d6696e651466697eb9d491f3946
userns: Allow chown and setgid preservation

- Allow chown if CAP_CHOWN is present in the current user namespace
  and the uid of the inode maps into the current user namespace, and
  the destination uid or gid maps into the current user namespace.

- Allow perserving setgid when changing an inode if CAP_FSETID is
  present in the current user namespace and the owner of the file has
  a mapping into the current user namespace.

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