linux/fs/overlayfs
Amir Goldstein 48fab5d7c7 ovl: fix nested overlayfs mount
When the upper overlayfs checks "trusted.overlay.*" xattr on the underlying
overlayfs mount, it gets -EPERM, which confuses the upper overlayfs.

Fix this by returning -EOPNOTSUPP instead of -EPERM from
ovl_own_xattr_get() and ovl_own_xattr_set().  This behavior is consistent
with the behavior of ovl_listxattr(), which filters out the private
overlayfs xattrs.

Note: nested overlays are deprecated.  But this change makes sense
regardless: these xattrs are private to the overlay and should always be
hidden.  Hence getting and setting them should indicate this.

[SzMi: Use EOPNOTSUPP instead of ENODATA and use it for both getting and
setting "trusted.overlay." xattrs.  This is a perfectly valid error code
for "we don't support this prefix", which is the case here.]

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2016-12-16 11:02:56 +01:00
..
copy_up.c ovl: use vfs_clone_file_range() for copy up if possible 2016-12-16 11:02:54 +01:00
dir.c ovl: check lower existence of rename target 2016-12-16 11:02:55 +01:00
inode.c ovl: treat special files like a regular fs 2016-12-16 11:02:55 +01:00
Kconfig ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
Makefile ovl: split super.c 2016-12-16 11:02:56 +01:00
namei.c ovl: check namelen 2016-12-16 11:02:56 +01:00
overlayfs.h ovl: split super.c 2016-12-16 11:02:56 +01:00
ovl_entry.h ovl: check namelen 2016-12-16 11:02:56 +01:00
readdir.c ovl: proper cleanup of workdir 2016-09-01 11:11:59 +02:00
super.c ovl: fix nested overlayfs mount 2016-12-16 11:02:56 +01:00
util.c ovl: split super.c 2016-12-16 11:02:56 +01:00