]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: clear setuid/setgid bits on ownership changes
authorJeff Layton <jlayton@redhat.com>
Mon, 5 Dec 2016 19:19:23 +0000 (14:19 -0500)
committerJeff Layton <jlayton@redhat.com>
Wed, 7 Dec 2016 17:10:56 +0000 (12:10 -0500)
commit6da72500882d9749cb2be6eaa2568e6fe6e5ff4d
tree22fd15c0f95570332146a2c2443f0a536754f825
parent3d7fa898030ba6a52346e8576435ce04b6f592c1
mds: clear setuid/setgid bits on ownership changes

If we get a ownership change, POSIX mandates that you clear the
setuid and setgid bits unless you are "appropriately privileged", in
which case the OS is allowed to leave them intact.

Linux however always clears those bits, regardless of the process
privileges, as that makes it simpler to close some potential races.
Have ceph do the same.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/mds/Server.cc