summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4acl.c
diff options
context:
space:
mode:
authorJ.Bruce Fields <bfields@fieldses.org>2006-10-04 02:16:14 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 07:55:20 -0700
commitb66285cee3f9abad26cca6c9b848e1ad6b792d94 (patch)
tree504c36192cd4c255b7082b7b68a526a5fe118527 /fs/nfsd/nfs4acl.c
parentf3b64eb6efb1ef46f6629b66a429e7f2b5955003 (diff)
downloadtalos-op-linux-b66285cee3f9abad26cca6c9b848e1ad6b792d94.tar.gz
talos-op-linux-b66285cee3f9abad26cca6c9b848e1ad6b792d94.zip
[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>
Diffstat (limited to 'fs/nfsd/nfs4acl.c')
-rw-r--r--fs/nfsd/nfs4acl.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
index 105544eac9a3..5d94555cdc83 100644
--- a/fs/nfsd/nfs4acl.c
+++ b/fs/nfsd/nfs4acl.c
@@ -357,33 +357,20 @@ nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl,
goto out;
error = nfs4_acl_split(acl, dacl);
- if (error < 0)
+ if (error)
goto out_acl;
- if (acl->naces == 0) {
- error = -ENODATA;
- goto try_dpacl;
- }
-
*pacl = _nfsv4_to_posix_one(acl, flags);
if (IS_ERR(*pacl)) {
error = PTR_ERR(*pacl);
*pacl = NULL;
goto out_acl;
}
-try_dpacl:
- if (dacl->naces == 0) {
- if (pacl == NULL || *pacl == NULL)
- error = -ENODATA;
- goto out_acl;
- }
- error = 0;
*dpacl = _nfsv4_to_posix_one(dacl, flags);
if (IS_ERR(*dpacl)) {
error = PTR_ERR(*dpacl);
*dpacl = NULL;
- goto out_acl;
}
out_acl:
if (error) {
OpenPOWER on IntegriCloud