Patchwork [BUG:1385] mnt3: Fail mount requests for disallowed clients

login
register
Submitter Shehjar Tikoo
Date 2010-11-09 06:06:24
Message ID <1289282784-7891-1-git-send-email-shehjart@gluster.com>
Download mbox | patch
Permalink /patch/5658/
State Accepted
Headers show

Comments

Shehjar Tikoo - 2010-11-09 06:06:24
From: Shehjar Tikoo <shehjart@gluster.com>


Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
---
 xlators/nfs/server/src/mount3.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index 47158dc..2e4a739 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -767,10 +767,11 @@  mnt3svc_mnt (rpcsvc_request_t *req)
         }
 
         ret = mnt3_check_client_net (ms, req, exp->vol);
-        if (ret == -1) {
+        if (ret == RPCSVC_AUTH_REJECT) {
                 mntstat = MNT3ERR_ACCES;
                 gf_log (GF_MNT, GF_LOG_DEBUG, "Client mount not allowed");
-                goto rpcerr;
+                ret = -1;
+                goto mnterr;
         }
 
         ret = mnt3svc_mount (req, ms, exp);