android_kernel_xiaomi_sm8350/fs/gfs2
Satyam Sharma 3bd858ab1c Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check
Introduce is_owner_or_cap() macro in fs.h, and convert over relevant
users to it. This is done because we want to avoid bugs in the future
where we check for only effective fsuid of the current task against a
file's owning uid, without simultaneously checking for CAP_FOWNER as
well, thus violating its semantics.
[ XFS uses special macros and structures, and in general looked ...
untouchable, so we leave it alone -- but it has been looked over. ]

The (current->fsuid != inode->i_uid) check in generic_permission() and
exec_permission_lite() is left alone, because those operations are
covered by CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH. Similarly operations
falling under the purview of CAP_CHOWN and CAP_LEASE are also left alone.

Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Cc: Al Viro <viro@ftp.linux.org.uk>
Acked-by: Serge E. Hallyn <serge@hallyn.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17 12:00:03 -07:00
..
locking
acl.c Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check 2007-07-17 12:00:03 -07:00
acl.h
bmap.c [GFS2] Fix gfs2_block_truncate_page err return 2007-07-09 08:23:54 +01:00
bmap.h
daemon.c [GFS2] System won't suspend with GFS2 file system mounted 2007-07-09 08:24:04 +01:00
daemon.h
dir.c [GFS2] Obtaining no_formal_ino from directory entry 2007-07-09 08:24:08 +01:00
dir.h
eaops.c Remove capability.h from mm.h 2007-07-16 09:05:45 -07:00
eaops.h
eattr.c
eattr.h
gfs2.h
glock.c [GFS2] Simplify multiple glock aquisition 2007-07-09 08:23:50 +01:00
glock.h
glops.c
glops.h
incore.h
inode.c [GFS2] Remove i_mode passing from NFS File Handle 2007-07-09 08:24:11 +01:00
inode.h [GFS2] Remove i_mode passing from NFS File Handle 2007-07-09 08:24:11 +01:00
Kconfig
lm.c
lm.h
locking.c
log.c [GFS2] Small fixes to logging code 2007-07-09 15:43:07 +01:00
log.h
lops.c [GFS2] Addendum to the journaled file/unmount patch 2007-07-09 08:23:52 +01:00
lops.h
main.c
Makefile
meta_io.c
meta_io.h
mount.c [GFS2] remounting w/o acl option leaves acls enabled 2007-07-09 08:24:01 +01:00
mount.h
ops_address.c
ops_address.h
ops_dentry.c
ops_dentry.h
ops_export.c knfsd: exportfs: add exportfs.h header 2007-07-17 10:23:06 -07:00
ops_file.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw 2007-07-10 13:56:13 -07:00
ops_file.h
ops_fstype.c [GFS2] Obtaining no_formal_ino from directory entry 2007-07-09 08:24:08 +01:00
ops_fstype.h
ops_inode.c [GFS2] inode size inconsistency 2007-07-09 08:23:59 +01:00
ops_inode.h
ops_super.c
ops_super.h
ops_vm.c
ops_vm.h
quota.c
quota.h
recovery.c
recovery.h
rgrp.c [GFS2] Remove i_mode passing from NFS File Handle 2007-07-09 08:24:11 +01:00
rgrp.h
super.c
super.h
sys.c
sys.h
trans.c
trans.h
util.c
util.h