[PATCH] knfsd: nfsd4: acls: fix handling of zero-length acls
It is legal to have zero-length NFSv4 acls; they just deny everything. Also, nfs4_acl_nfsv4_to_posix will always return with pacl and dpacl set on success, so the caller doesn't need to check this. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
此提交包含在:
@@ -447,13 +447,11 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
||||
} else if (error < 0)
|
||||
goto out_nfserr;
|
||||
|
||||
if (pacl) {
|
||||
error = set_nfsv4_acl_one(dentry, pacl, POSIX_ACL_XATTR_ACCESS);
|
||||
if (error < 0)
|
||||
goto out_nfserr;
|
||||
}
|
||||
error = set_nfsv4_acl_one(dentry, pacl, POSIX_ACL_XATTR_ACCESS);
|
||||
if (error < 0)
|
||||
goto out_nfserr;
|
||||
|
||||
if (dpacl) {
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
error = set_nfsv4_acl_one(dentry, dpacl, POSIX_ACL_XATTR_DEFAULT);
|
||||
if (error < 0)
|
||||
goto out_nfserr;
|
||||
|
新增問題並參考
封鎖使用者