aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_lowlevel.c
diff options
context:
space:
mode:
authorbigbrotherwei <1965867461@qq.com>2024-01-17 23:58:27 +0800
committerNikolaus Rath <Nikolaus@rath.org>2024-01-20 14:08:07 +0000
commit0c12204145d43ad4683136379a130385ef16d166 (patch)
tree8220389cf0f0c45bb98c788c2728f5d01ec5e734 /lib/fuse_lowlevel.c
parent2c736f516f28dfb5c58aff345c668a5ea6386295 (diff)
downloadlibfuse-0c12204145d43ad4683136379a130385ef16d166.tar.gz
Add processing for FUSE_CAP_HANDLE_KILLPRIV and disable it by default
'FUSE_CAP_HANDLE_KILLPRIV' is not enabled by default anymore, as that would be a sudden security issue introduced by a new ABI and API compatible libfuse version.
Diffstat (limited to 'lib/fuse_lowlevel.c')
-rw-r--r--lib/fuse_lowlevel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index d8f5466..def1918 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2054,7 +2054,6 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
se->conn.want |= (cap)
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_READ);
LL_SET_DEFAULT(1, FUSE_CAP_AUTO_INVAL_DATA);
- LL_SET_DEFAULT(1, FUSE_CAP_HANDLE_KILLPRIV);
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_DIO);
LL_SET_DEFAULT(1, FUSE_CAP_IOCTL_DIR);
LL_SET_DEFAULT(1, FUSE_CAP_ATOMIC_O_TRUNC);
@@ -2146,6 +2145,8 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
outargflags |= FUSE_PARALLEL_DIROPS;
if (se->conn.want & FUSE_CAP_POSIX_ACL)
outargflags |= FUSE_POSIX_ACL;
+ if (se->conn.want & FUSE_CAP_HANDLE_KILLPRIV)
+ outargflags |= FUSE_HANDLE_KILLPRIV;
if (se->conn.want & FUSE_CAP_CACHE_SYMLINKS)
outargflags |= FUSE_CACHE_SYMLINKS;
if (se->conn.want & FUSE_CAP_EXPLICIT_INVAL_DATA)