s3: add init_smb_file_time()
authorRalph Boehme <slow@samba.org>
Mon, 2 Dec 2019 15:21:42 +0000 (16:21 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 6 Dec 2019 00:17:36 +0000 (00:17 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771

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

index 4bb0f9a54c82d6186ffb3bbf40cb092d2e9787fd..378c5d04918456bc453aa779911aaf9398886897 100644 (file)
@@ -1250,6 +1250,7 @@ NTSTATUS vfs_streaminfo(connection_struct *conn,
                        TALLOC_CTX *mem_ctx,
                        unsigned int *num_streams,
                        struct stream_struct **streams);
+void init_smb_file_time(struct smb_file_time *ft);
 
 /* The following definitions come from smbd/avahi_register.c */
 
index dbf42cd56f42600b499702bd9bf94908dd1f8bce..fdae4922fe88eba635b326d587206a42f41fe8f0 100644 (file)
@@ -1451,6 +1451,16 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp)
        return NT_STATUS_OK;
 }
 
+void init_smb_file_time(struct smb_file_time *ft)
+{
+       *ft = (struct smb_file_time) {
+               .atime = make_omit_timespec(),
+               .ctime = make_omit_timespec(),
+               .mtime = make_omit_timespec(),
+               .create_time = make_omit_timespec()
+       };
+}
+
 /**
  * Initialize num_streams and streams, then call VFS op streaminfo
  */