diff options
author | Ralph Boehme <slow@samba.org> | 2019-09-23 15:16:58 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-10-16 19:25:12 +0000 |
commit | 2d62bd58db9f7c7e72b35ef1c62660107f06b8c9 (patch) | |
tree | 663e8cbbd2950f91f6f8a993e35b46b2c5e4291a | |
parent | 459acf2728aa0c3bc935227998cdc59ead5a2e7c (diff) | |
download | samba-2d62bd58db9f7c7e72b35ef1c62660107f06b8c9.tar.gz |
s3:smbd: when storing DOS attribute call dos_mode() beforehand
This is required to ensure File-ID info is populated with the correct on-disk
value, before calling file_set_dosmode() which will update the on-disk value.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 49a754b82d33fb523cda4151a865584ae52a2e2f)
-rw-r--r-- | selftest/knownfail.d/samba3.smb2.fileid | 1 | ||||
-rw-r--r-- | source3/smbd/open.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/selftest/knownfail.d/samba3.smb2.fileid b/selftest/knownfail.d/samba3.smb2.fileid index bdf86ac61b1..89455dacdf0 100644 --- a/selftest/knownfail.d/samba3.smb2.fileid +++ b/selftest/knownfail.d/samba3.smb2.fileid @@ -1,2 +1 @@ ^samba3.smb2.fileid.fileid\(nt4_dc\) -^samba3.smb2.fileid.fileid-dir\(nt4_dc\) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a5650ac9c2d..7f1f8eae593 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3725,6 +3725,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *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))) { + (void)dos_mode(conn, smb_fname); if (!posix_open) { if (file_set_dosmode(conn, smb_fname, new_dos_attributes | FILE_ATTRIBUTE_ARCHIVE, |