summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2012-03-06 11:26:17 +0530
committerAnand Avati <avati@redhat.com>2012-03-18 00:36:38 -0700
commit4f257ae34dcce7eb4437d572274f77279a831986 (patch)
tree5b3092fa0862cad0bbd91a1b295df0308b1adb18
parent410b1092e690c4e89d95d8b136884df6fcf5a1a8 (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: I5d0057548735af542bc3c837b8e2d98c7b0716fa BUG: 790781 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2872 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishna Srinivas <krishna@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c4
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 e59d3ba..cb6f9ff 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 */