nfsd: let "insecure" flag vary by pseudoflavor
[safe/jmp/linux-2.6] / fs / nfsd / nfsfh.c
index 7399481..951938d 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/exportfs.h>
 
 #include <linux/sunrpc/svcauth_gss.h>
-#include <linux/nfsd/nfsd.h>
+#include "nfsd.h"
 #include "vfs.h"
 #include "auth.h"
 
@@ -88,8 +88,10 @@ nfsd_mode_check(struct svc_rqst *rqstp, umode_t mode, int type)
 static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,
                                          struct svc_export *exp)
 {
+       int flags = nfsexp_flags(rqstp, exp);
+
        /* Check if the request originated from a secure port. */
-       if (!rqstp->rq_secure && EX_SECURE(exp)) {
+       if (!rqstp->rq_secure && (flags & NFSEXP_INSECURE_PORT)) {
                RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
                dprintk(KERN_WARNING
                       "nfsd: request from insecure port %s!\n",