VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Vivek Goyal <vgoyal@redhat.com> 2020-10-09 14:15:08 -0400 committer: Miklos Szeredi <mszeredi@redhat.com> 2020-11-11 17:22:33 +0100 commit: b866739596ae3c3c60c43f1cf04a516c5aa20fd1 parent: 10c52c84e3f4872689a64ac7666b34d67e630691
Commit Summary:
fuse: set FUSE_WRITE_KILL_SUIDGID in cached write path
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 603af847d596..24b201c4d9a9 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1097,6 +1097,8 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia,
 
 	fuse_write_args_fill(ia, ff, pos, count);
 	ia->write.in.flags = fuse_write_flags(iocb);
+	if (fm->fc->handle_killpriv_v2 && !capable(CAP_FSETID))
+		ia->write.in.write_flags |= FUSE_WRITE_KILL_SUIDGID;
 
 	err = fuse_simple_request(fm, &ap->args);
 	if (!err && ia->write.out.size > count)