From 9628a6a7c73a1bce2700768153a4cdc130690ae5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 1 Dec 2008 13:44:40 -0800 Subject: [PATCH] s3:smbd: write times should be set on the base file instead of the stream name metze (cherry picked from commit 47b270c3f83a86c3a6f4c3ae92a04c308ded9290) --- source/smbd/trans2.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 4ad94b58c98..d4751657c33 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -4951,7 +4951,11 @@ NTSTATUS smb_set_file_time(connection_struct *conn, time_to_asc(convert_timespec_to_time_t(ts[1])) )); if (fsp != NULL) { - set_sticky_write_time_fsp(fsp, ts[1]); + if (fsp->base_fsp) { + set_sticky_write_time_fsp(fsp->base_fsp, ts[1]); + } else { + set_sticky_write_time_fsp(fsp, ts[1]); + } } else { set_sticky_write_time_path(conn, fname, vfs_file_id_from_sbuf(conn, psbuf), @@ -4961,6 +4965,10 @@ NTSTATUS smb_set_file_time(connection_struct *conn, DEBUG(10,("smb_set_file_time: setting utimes to modified values.\n")); + if (fsp && fsp->base_fsp) { + fname = fsp->base_fsp->fsp_name; + } + if(file_ntimes(conn, fname, ts)!=0) { return map_nt_error_from_unix(errno); } -- 2.11.4.GIT