From 1a5979dc09e15dbc83aada0b7647d2482e431884 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 21 Mar 2013 13:46:51 -0700 Subject: nfs: ACCESS - reply only what was asked for Set only those bits which were requested by the client. Some clients, like AIX, do not like the fact that we are returning the EXEC bit set in the ACCESS reply even though it only asked for LOOKUP bit. Change-Id: I3c2fd5dce030ea5ddae0511497cafa078c4d76d6 BUG: 924481 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/4707 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/nfs/server/src/nfs3-helpers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/nfs/server/src/nfs3-helpers.c') diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index fbfd17d1a83..f7b1bb0cd65 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -591,7 +591,8 @@ nfs3_request_to_accessbits (int32_t accbits) return acc_request; } void -nfs3_fill_access3res (access3res *res, nfsstat3 status, int32_t accbits) +nfs3_fill_access3res (access3res *res, nfsstat3 status, int32_t accbits, + int32_t reqaccbits) { uint32_t accres = 0; @@ -602,7 +603,8 @@ nfs3_fill_access3res (access3res *res, nfsstat3 status, int32_t accbits) accres = nfs3_accessbits (accbits); - res->access3res_u.resok.access = accres; + /* do not answer what was not asked */ + res->access3res_u.resok.access = accres & reqaccbits; } void -- cgit