]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In set_ea_dos_attribute(), if we've stored btime and set XATTR_DOSINFO_CREA...
authorJeremy Allison <jra@samba.org>
Fri, 18 Mar 2022 18:41:48 +0000 (11:41 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 24 Mar 2022 16:28:37 +0000 (16:28 +0000)
This is no longer a calculated field, every call to fdos_mode() will
set it as non-calculated.

https://bugzilla.samba.org/show_bug.cgi?id=15022

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dosmode.c

index 968fd0fd07f613b3084744b6cec84734a370c860..2f45d68ca52d8a40d828d0c777f5329d10607a04 100644 (file)
@@ -529,6 +529,17 @@ NTSTATUS set_ea_dos_attribute(connection_struct *conn,
                        return status;
                }
        }
+
+       /*
+        * We correctly stored the create time.
+        * We *always* set XATTR_DOSINFO_CREATE_TIME,
+        * so now it can no longer be considered
+        * calculated.
+        */
+       update_stat_ex_create_time(
+               &smb_fname->fsp->fsp_name->st,
+               smb_fname->st.st_ex_btime);
+
        DEBUG(10,("set_ea_dos_attribute: set EA 0x%x on file %s\n",
                (unsigned int)dosmode,
                smb_fname_str_dbg(smb_fname)));