]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit11a14212b5e9c51ccabb09f45ac0bde358ee3980
treed5f8e946374c75f4b620382b7141c6fdbdc19651
parentb45688e379eabb315e8f1ab0e9db9772b697addb
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