summaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-10-01 01:32:32 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2016-10-01 01:32:32 -0400
commit5e940c1dd3c1f7561924954eecee956ec277a79b (patch)
treeab6e949c24c553e4e0b6d10782f4993c1cd436da /fs/fuse/inode.c
parenta09f99eddef44035ec764075a37bace8181bec38 (diff)
fuse: handle killpriv in userspace fs
Only userspace filesystem can do the killing of suid/sgid without races. So introduce an INIT flag and negotiate support for this. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 1e535f31fed0..b965934939cb 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -910,6 +910,8 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
910 fc->writeback_cache = 1; 910 fc->writeback_cache = 1;
911 if (arg->flags & FUSE_PARALLEL_DIROPS) 911 if (arg->flags & FUSE_PARALLEL_DIROPS)
912 fc->parallel_dirops = 1; 912 fc->parallel_dirops = 1;
913 if (arg->flags & FUSE_HANDLE_KILLPRIV)
914 fc->handle_killpriv = 1;
913 if (arg->time_gran && arg->time_gran <= 1000000000) 915 if (arg->time_gran && arg->time_gran <= 1000000000)
914 fc->sb->s_time_gran = arg->time_gran; 916 fc->sb->s_time_gran = arg->time_gran;
915 } else { 917 } else {
@@ -941,7 +943,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req)
941 FUSE_FLOCK_LOCKS | FUSE_HAS_IOCTL_DIR | FUSE_AUTO_INVAL_DATA | 943 FUSE_FLOCK_LOCKS | FUSE_HAS_IOCTL_DIR | FUSE_AUTO_INVAL_DATA |
942 FUSE_DO_READDIRPLUS | FUSE_READDIRPLUS_AUTO | FUSE_ASYNC_DIO | 944 FUSE_DO_READDIRPLUS | FUSE_READDIRPLUS_AUTO | FUSE_ASYNC_DIO |
943 FUSE_WRITEBACK_CACHE | FUSE_NO_OPEN_SUPPORT | 945 FUSE_WRITEBACK_CACHE | FUSE_NO_OPEN_SUPPORT |
944 FUSE_PARALLEL_DIROPS; 946 FUSE_PARALLEL_DIROPS | FUSE_HANDLE_KILLPRIV;
945 req->in.h.opcode = FUSE_INIT; 947 req->in.h.opcode = FUSE_INIT;
946 req->in.numargs = 1; 948 req->in.numargs = 1;
947 req->in.args[0].size = sizeof(*arg); 949 req->in.args[0].size = sizeof(*arg);