summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-06-25 18:40:17 -0700
committerTim Prouty <tprouty@samba.org>2009-06-25 18:40:32 -0700
commit6395bc55db6b5926c42d3419084a6ccc1256c9c7 (patch)
tree9b85a322f6cf3eb54060eaf81ab28c99382e5bbb
parenteb8c658fcdda5d1337605ed5e2e8da15bc51ba20 (diff)
downloadsamba-6395bc55db6b5926c42d3419084a6ccc1256c9c7.tar.gz
samba-6395bc55db6b5926c42d3419084a6ccc1256c9c7.tar.bz2
samba-6395bc55db6b5926c42d3419084a6ccc1256c9c7.zip
s3: pass a valid stat into file_ntimes()
file_ntimes() calls can_write_to_file() which expects a valid stat struct
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/smbd/dosmode.c4
-rw-r--r--source3/smbd/trans2.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 731934d714..3da1caf60b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6224,7 +6224,7 @@ int file_set_dosmode(connection_struct *conn, const char *fname,
const char *parent_dir,
bool newfile);
int file_ntimes(connection_struct *conn, const char *fname,
- struct smb_file_time *ft);
+ struct smb_file_time *ft, const SMB_STRUCT_STAT *psbuf);
bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
struct file_id fileid, const struct timespec mtime);
bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec mtime);
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 26d3320a4c..03ac0897ef 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -718,7 +718,7 @@ int file_set_dosmode(connection_struct *conn, const char *fname,
*******************************************************************/
int file_ntimes(connection_struct *conn, const char *fname,
- struct smb_file_time *ft)
+ struct smb_file_time *ft, const SMB_STRUCT_STAT *psbuf)
{
struct smb_filename *smb_fname = NULL;
NTSTATUS status;
@@ -762,7 +762,7 @@ int file_ntimes(connection_struct *conn, const char *fname,
(as DOS does).
*/
- status = create_synthetic_smb_fname_split(talloc_tos(), fname, NULL,
+ status = create_synthetic_smb_fname_split(talloc_tos(), fname, psbuf,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 8bd37633d0..ef3d6d7a9a 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5013,7 +5013,7 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
fname = fsp->base_fsp->fsp_name;
}
- if(file_ntimes(conn, fname, ft)!=0) {
+ if(file_ntimes(conn, fname, ft, psbuf)!=0) {
return map_nt_error_from_unix(errno);
}
notify_fname(conn, NOTIFY_ACTION_MODIFIED, action, fname);