diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-03 07:21:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-03 07:21:23 -0400 |
commit | 73dec82d8d2b2c6c9c9a66a1c8daae3fcd71d602 (patch) | |
tree | 5fd6c166c609accdbdf706dd0bf5310d53d293e7 | |
parent | 1d2ba7fee28b3a47cca8e8f4f94a22d30b2b3a6f (diff) | |
parent | ffc4c92227db5699493e43eb140b4cb5904c30ff (diff) |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Al writes:
"xattrs regression fix from Andreas; sat in -next for quite a while."
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
sysfs: Do not return POSIX ACL xattrs via listxattr
-rw-r--r-- | fs/xattr.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/xattr.c b/fs/xattr.c index daa732550088..0d6a6a4af861 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -948,17 +948,19 @@ ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, | |||
948 | int err = 0; | 948 | int err = 0; |
949 | 949 | ||
950 | #ifdef CONFIG_FS_POSIX_ACL | 950 | #ifdef CONFIG_FS_POSIX_ACL |
951 | if (inode->i_acl) { | 951 | if (IS_POSIXACL(inode)) { |
952 | err = xattr_list_one(&buffer, &remaining_size, | 952 | if (inode->i_acl) { |
953 | XATTR_NAME_POSIX_ACL_ACCESS); | 953 | err = xattr_list_one(&buffer, &remaining_size, |
954 | if (err) | 954 | XATTR_NAME_POSIX_ACL_ACCESS); |
955 | return err; | 955 | if (err) |
956 | } | 956 | return err; |
957 | if (inode->i_default_acl) { | 957 | } |
958 | err = xattr_list_one(&buffer, &remaining_size, | 958 | if (inode->i_default_acl) { |
959 | XATTR_NAME_POSIX_ACL_DEFAULT); | 959 | err = xattr_list_one(&buffer, &remaining_size, |
960 | if (err) | 960 | XATTR_NAME_POSIX_ACL_DEFAULT); |
961 | return err; | 961 | if (err) |
962 | return err; | ||
963 | } | ||
962 | } | 964 | } |
963 | #endif | 965 | #endif |
964 | 966 | ||