From e103ab41f3fd917e9a6df3d6113e2c4c3603b29b Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 13 Jul 2011 03:32:53 +0000 Subject: NFS access control list: Decode the NFS requests into mode format Signed-off-by: shishir gowda Signed-off-by: Vijay Bellur BUG: 3057 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057 Signed-off-by: Anand Avati BUG: 3057 (acl permissions don't work on nfs mount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057 --- xlators/nfs/server/src/nfs3-helpers.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (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 caeff9261..523fdaee9 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -586,7 +586,22 @@ nfs3_accessbits (int32_t accbits) return accresult; } +uint32_t +nfs3_request_to_accessbits (int32_t accbits) +{ + uint32_t acc_request = 0; + + if (accbits & (ACCESS3_READ | ACCESS3_LOOKUP)) + acc_request |= POSIX_READ; + if (accbits & (ACCESS3_MODIFY | ACCESS3_EXTEND)) + acc_request |= POSIX_WRITE; + + if (accbits & ACCESS3_EXECUTE) + acc_request |= POSIX_EXEC; + + return acc_request; +} void nfs3_fill_access3res (access3res *res, nfsstat3 status, int32_t accbits) { -- cgit