summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-07-30 14:27:32 -0700
committerJeremy Allison <jra@samba.org>2009-07-30 14:27:32 -0700
commitfc4e21bdae298095e7ab904fdec657f97743bfe7 (patch)
tree3a61579128dd0e2e364f8bd2fb5623edd1acf479 /source3/smbd
parent65165433ecb95a697442fd88723036605ea21186 (diff)
downloadsamba-fc4e21bdae298095e7ab904fdec657f97743bfe7.tar.gz
samba-fc4e21bdae298095e7ab904fdec657f97743bfe7.tar.bz2
samba-fc4e21bdae298095e7ab904fdec657f97743bfe7.zip
Tidy up treatment of ctime.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/dosmode.c2
-rw-r--r--source3/smbd/trans2.c12
2 files changed, 9 insertions, 5 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index bd0c7df959..535532d07a 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -760,6 +760,8 @@ int file_ntimes(connection_struct *conn, const struct smb_filename *smb_fname,
time_to_asc(convert_timespec_to_time_t(ft->atime))));
DEBUG(6, ("file_ntime: modtime: %s",
time_to_asc(convert_timespec_to_time_t(ft->mtime))));
+ DEBUG(6, ("file_ntime: ctime: %s",
+ time_to_asc(convert_timespec_to_time_t(ft->ctime))));
DEBUG(6, ("file_ntime: createtime: %s",
time_to_asc(convert_timespec_to_time_t(ft->create_time))));
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 8cbd259f63..0daaf7c901 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5209,7 +5209,9 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
set_createtime = true;
}
- if (!null_timespec(ft->ctime)) {
+ if (null_timespec(ft->ctime)) {
+ ft->ctime = smb_fname->st.st_ex_ctime;
+ } else {
set_ctime = true;
}
@@ -5232,10 +5234,10 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
time_to_asc(convert_timespec_to_time_t(ft->atime))));
DEBUG(5,("smb_set_filetime: modtime: %s\n ",
time_to_asc(convert_timespec_to_time_t(ft->mtime))));
- if (!null_timespec(ft->create_time)) {
- DEBUG(5,("smb_set_file_time: createtime: %s\n ",
- time_to_asc(convert_timespec_to_time_t(ft->create_time))));
- }
+ DEBUG(5,("smb_set_filetime: ctime: %s\n ",
+ time_to_asc(convert_timespec_to_time_t(ft->ctime))));
+ DEBUG(5,("smb_set_file_time: createtime: %s\n ",
+ time_to_asc(convert_timespec_to_time_t(ft->create_time))));
/*
* Try and set the times of this file if