diff options
author | J. Bruce Fields <bfields@redhat.com> | 2017-01-11 20:34:50 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-01-12 15:55:51 -0500 |
commit | dcd208697707b12adeaa45643bab239c5e90ef9b (patch) | |
tree | 746ca608b9402be469406830a20855cdae0473eb /fs | |
parent | 0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff) |
nfsd: fix supported attributes for acl & labels
Oops--in 916d2d844afd I moved some constants into an array for
convenience, but here I'm accidentally writing to that array.
The effect is that if you ever encounter a filesystem lacking support
for ACLs or security labels, then all queries of supported attributes
will report that attribute as unsupported from then on.
Fixes: 916d2d844afd "nfsd: clean up supported attribute handling"
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 7ecf16be4a44..8fae53ce21d1 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -2440,7 +2440,9 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp, | |||
2440 | p++; /* to be backfilled later */ | 2440 | p++; /* to be backfilled later */ |
2441 | 2441 | ||
2442 | if (bmval0 & FATTR4_WORD0_SUPPORTED_ATTRS) { | 2442 | if (bmval0 & FATTR4_WORD0_SUPPORTED_ATTRS) { |
2443 | u32 *supp = nfsd_suppattrs[minorversion]; | 2443 | u32 supp[3]; |
2444 | |||
2445 | memcpy(supp, nfsd_suppattrs[minorversion], sizeof(supp)); | ||
2444 | 2446 | ||
2445 | if (!IS_POSIXACL(dentry->d_inode)) | 2447 | if (!IS_POSIXACL(dentry->d_inode)) |
2446 | supp[0] &= ~FATTR4_WORD0_ACL; | 2448 | supp[0] &= ~FATTR4_WORD0_ACL; |