]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: clear suid/sgid bits on non-zero write
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 16 Aug 2017 17:20:11 +0000 (10:20 -0700)
committerNathan Cutler <ncutler@suse.com>
Tue, 5 Sep 2017 09:28:20 +0000 (11:28 +0200)
commitb9514d48471b40574a47ad433e3573674075e466
tree5c21fe0d31c7ea3e65eda86476b85e92c98e27c7
parente41a8c25345020f47513c43269eb91e3ca6d0852
client: clear suid/sgid bits on non-zero write

According to [1], these bits should be cleared regardless of any exe bits on
the file. Also, add the required non-zero write check.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 24c9de5d11d5d1145da96a2af52dd22d81e0c89d)
src/client/Client.cc