mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 07:39:47 +00:00
[PATCH] nfsd: check for read-only exports before setting acls
We must check for MAY_SATTR before setting acls, which includes checking for read-only exports: the lower-level setxattr operation that eventually sets the acl cannot check export-level restrictions. Bug reported by Martin Walter <mawa@uni-freiburg.de>. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
9e28393998
commit
b7964c3d88
@ -107,7 +107,7 @@ static int nfsacld_proc_setacl(struct svc_rqst * rqstp,
|
||||
dprintk("nfsd: SETACL(2acl) %s\n", SVCFH_fmt(&argp->fh));
|
||||
|
||||
fh = fh_copy(&resp->fh, &argp->fh);
|
||||
nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP);
|
||||
nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR);
|
||||
|
||||
if (!nfserr) {
|
||||
nfserr = nfserrno( nfsd_set_posix_acl(
|
||||
|
@ -101,7 +101,7 @@ static int nfsd3_proc_setacl(struct svc_rqst * rqstp,
|
||||
int nfserr = 0;
|
||||
|
||||
fh = fh_copy(&resp->fh, &argp->fh);
|
||||
nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP);
|
||||
nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_SATTR);
|
||||
|
||||
if (!nfserr) {
|
||||
nfserr = nfserrno( nfsd_set_posix_acl(
|
||||
|
Loading…
x
Reference in New Issue
Block a user