diff options
author | Rajesh Amaravathi <rajesh@redhat.com> | 2012-03-06 11:26:17 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-10 01:11:31 -0800 |
commit | 7afa2747234778be3f2cffb860a8c48286dde566 (patch) | |
tree | 4b2cbd8e3f038c6856a690102cdea541b6804804 /xlators/nfs/server | |
parent | 3193c56b7e3d0be9713138784b1a6477136add9e (diff) |
nfs/server: allow deletion of files by default
this is needed for Micrsoft Windows-based Nfs clients
which do not ignore ACCESS3_DELETE permission not being
granted, while linux/unix systems ignore the same.
behaviour on linux/unix systems remains unchanged
Change-Id: I67f5f66a7486b93163aebedec5fbaa303173964e
BUG: 790781
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2875
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishna Srinivas <krishna@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/nfs/server')
-rw-r--r-- | xlators/nfs/server/src/nfs3-helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c index 7075b3e6cde..f8bf689feb7 100644 --- a/xlators/nfs/server/src/nfs3-helpers.c +++ b/xlators/nfs/server/src/nfs3-helpers.c @@ -567,7 +567,7 @@ nfs3_accessbits (int32_t accbits) accresult |= ACCESS3_READ; if (accbits & POSIX_WRITE) - accresult |= (ACCESS3_MODIFY | ACCESS3_EXTEND); + accresult |= (ACCESS3_MODIFY | ACCESS3_EXTEND | ACCESS3_DELETE); /* lookup on directory allowed only in case of execute permission */ if (accbits & POSIX_EXEC) @@ -584,7 +584,7 @@ nfs3_request_to_accessbits (int32_t accbits) if (accbits & ACCESS3_READ) acc_request |= POSIX_READ; - if (accbits & (ACCESS3_MODIFY | ACCESS3_EXTEND)) + if (accbits & (ACCESS3_MODIFY | ACCESS3_EXTEND | ACCESS3_DELETE)) acc_request |= POSIX_WRITE; /* For lookup on directory check for execute permission */ |