Skip to content

Commit

Permalink
knfsd: nfsd: allow auth_sys nlm on rpcsec_gss exports
Browse files Browse the repository at this point in the history
Our clients (like other clients, as far as I know) use only auth_sys for nlm,
even when using rpcsec_gss for the main nfs operations.

Administrators that want to deny non-kerberos-authenticated locking requests
will need to turn off NFS protocol versions less than 4....

Signed-off-by: "J. Bruce Fields" <[email protected]>
Signed-off-by: Neil Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jul 17, 2007
1 parent 4796f45 commit 9091224
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions fs/nfsd/nfsfh.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,16 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
if (error)
goto out;

/* Check security flavor */
error = check_nfsd_access(exp, rqstp);
if (error)
goto out;
if (!(access & MAY_LOCK)) {
/*
* pseudoflavor restrictions are not enforced on NLM,
* which clients virtually always use auth_sys for,
* even while using RPCSEC_GSS for NFS.
*/
error = check_nfsd_access(exp, rqstp);
if (error)
goto out;
}

/* Finally, check access permissions. */
error = nfsd_permission(rqstp, exp, dentry, access);
Expand Down

0 comments on commit 9091224

Please sign in to comment.