alistair23-linux/include/uapi
Miklos Szeredi 4a2abf99f9 fuse: add FUSE_WRITE_KILL_PRIV
In the FOPEN_DIRECT_IO case the write path doesn't call file_remove_privs()
and that means setuid bit is not cleared if unpriviliged user writes to a
file with setuid bit set.

pjdfstest chmod test 12.t tests this and fails.

Fix this by adding a flag to the FUSE_WRITE message that requests clearing
privileges on the given file.  This needs 

This better than just calling fuse_remove_privs(), because the attributes
may not be up to date, so in that case a write may miss clearing the
privileges.

Test case:

  $ passthrough_ll /mnt/pasthrough-mnt -o default_permissions,allow_other,cache=never
  $ mkdir /mnt/pasthrough-mnt/testdir
  $ cd /mnt/pasthrough-mnt/testdir
  $ prove -rv pjdfstests/tests/chmod/12.t

Reported-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Tested-by: Vivek Goyal <vgoyal@redhat.com>
2019-05-27 11:42:36 +02:00
..
asm-generic uapi: Wire up the mount API syscalls on non-x86 arches [ver #2] 2019-05-16 12:23:45 -04:00
drm drm: introduce a capability flag for syncobj timeline support 2019-05-02 12:36:47 +10:00
linux fuse: add FUSE_WRITE_KILL_PRIV 2019-05-27 11:42:36 +02:00
misc uapi/habanalabs: add missing fields in bmon params 2019-04-21 16:20:46 +03:00
mtd
rdma RDMA/core: Change system parameters callback from dumpit to doit 2019-05-13 22:16:48 -03:00
scsi scsi: fc: add FPIN ELS definition 2019-04-08 21:29:16 -04:00
sound Merge branch 'asoc-5.2' into asoc-next 2019-05-06 22:51:54 +09:00
video
xen