]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
knfsd: nfsd: allow auth_sys nlm on rpcsec_gss exports
authorJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 17 Jul 2007 11:04:52 +0000 (04:04 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Jul 2007 17:23:08 +0000 (10:23 -0700)
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" <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfsd/nfsfh.c

index 8d2b49914843c91957b9c5b6cf1dad3b5ecb6b9e..0eb464a39aaeb502e0614569ff81208e3226b120 100644 (file)
@@ -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);