summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_open.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-31 08:56:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:51 -0500
commit291b02a639aa6551ac1f59e47a78d5590d2b7f6e (patch)
treedcba74eba6867928205402457385ed7d1c9f8f04 /source4/ntvfs/posix/pvfs_open.c
parent90a322f6d7fc2d9a12daea8bd752d549eb874814 (diff)
downloadsamba-291b02a639aa6551ac1f59e47a78d5590d2b7f6e.tar.gz
samba-291b02a639aa6551ac1f59e47a78d5590d2b7f6e.tar.bz2
samba-291b02a639aa6551ac1f59e47a78d5590d2b7f6e.zip
r4448: - fixed access_mask checking on acl set
- honor the change ownership requests of acl set, changing the underlying unix owner/group - fix the access mask on file create with SEC_FLAG_MAXIMUM_ALLOWED (This used to be commit 5761fa35ab727b51ef1b52459911bafbdd788755)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_open.c')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 3941414cd8..c59f2d22e9 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -124,7 +124,7 @@ static NTSTATUS pvfs_open_setup_eas_acl(struct pvfs_state *pvfs,
set.set_secdesc.in.secinfo_flags = SECINFO_DACL;
set.set_secdesc.in.sd = io->ntcreatex.in.sec_desc;
- status = pvfs_acl_set(pvfs, req, name, fd, &set);
+ status = pvfs_acl_set(pvfs, req, name, fd, SEC_STD_WRITE_DAC, &set);
} else {
/* otherwise setup an inherited acl from the parent */
status = pvfs_acl_inherit(pvfs, req, name, fd);
@@ -463,9 +463,12 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
}
if (access_mask & SEC_FLAG_MAXIMUM_ALLOWED) {
- access_mask = SEC_RIGHTS_FILE_READ | SEC_RIGHTS_FILE_WRITE;
+ access_mask = SEC_RIGHTS_FILE_READ | SEC_RIGHTS_FILE_WRITE |
+ SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL;
}
+ access_mask |= SEC_FILE_READ_ATTRIBUTE;
+
if (access_mask & (SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA)) {
flags = O_RDWR;
} else {