diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-10-28 17:13:21 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-10-28 17:13:21 +0100 |
commit | b99926ca5e3791f578a833de5ca3ed7bd4bab443 (patch) | |
tree | ec6ca55b18afdbd596bae2ba1cc2747fa4d9ead1 /source4/ntvfs/posix | |
parent | 8160cd1595520719268d20f2a17fd25c72bed4c9 (diff) | |
download | samba-b99926ca5e3791f578a833de5ca3ed7bd4bab443.tar.gz samba-b99926ca5e3791f578a833de5ca3ed7bd4bab443.tar.bz2 samba-b99926ca5e3791f578a833de5ca3ed7bd4bab443.zip |
s4: ntvfs/posix: to set a DACL at open time SEC_DESC_DACL_PRESENT must be set
metze
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 8a32f01223..fe3c915576 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -106,6 +106,7 @@ static NTSTATUS pvfs_open_setup_eas_acl(struct pvfs_state *pvfs, union smb_open *io) { NTSTATUS status; + struct security_descriptor *sd; /* setup any EAs that were asked for */ if (io->ntcreatex.in.ea_list) { @@ -117,8 +118,9 @@ static NTSTATUS pvfs_open_setup_eas_acl(struct pvfs_state *pvfs, } } + sd = io->ntcreatex.in.sec_desc; /* setup an initial sec_desc if requested */ - if (io->ntcreatex.in.sec_desc) { + if (sd && (sd->type & SEC_DESC_DACL_PRESENT)) { union smb_setfileinfo set; /* * TODO: set the full ACL! @@ -129,7 +131,7 @@ static NTSTATUS pvfs_open_setup_eas_acl(struct pvfs_state *pvfs, */ set.set_secdesc.in.file.ntvfs = f->ntvfs; set.set_secdesc.in.secinfo_flags = SECINFO_DACL; - set.set_secdesc.in.sd = io->ntcreatex.in.sec_desc; + set.set_secdesc.in.sd = sd; status = pvfs_acl_set(pvfs, req, name, fd, SEC_STD_WRITE_DAC, &set); } else { |