[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-902-gea6819a

Jeremy Allison jra at samba.org
Fri Aug 7 11:20:45 MDT 2009


The branch, master has been updated
       via  ea6819ae7565c22b0d6276acebfbab472a4e4c18 (commit)
      from  aa6dc21fa304943ad70afd14f84cea720f3f2d27 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit ea6819ae7565c22b0d6276acebfbab472a4e4c18
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 7 10:19:20 2009 -0700

    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.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/trans2.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 780d7d6..a8b7211 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;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list