Commit e77da97c authored by Trond Myklebust's avatar Trond Myklebust Committed by Greg Kroah-Hartman

NFSv3: Fix another acl regression

commit f87d928f upstream.

When creating a new object on the NFS server, we should not be sending
posix setacl requests unless the preceding posix_acl_create returned a
non-trivial acl. Doing so, causes Solaris servers in particular to
return an EINVAL.

Fixes: 013cdf10 (nfs: use generic posix ACL infrastructure,,,)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1132786Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c7650a01
...@@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, ...@@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
.rpc_argp = &args, .rpc_argp = &args,
.rpc_resp = &fattr, .rpc_resp = &fattr,
}; };
int status; int status = 0;
if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL))
goto out;
status = -EOPNOTSUPP; status = -EOPNOTSUPP;
if (!nfs_server_capable(inode, NFS_CAP_ACLS)) if (!nfs_server_capable(inode, NFS_CAP_ACLS))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment