diff options
author | Jose A. Rivera <jarrpa@samba.org> | 2016-02-03 20:58:19 -0600 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-02-16 09:32:10 +0100 |
commit | 022167722618a300d2b16fc51b8b9628e765daec (patch) | |
tree | 6c448b1a8a2fb34c8ba5305d73c6fcf684e3bb33 | |
parent | c358f3c120183cb8f64d681cc54c42782d89a4a1 (diff) | |
download | samba-022167722618a300d2b16fc51b8b9628e765daec.tar.gz |
s3:smbd:open: Skip redundant call to file_set_dosmode when creating a new file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11727
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Pair-programmed-with: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 5 04:37:43 CET 2016 on sn-devel-144
(cherry picked from commit aec07b8b60ff9589a3c84eef6adeca464e6c01f6)
-rw-r--r-- | source3/smbd/open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index ed0594b1756..fa817e44563 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3169,8 +3169,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, } if (info != FILE_WAS_OPENED) { - /* Files should be initially set as archive */ - if (lp_map_archive(SNUM(conn)) || + /* Overwritten files should be initially set as archive */ + if ((info == FILE_WAS_OVERWRITTEN && lp_map_archive(SNUM(conn))) || lp_store_dos_attributes(SNUM(conn))) { if (!posix_open) { if (file_set_dosmode(conn, smb_fname, |