android_kernel_xiaomi_sm8350/fs/ocfs2
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
..
cluster Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 2007-07-16 10:52:55 -07:00
dlm [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in fs/ocfs2/dlm/dlmrecovery.c 2007-07-10 17:19:52 -07:00
alloc.c ocfs2: support for removing file regions 2007-07-10 17:32:08 -07:00
alloc.h ocfs2: support for removing file regions 2007-07-10 17:32:08 -07:00
aops.c [PATCH] ocfs2: zero_user_page conversion 2007-07-10 17:32:10 -07:00
aops.h ocfs2: shared writeable mmap 2007-07-10 17:31:51 -07:00
buffer_head_io.c
buffer_head_io.h
dcache.c
dcache.h
dir.c ocfs2: Support creation of unwritten extents 2007-07-10 17:32:04 -07:00
dir.h
dlmglue.c [PATCH] ocfs2: use list_for_each_entry where benefical 2007-07-10 17:19:49 -07:00
dlmglue.h
endian.h ocfs2: btree changes for unwritten extents 2007-07-10 17:32:00 -07:00
export.c
export.h knfsd: exportfs: add exportfs.h header 2007-07-17 10:23:06 -07:00
extent_map.c ocfs2: btree changes for unwritten extents 2007-07-10 17:32:00 -07:00
extent_map.h
file.c ocfs2: Support xfs style space reservation ioctls 2007-07-10 17:32:09 -07:00
file.h ocfs2: Support xfs style space reservation ioctls 2007-07-10 17:32:09 -07:00
heartbeat.c ocfs2: Depend on configfs heartbeat items. 2007-07-10 17:19:40 -07:00
heartbeat.h
inode.c
inode.h
ioctl.c Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check 2007-07-17 12:00:03 -07:00
ioctl.h
journal.c [PATCH] ocfs2: use list_for_each_entry where benefical 2007-07-10 17:19:49 -07:00
journal.h ocfs2: support for removing file regions 2007-07-10 17:32:08 -07:00
localalloc.c
localalloc.h
Makefile
mmap.c ocfs2: shared writeable mmap 2007-07-10 17:31:51 -07:00
mmap.h
namei.c ocfs2: Support creation of unwritten extents 2007-07-10 17:32:04 -07:00
namei.h
ocfs1_fs_compat.h
ocfs2_fs.h ocfs2: Support xfs style space reservation ioctls 2007-07-10 17:32:09 -07:00
ocfs2_lockid.h
ocfs2.h ocfs2: btree changes for unwritten extents 2007-07-10 17:32:00 -07:00
slot_map.c ocfs2: Add "preferred slot" mount option 2007-07-10 17:19:54 -07:00
slot_map.h
suballoc.c ocfs2: use all extent block suballocators 2007-07-10 17:31:56 -07:00
suballoc.h ocfs2: plug truncate into cached dealloc routines 2007-07-10 17:31:55 -07:00
super.c ocfs2: Support xfs style space reservation ioctls 2007-07-10 17:32:09 -07:00
super.h ocfs2: Support xfs style space reservation ioctls 2007-07-10 17:32:09 -07:00
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
ver.c
ver.h
vote.c
vote.h