From: Andreas Gruenbacher <agruenba@redhat.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>, linux-fsdevel@vger.kernel.org
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Subject: [PATCH 2/2] vfs: Fix the posix_acl_xattr_list return value
Date: Tue, 3 Nov 2015 15:25:08 +0100 [thread overview]
Message-ID: <1446560708-10897-3-git-send-email-agruenba@redhat.com> (raw)
In-Reply-To: <1446560708-10897-1-git-send-email-agruenba@redhat.com>
When a filesystem that contains POSIX ACLs is mounted without ACL support
(-o noacl), the appropriate behavior is not to list any existing POSIX ACL
xattrs. The return value for list xattr handlers in this case is 0, not an
error code: several filesystems that use the POSIX ACL xattr handlers do
not expect the list operation to fail.
Symlinks cannot have ACLs, so posix_acl_xattr_list will never be called for
symlinks in the first place.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/posix_acl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index b1a66e8..2fdca61 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -833,9 +833,7 @@ posix_acl_xattr_list(struct dentry *dentry, char *list, size_t list_size,
size_t size;
if (!IS_POSIXACL(d_backing_inode(dentry)))
- return -EOPNOTSUPP;
- if (d_is_symlink(dentry))
- return -EOPNOTSUPP;
+ return 0;
if (type == ACL_TYPE_ACCESS)
xname = POSIX_ACL_XATTR_ACCESS;
--
2.5.0
prev parent reply other threads:[~2015-11-03 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 14:25 [PATCH 0/2] VFS: POSIX ACL fixes Andreas Gruenbacher
2015-11-03 14:25 ` [PATCH 1/2] vfs: Check attribute names in posix acl xattr handers Andreas Gruenbacher
2015-11-03 14:25 ` Andreas Gruenbacher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446560708-10897-3-git-send-email-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).