summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-10-07 18:09:29 +0000
committerJeremy Allison <jra@samba.org>2002-10-07 18:09:29 +0000
commit2d5d51e9f3df7013b5993f889d4c85c2a722e511 (patch)
treeba1e09e6d61a4e69e63b96459b59c35decb523cd
parent783df79b34cf169ec56642f2b4d30a5287025284 (diff)
downloadsamba-2d5d51e9f3df7013b5993f889d4c85c2a722e511.tar.gz
samba-2d5d51e9f3df7013b5993f889d4c85c2a722e511.tar.bz2
samba-2d5d51e9f3df7013b5993f889d4c85c2a722e511.zip
Fix from Andreas Gruenbacher <agruen@suse.de> to prevent ACL set on read-only
share. Jeremy. (This used to be commit 9b8f362abc5abf25f02718774a8aa1f4574f19ff)
-rw-r--r--source3/smbd/posix_acls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index e6ae1c7d79..6b1b62417a 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -2124,6 +2124,11 @@ BOOL set_nt_acl(files_struct *fsp, uint32 security_info_sent, SEC_DESC *psd)
DEBUG(10,("set_nt_acl: called for file %s\n", fsp->fsp_name ));
+ if (!CAN_WRITE(conn)) {
+ DEBUG(10,("set acl rejected on read-only share\n"));
+ return False;
+ }
+
/*
* Get the current state of the file.
*/