diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-18 03:59:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:58 -0500 |
commit | 85215a9a265b006497ec365d421be1f2b54cdca1 (patch) | |
tree | babf5d78f88a0094672e551cbb4bfe4aa96ce39d /source4/ntvfs/posix/pvfs_open.c | |
parent | 837909e3abfe6988d1e685c291c2871c0d89f4ed (diff) | |
download | samba-85215a9a265b006497ec365d421be1f2b54cdca1.tar.gz samba-85215a9a265b006497ec365d421be1f2b54cdca1.tar.bz2 samba-85215a9a265b006497ec365d421be1f2b54cdca1.zip |
r3835: - added testing of setting an initial ACL on a file using NTTRANS create
- added support for initial ACLs in pvfs backend
(This used to be commit 05ee9179f74d243aa22fa00be7873c5db76a8ad1)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_open.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 1b9538d7e2..5a23ffaa67 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -443,6 +443,22 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, } } + /* setup an initial sec_desc is required */ + if (io->ntcreatex.in.sec_desc) { + union smb_setfileinfo set; + + set.set_secdesc.file.fnum = fnum; + set.set_secdesc.in.secinfo_flags = DACL_SECURITY_INFORMATION; + set.set_secdesc.in.sd = io->ntcreatex.in.sec_desc; + + status = pvfs_acl_set(pvfs, req, name, fd, &set); + if (!NT_STATUS_IS_OK(status)) { + idr_remove(pvfs->idtree_fnum, fnum); + close(fd); + return status; + } + } + /* form the lock context used for byte range locking and opendb locking */ status = pvfs_locking_key(name, f->handle, &f->handle->odb_locking_key); |