summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-08-07 10:19:20 -0700
committerJeremy Allison <jra@samba.org>2009-08-07 10:19:20 -0700
commitea6819ae7565c22b0d6276acebfbab472a4e4c18 (patch)
treebccf570d0bb33d38295b6904605977884445678e
parentaa6dc21fa304943ad70afd14f84cea720f3f2d27 (diff)
downloadsamba-ea6819ae7565c22b0d6276acebfbab472a4e4c18.tar.gz
samba-ea6819ae7565c22b0d6276acebfbab472a4e4c18.tar.bz2
samba-ea6819ae7565c22b0d6276acebfbab472a4e4c18.zip
Correctly send out notify messages for timestamp changes.
"change time" has no notify message, so don't send anything out when we change it. Use FILE_NOTIFY_CHANGE_CREATION correctly when changing the create time. Jeremy.
-rw-r--r--source3/smbd/trans2.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 780d7d606c..a8b721120d 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5224,7 +5224,6 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
FILE_NOTIFY_CHANGE_LAST_ACCESS
|FILE_NOTIFY_CHANGE_LAST_WRITE;
bool set_createtime = false;
- bool set_ctime = false;
NTSTATUS status;
if (!VALID_STAT(smb_fname->st)) {
@@ -5240,8 +5239,6 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
if (null_timespec(ft->ctime)) {
ft->ctime = smb_fname->st.st_ex_ctime;
- } else {
- set_ctime = true;
}
if (null_timespec(ft->atime)) {
@@ -5278,8 +5275,9 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
struct timespec ats = smb_fname->st.st_ex_atime;
if ((timespec_compare(&ft->atime, &ats) == 0) &&
(timespec_compare(&ft->mtime, &mts) == 0)) {
- if (set_createtime || set_ctime) {
- notify_fname(conn, NOTIFY_ACTION_MODIFIED, FILE_NOTIFY_CHANGE_LAST_WRITE,
+ if (set_createtime) {
+ notify_fname(conn, NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_CREATION,
smb_fname->base_name);
}
return NT_STATUS_OK;