summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/lib/src/auth-unix.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-11-16 04:56:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-16 04:44:14 -0800
commitb985dce6c4415a9d67fefabdbf2e5fe287e1dc62 (patch)
tree9f7a88e6e7c5bbc89ae279587ca9bfad0ecbe6b3 /xlators/nfs/lib/src/auth-unix.c
parent015b08d64dfea093d8fcd0a30b655469b18bbc2e (diff)
nfsrpc: Fail auth-unix if more than 16 gids found
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2045 (Write permission denied for non-primary group membership) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2045
Diffstat (limited to 'xlators/nfs/lib/src/auth-unix.c')
-rw-r--r--xlators/nfs/lib/src/auth-unix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/nfs/lib/src/auth-unix.c b/xlators/nfs/lib/src/auth-unix.c
index 10000c3858d..50ca381ec85 100644
--- a/xlators/nfs/lib/src/auth-unix.c
+++ b/xlators/nfs/lib/src/auth-unix.c
@@ -59,6 +59,11 @@ nfs_auth_unix_authenticate (rpcsvc_request_t *req, void *priv)
goto err;
}
+ if (aup.aup_len > 16) {
+ ret = RPCSVC_AUTH_REJECT;
+ goto err;
+ }
+
req->uid = aup.aup_uid;
req->gid = aup.aup_gid;
req->auxgidcount = aup.aup_len;