original_kernel/fs/overlayfs
Vivek Goyal 993a0b2aec ovl: Do not lose security.capability xattr over metadata file copy-up
If a file has been copied up metadata only, and later data is copied up,
upper loses any security.capability xattr it has (underlying filesystem
clears it as upon file write).

From a user's point of view, this is just a file copy-up and that should
not result in losing security.capability xattr.  Hence, before data copy
up, save security.capability xattr (if any) and restore it on upper after
data copy up is complete.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Fixes: 0c28887493 ("ovl: A new xattr OVL_XATTR_METACOPY for file on upper")
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2019-02-13 11:14:46 +01:00
..
Kconfig
Makefile
copy_up.c ovl: Do not lose security.capability xattr over metadata file copy-up 2019-02-13 11:14:46 +01:00
dir.c
export.c ovl: fix decode of dir file handle with multi lower layers 2018-11-21 10:44:48 +01:00
file.c
inode.c Revert "ovl: relax permission checking on underlying layers" 2018-12-04 11:31:30 +01:00
namei.c
overlayfs.h ovl: Do not lose security.capability xattr over metadata file copy-up 2019-02-13 11:14:46 +01:00
ovl_entry.h
readdir.c
super.c
util.c ovl: Do not lose security.capability xattr over metadata file copy-up 2019-02-13 11:14:46 +01:00