diff options
author | Jeremy Allison <jra@samba.org> | 2011-11-15 16:49:42 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-11-15 17:01:58 -0800 |
commit | 86c16092194836d8478144b97da9ca08aec7fac6 (patch) | |
tree | 68208e60a0dde14c15416984e551aaf71ccfd217 | |
parent | edaa7479edd9c6472dacb3642fe6d2a6869e4719 (diff) | |
download | samba-86c16092194836d8478144b97da9ca08aec7fac6.tar.gz samba-86c16092194836d8478144b97da9ca08aec7fac6.tar.bz2 samba-86c16092194836d8478144b97da9ca08aec7fac6.zip |
Always set the attribute first, before the time.
-rw-r--r-- | source3/smbd/reply.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 0adc4e80f6..541789d846 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1269,13 +1269,6 @@ void reply_setatr(struct smb_request *req) mode = SVAL(req->vwv+0, 0); mtime = srv_make_unix_date3(req->vwv+1); - ft.mtime = convert_time_t_to_timespec(mtime); - status = smb_set_file_time(conn, NULL, smb_fname, &ft, true); - if (!NT_STATUS_IS_OK(status)) { - reply_nterror(req, status); - goto out; - } - if (mode != FILE_ATTRIBUTE_NORMAL) { if (VALID_STAT_OF_DIR(smb_fname->st)) mode |= FILE_ATTRIBUTE_DIRECTORY; @@ -1289,6 +1282,13 @@ void reply_setatr(struct smb_request *req) } } + ft.mtime = convert_time_t_to_timespec(mtime); + status = smb_set_file_time(conn, NULL, smb_fname, &ft, true); + if (!NT_STATUS_IS_OK(status)) { + reply_nterror(req, status); + goto out; + } + reply_outbuf(req, 0, 0); DEBUG(3, ("setatr name=%s mode=%d\n", smb_fname_str_dbg(smb_fname), |