NFSv4: handle no acl attr
authorJ. Bruce Fields <bfields@fieldses.org>
Thu, 13 Oct 2005 20:54:27 +0000 (16:54 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 19 Oct 2005 06:19:41 +0000 (23:19 -0700)
 Stop handing garbage to userspace in the case where a weird server clears the
 acl bit in the getattr return (despite the fact that they've already claimed
 acl support.)

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4xdr.c

index c5c75235c5b859485a5cd8b6351c1bf5d34cd479..cd762648fa9a680c08efca614854c0aa05739270 100644 (file)
@@ -3255,7 +3255,8 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
                if (attrlen <= *acl_len)
                        xdr_read_pages(xdr, attrlen);
                *acl_len = attrlen;
-       }
+       } else
+               status = -EOPNOTSUPP;
 
 out:
        return status;