linux/fs/hfsplus
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
..
bfind.c [PATCH] hfs: cleanup HFS+ prints 2006-01-18 19:20:22 -08:00
bitmap.c [PATCH] read_mapping_page for address space 2006-06-23 07:43:02 -07:00
bnode.c [PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc 2006-09-27 08:26:10 -07:00
brec.c [PATCH] hfs: cleanup HFS+ prints 2006-01-18 19:20:22 -08:00
btree.c HFS+: add custom dentry hash and comparison operations 2007-07-16 09:05:49 -07:00
catalog.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
dir.c HFS+: add custom dentry hash and comparison operations 2007-07-16 09:05:49 -07:00
extents.c [PATCH] hfs: add HFSX support 2006-01-18 19:20:23 -08:00
hfsplus_fs.h HFS+: add custom dentry hash and comparison operations 2007-07-16 09:05:49 -07:00
hfsplus_raw.h [PATCH] extend the set of "__attribute__" shortcut macros 2007-02-11 10:51:35 -08:00
inode.c HFS+: add custom dentry hash and comparison operations 2007-07-16 09:05:49 -07:00
ioctl.c Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check 2007-07-17 12:00:03 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
options.c [PATCH] hfs: cleanup HFS+ prints 2006-01-18 19:20:22 -08:00
part_tbl.c fix file specification in comments 2006-10-03 23:01:26 +02:00
super.c HFS+: add custom dentry hash and comparison operations 2007-07-16 09:05:49 -07:00
tables.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
unicode.c HFS+: add custom dentry hash and comparison operations 2007-07-16 09:05:49 -07:00
wrapper.c [PATCH] hfs: add HFSX support 2006-01-18 19:20:23 -08:00