]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephfs: clear suid/sgid if regular file is exe
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 16 Aug 2017 16:52:36 +0000 (09:52 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 16 Aug 2017 18:19:40 +0000 (11:19 -0700)
commitd306d74a60e6d2c79aa4e9a840f3fc12ee8461bc
tree2a8063c80b1cb002908dd6870bf742781f95ad39
parent6448d4927fb4cfc29392ff58da8775d68e3e875b
cephfs: clear suid/sgid if regular file is exe

According to [1], the suid/sgid should be cleared if any of the executable bits
are set.

Found this while experimenting for [2].

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1480182

Fixes: http://tracker.ceph.com/issues/21004
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/client/Client.cc
src/mds/Server.cc