diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-05 11:49:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:31 -0500 |
commit | d8ddb03e906d47a9b75238a2848d860228ab35a7 (patch) | |
tree | 2113905c01bc8c4094951303a6cdbae2871a9e08 /source4/ntvfs/posix | |
parent | 12f4a44cf549b4ccd729494c242a5ec186d2d670 (diff) | |
download | samba-d8ddb03e906d47a9b75238a2848d860228ab35a7.tar.gz samba-d8ddb03e906d47a9b75238a2848d860228ab35a7.tar.bz2 samba-d8ddb03e906d47a9b75238a2848d860228ab35a7.zip |
r3550: fixed initial attribute on file create (inlusion of FILE_ATTRIBUTE_ARCHIVE)
(This used to be commit b07feaafd16e42e84ba51004a6a9d4a3cb8f9a37)
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 d640bae279..2430f9becb 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -284,6 +284,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, uint32_t share_access = io->generic.in.share_access; uint32_t access_mask = io->generic.in.access_mask; mode_t mode; + uint32_t attrib; if ((io->ntcreatex.in.file_attr & FILE_ATTRIBUTE_READONLY) && (create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE)) { @@ -313,7 +314,8 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, return NT_STATUS_TOO_MANY_OPENED_FILES; } - mode = pvfs_fileperms(pvfs, io->ntcreatex.in.file_attr | FILE_ATTRIBUTE_ARCHIVE); + attrib = io->ntcreatex.in.file_attr | FILE_ATTRIBUTE_ARCHIVE; + mode = pvfs_fileperms(pvfs, attrib); /* create the file */ fd = open(name->full_name, flags | O_CREAT | O_EXCL, mode); @@ -330,7 +332,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, return status; } - name->dos.attrib = io->ntcreatex.in.file_attr; + name->dos.attrib = attrib; status = pvfs_dosattrib_save(pvfs, name, fd); if (!NT_STATUS_IS_OK(status)) { idr_remove(pvfs->idtree_fnum, fnum); |