summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 3d5dd849b6..d916609769 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -283,7 +283,9 @@ static NTSTATUS open_file(files_struct *fsp,
}
/* Inherit the ACL if the file was created. */
- if ((local_flags & O_CREAT) && !file_existed) {
+ if ((local_flags & O_CREAT)
+ && !file_existed
+ && lp_inherit_perms(SNUM(conn))) {
inherit_access_acl(conn, fname, unx_mode);
}