From 2d5d51e9f3df7013b5993f889d4c85c2a722e511 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 7 Oct 2002 18:09:29 +0000 Subject: Fix from Andreas Gruenbacher to prevent ACL set on read-only share. Jeremy. (This used to be commit 9b8f362abc5abf25f02718774a8aa1f4574f19ff) --- source3/smbd/posix_acls.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/smbd/posix_acls.c') 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. */ -- cgit