diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-12-01 13:45:55 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-12-01 13:45:55 -0800 |
commit | d1d9dc557434f4eb48cf53269920f43861e8c116 (patch) | |
tree | 7e1c72bddb9af1ae57ed766bb8860684dce4b8ce | |
parent | 4659215a00da0e2ef65d98e6feb020c89563cdba (diff) | |
download | samba-d1d9dc557434f4eb48cf53269920f43861e8c116.tar.gz samba-d1d9dc557434f4eb48cf53269920f43861e8c116.tar.bz2 samba-d1d9dc557434f4eb48cf53269920f43861e8c116.zip |
s3:smbd: write times should be set on the base file instead of the stream name
metze
-rw-r--r-- | source3/smbd/trans2.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index cc7b87f448..7b051d389f 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); } |