From: Stefan Metzmacher Date: Mon, 1 Dec 2008 21:45:55 +0000 (-0800) Subject: s3:smbd: write times should be set on the base file instead of the stream name X-Git-Tag: samba-4.0.0alpha6~480^2~39 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=d1d9dc557434f4eb48cf53269920f43861e8c116;p=samba.git s3:smbd: write times should be set on the base file instead of the stream name metze --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index cc7b87f448a..7b051d389f9 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4957,7 +4957,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), @@ -4967,6 +4971,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); }