]> 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)
committerNathan Cutler <ncutler@suse.com>
Tue, 5 Sep 2017 09:28:00 +0000 (11:28 +0200)
commitf9eb24e74f948d85729432dbb440aa177789df85
treec15da722d47b7a3f6e5ed6b1ded542443a3cfb03
parent469e50646c7d83e1f4e59ea90aeeefbd437976e8
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>
(cherry picked from commit d306d74a60e6d2c79aa4e9a840f3fc12ee8461bc)
src/client/Client.cc
src/mds/Server.cc