Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / fs / nfs / callback.c
index 073b4cf..54de482 100644 (file)
@@ -428,6 +428,18 @@ check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp)
        if (p == NULL)
                return 0;
 
+       /*
+        * Did we get the acceptor from userland during the SETCLIENID
+        * negotiation?
+        */
+       if (clp->cl_acceptor)
+               return !strcmp(p, clp->cl_acceptor);
+
+       /*
+        * Otherwise try to verify it using the cl_hostname. Note that this
+        * doesn't work if a non-canonical hostname was used in the devname.
+        */
+
        /* Expect a GSS_C_NT_HOSTBASED_NAME like "nfs@serverhostname" */
 
        if (memcmp(p, "nfs@", 4) != 0)