diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-17 12:36:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:56 -0500 |
commit | 696fdc8cf91cc1660725fd93c2b91ec6b65d06b5 (patch) | |
tree | 5bcd9e4d35632dfa6c105fa81ec9c7ba12b800ec /source4/ntvfs/posix/pvfs_open.c | |
parent | 91e94014beb145541c051b4df28dde7ad0899da5 (diff) | |
download | samba-696fdc8cf91cc1660725fd93c2b91ec6b65d06b5.tar.gz samba-696fdc8cf91cc1660725fd93c2b91ec6b65d06b5.tar.bz2 samba-696fdc8cf91cc1660725fd93c2b91ec6b65d06b5.zip |
r3806: added support to smb_server and pvfs for the NTTRANS Create call. This
call has an optional sec_desc and ea_list.
(This used to be commit 8379ad14e3d51a848a99865d9ce8d56a301e8a3c)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_open.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index d8f3342f0d..1b9538d7e2 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -429,6 +429,20 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, return status; } + /* setup any EAs that were asked for */ + if (io->ntcreatex.in.ea_list) { + int i; + for (i=0;i<io->ntcreatex.in.ea_list->num_eas;i++) { + status = pvfs_setfileinfo_ea_set(pvfs, name, fd, + &io->ntcreatex.in.ea_list->eas[i]); + 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); @@ -792,7 +806,8 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, /* use the generic mapping code to avoid implementing all the different open calls. */ - if (io->generic.level != RAW_OPEN_GENERIC) { + if (io->generic.level != RAW_OPEN_GENERIC && + io->generic.level != RAW_OPEN_NTTRANS_CREATE) { return ntvfs_map_open(req, io, ntvfs); } |