aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_lowlevel.c
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2023-02-09 12:49:43 +0800
committerNikolaus Rath <Nikolaus@rath.org>2023-02-09 10:22:15 +0000
commit418b7efca9bfa56802732ecde75651071315c9bd (patch)
treeff8fbdd822a30d76c890449425d8d548a83fa168 /lib/fuse_lowlevel.c
parentd7560cc9916b086bfe5d86459cc9f04033edd904 (diff)
downloadlibfuse-418b7efca9bfa56802732ecde75651071315c9bd.tar.gz
fuse_lowlevel.h: add more setattr flags
Such as for the xfstest-dev's generic/684 test case it will clear suid and sgid if the fallocate request is commited by an unprivileged user. The kernel fuse passed the ATTR_KILL_SUID/ATTR_KILL_SGID flags to userspace but it will be dropped. Signed-off-by: Xiubo Li <xiubli@redhat.com>
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r--lib/fuse_lowlevel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index fcc2108..a0f8f00 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1186,6 +1186,8 @@ static void do_setattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
FUSE_SET_ATTR_SIZE |
FUSE_SET_ATTR_ATIME |
FUSE_SET_ATTR_MTIME |
+ FUSE_SET_ATTR_KILL_SUID |
+ FUSE_SET_ATTR_KILL_SGID |
FUSE_SET_ATTR_ATIME_NOW |
FUSE_SET_ATTR_MTIME_NOW |
FUSE_SET_ATTR_CTIME;