summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-09-26 14:53:59 -0700
committerJeremy Allison <jra@samba.org>2012-09-27 01:07:08 +0200
commit4666dec4160d09a6d87349c5521fe5751eb5e764 (patch)
tree53d1ef21b8bf9da5b2e8298181db593cf61729f5
parent3bdca921cc9344d96f4aa3a18ba4aac971539b25 (diff)
downloadsamba-4666dec4160d09a6d87349c5521fe5751eb5e764.tar.gz
samba-4666dec4160d09a6d87349c5521fe5751eb5e764.tar.bz2
samba-4666dec4160d09a6d87349c5521fe5751eb5e764.zip
s3: Fix rejecting mkdir on read-only shares
Signed-off-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/smbd/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 10c855c225..40a64115e1 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2815,7 +2815,7 @@ static NTSTATUS mkdir_internal(connection_struct *conn,
bool need_re_stat = false;
uint32_t access_mask = SEC_DIR_ADD_SUBDIR;
- if(access_mask & ~(conn->share_access)) {
+ if (!CAN_WRITE(conn) || (access_mask & ~(conn->share_access))) {
DEBUG(5,("mkdir_internal: failing share access "
"%s\n", lp_servicename(talloc_tos(), SNUM(conn))));
return NT_STATUS_ACCESS_DENIED;