summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-09-09 15:28:43 -0700
committerJeremy Allison <jra@samba.org>2010-09-09 15:28:43 -0700
commite6b85c2a7b3cfa0dd3c9859c88e5462c616d5a2a (patch)
tree0ea9d6c639c4ac1670ee18e6107f26f25a5228b2 /source3/smbd
parent9962462278e250f4ad2aa068bb6afb8015270e81 (diff)
downloadsamba-e6b85c2a7b3cfa0dd3c9859c88e5462c616d5a2a.tar.gz
samba-e6b85c2a7b3cfa0dd3c9859c88e5462c616d5a2a.tar.bz2
samba-e6b85c2a7b3cfa0dd3c9859c88e5462c616d5a2a.zip
More paranoia to ensure SD's can't be set on read-only shares.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/nttrans.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 1e4e06cf26..b602a51611 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -836,6 +836,10 @@ NTSTATUS set_sd(files_struct *fsp, uint8_t *data, uint32_t sd_len,
struct security_descriptor *psd = NULL;
NTSTATUS status;
+ if (!CAN_WRITE(fsp->conn)) {
+ return NT_STATUS_ACCESS_DENIED;
+ }
+
if (sd_len == 0 || !lp_nt_acl_support(SNUM(fsp->conn))) {
return NT_STATUS_OK;
}