]> git.apps.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)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 16 Aug 2017 18:20:04 +0000 (11:20 -0700)
commit24c9de5d11d5d1145da96a2af52dd22d81e0c89d
tree4c303ffef27a289aca693a480f7f2a3da26f0efd
parent3f806c72dd3b9b28761ee32f5e32001de8362028
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>
src/client/Client.cc