1
0
Fork 0
remarkable-linux/fs/jfs
Jan Kara 3a79e1c8e7 jfs: Don't clear SGID when inheriting ACLs
commit 9bcf66c72d upstream.

When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit
set, DIR1 is expected to have SGID bit set (and owning group equal to
the owning group of 'DIR0'). However when 'DIR0' also has some default
ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on
'DIR1' to get cleared if user is not member of the owning group.

Fix the problem by moving posix_acl_update_mode() out of
__jfs_set_acl() into jfs_set_acl(). That way the function will not be
called when inheriting ACLs which is what we want as it prevents SGID
bit clearing and the mode has been properly set by posix_acl_create()
anyway.

Fixes: 073931017b
CC: jfs-discussion@lists.sourceforge.net
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-06 18:59:39 -07:00
..
Kconfig jfs: needs crc32_le 2009-02-02 13:43:28 -06:00
Makefile fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
acl.c jfs: Don't clear SGID when inheriting ACLs 2017-08-06 18:59:39 -07:00
file.c Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 17:11:50 -07:00
inode.c fs: Replace CURRENT_TIME with current_time() for inode timestamps 2016-09-27 21:06:21 -04:00
ioctl.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
jfs_acl.h jfs: use generic posix ACL infrastructure 2014-01-25 23:58:22 -05:00
jfs_btree.h
jfs_debug.c drop redundant ->owner initializations 2016-05-29 19:08:00 -04:00
jfs_debug.h
jfs_dinode.h
jfs_discard.c jfs: Remove unnecessary line continuations and terminating newlines 2016-03-30 10:48:25 -05:00
jfs_discard.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_dmap.c fs/jfs/jfs_dmap.c: replace min/casting by min_t 2014-06-03 14:14:00 -05:00
jfs_dmap.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_dtree.c jfs: Coalesce some formats 2016-03-30 10:48:28 -05:00
jfs_dtree.h [readdir] convert jfs 2013-06-29 12:56:42 +04:00
jfs_extent.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_extent.h
jfs_filsys.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_imap.c jfs: Coalesce some formats 2016-03-30 10:48:28 -05:00
jfs_imap.h
jfs_incore.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
jfs_inode.c fs: Replace CURRENT_TIME with current_time() for inode timestamps 2016-09-27 21:06:21 -04:00
jfs_inode.h fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers 2011-07-20 20:47:59 -04:00
jfs_lock.h
jfs_logmgr.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-07-28 12:59:05 -07:00
jfs_logmgr.h Fix common misspellings 2011-03-31 11:26:23 -03:00
jfs_metapage.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-07-28 12:59:05 -07:00
jfs_metapage.h mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
jfs_mount.c fix printk typo 'faild' 2010-08-09 11:25:17 +02:00
jfs_superblock.h jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_txnmgr.c jfs: Simplify code 2016-09-06 12:17:24 -05:00
jfs_txnmgr.h
jfs_types.h jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
jfs_umount.c jfs: flush journal completely before releasing metadata inodes 2011-08-01 12:41:00 -05:00
jfs_unicode.c
jfs_unicode.h include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
jfs_uniupr.c
jfs_xattr.h jfs: Switch to generic xattr handlers 2016-05-12 22:29:18 -04:00
jfs_xtree.c drop redundant ->owner initializations 2016-05-29 19:08:00 -04:00
jfs_xtree.h jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
namei.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 20:16:43 -07:00
resize.c jfs: jump to error_out when filemap_{fdatawait, write_and_wait} fails 2016-08-29 15:51:39 -05:00
super.c fs: add i_blocksize() 2017-06-14 15:06:00 +02:00
symlink.c vfs: Remove {get,set,remove}xattr inode operations 2016-10-07 21:48:36 -04:00
xattr.c fs: Replace CURRENT_TIME with current_time() for inode timestamps 2016-09-27 21:06:21 -04:00