]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: allow unprivileged users to clear suid/sgid
authorXiubo Li <xiubli@redhat.com>
Thu, 9 Feb 2023 11:18:36 +0000 (19:18 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 14 Mar 2023 14:54:05 +0000 (22:54 +0800)
commitdb10cfc8077bc79f59aea5a6fef18900f96edda6
treec70666dbe0c21dcfe71b7fb476deb30beb53f07a
parent5852e5a7f2b743c08a8abec7ba4c9786adde0483
client: allow unprivileged users to clear suid/sgid

The fallocate path will try to clear the suid/sgid if a unprivileged
user changed the file. And the VFS will set the ATTR_MODE and at the
same time by clearing the suid/sgid mode bits.

There is no Posix item requires that we should clear the suid/sgid
in fallocate code path but this is the default behaviour for most of
the filesystems and the VFS layer. And also the same for the write
code path, which have already support it.

Fixes: https://tracker.ceph.com/issues/58680
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc