diff options
author | shishir gowda <shishirng@gluster.com> | 2011-07-13 03:32:53 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-07-13 03:00:34 -0700 |
commit | e103ab41f3fd917e9a6df3d6113e2c4c3603b29b (patch) | |
tree | b6e4b9275de6a7daafd0912d38af9ca6f66829ef /xlators/nfs/server/src/nfs3-helpers.c | |
parent | 9388760b9aad1ae2512eb108a4ca6b5c8638ea07 (diff) |
NFS access control list: Decode the NFS requests into mode format
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
BUG: 3057 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 3057 (acl permissions don't work on nfs mount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3057
Diffstat (limited to 'xlators/nfs/server/src/nfs3-helpers.c')
-rw-r--r-- | xlators/nfs/server/src/nfs3-helpers.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index caeff9261de..523fdaee9e3 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) { |