linux/fs/overlayfs
Vivek Goyal 07a2daab49 ovl: Copy up underlying inode's ->i_mode to overlay inode
Right now when a new overlay inode is created, we initialize overlay
inode's ->i_mode from underlying inode ->i_mode but we retain only
file type bits (S_IFMT) and discard permission bits.

This patch changes it and retains permission bits too. This should allow
overlay to do permission checks on overlay inode itself in task context.

[SzM] It also fixes clearing suid/sgid bits on write.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reported-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 4bacc9c923 ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay")
Cc: <stable@vger.kernel.org>
2016-07-04 16:49:48 +02:00
..
copy_up.c ovl: override creds with the ones from the superblock mounter 2016-05-27 08:55:26 +02:00
dir.c ovl: fix uid/gid when creating over whiteout 2016-06-15 14:18:59 +02:00
inode.c ovl: Copy up underlying inode's ->i_mode to overlay inode 2016-07-04 16:49:48 +02:00
Kconfig ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
Makefile ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
overlayfs.h ovl: Copy up underlying inode's ->i_mode to overlay inode 2016-07-04 16:49:48 +02:00
readdir.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-05-27 17:14:05 -07:00
super.c ovl: warn instead of error if d_type is not supported 2016-07-03 09:39:31 +02:00