[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-0pre1-129-g13aa857

Karolin Seeger kseeger at samba.org
Tue Sep 9 11:35:43 GMT 2008


The branch, v3-3-stable has been updated
       via  13aa85725386da7e45f286ec1d4ac46fa9dfaf55 (commit)
       via  410d54abb9991930233ca15733d932472dc35d8b (commit)
       via  51bab3661f401f61d6de9ae34aa6180adf80ecb3 (commit)
       via  ba358940ad4e37b942e6e1a0c838a01bd6a7b0c0 (commit)
       via  8d9ccd7d19f6258cdbff547c875716d64e182c4c (commit)
       via  0ee61627b292c319d2c7a809091d47e09fe46ac9 (commit)
      from  6250672a4ced773c921a9696352173f59a8fd1e6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-stable


- Log -----------------------------------------------------------------
commit 13aa85725386da7e45f286ec1d4ac46fa9dfaf55
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Sep 9 13:33:56 2008 +0200

    WHATSNEW: Update chenges since 3.3.0pre1.
    
    Karolin
    (cherry picked from commit 298420071b188190ea0e6756c88b1c589312cfbc)

commit 410d54abb9991930233ca15733d932472dc35d8b
Author: Volker Lendecke <vl at sernet.de>
Date:   Mon Sep 8 22:53:50 2008 +0200

    Fix calculation of useable_space for trans2 and nttrans replies
    
    When alignment was in place, we pretended to send more data/params according to
    the param_offset/param_length and data_offset/data_length parameters than would
    actually fit into the SMB according to the NBSS length field.
    (cherry picked from commit a18cd579160ea3b70e43895a2a83f7734014f091)

commit 51bab3661f401f61d6de9ae34aa6180adf80ecb3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 8 15:12:24 2008 +0200

    smbd: some write time fixes
    
    - only the first non truncating write causes
      the write time update with 2 seconds delay.
      It's not enough to check for an existing update event
      as it will be NULL after the event was triggered.
    
    - SMBwrite truncates always update the write time
      unless the sticky write time is set.
    
    - SMBwrite truncates don't trigger a write time update on close.
    
    metze
    (cherry picked from commit be8ac33179f56296118435e2732ccffdf7ddd305)

commit ba358940ad4e37b942e6e1a0c838a01bd6a7b0c0
Author: Volker Lendecke <vl at sernet.de>
Date:   Mon Sep 8 16:42:06 2008 +0200

    When setting an NFSv4 ACL, map generic bits
    (cherry picked from commit dbe7a61be2beac50d1665e38ac374cefbbabec00)
    (cherry picked from commit 77b3ca1a4be4ae780186ab4d46ec114b8dea41a8)

commit 8d9ccd7d19f6258cdbff547c875716d64e182c4c
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 5 20:39:37 2008 -0700

    Fix debug message to show correct function name.
    Jeremy.
    (cherry picked from commit 7150f8e89c93be7d122e19f650522be591544611)

commit 0ee61627b292c319d2c7a809091d47e09fe46ac9
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 5 19:01:32 2008 -0700

    Write times code update.
    
    Ok, here's the fix for the write times breakage
    with the new tests in S4 smbtorture.
    
    The key is keeping in the share mode struct
    the "old_file_time" as the real write time,
    set by all the write and allocation calls,
    and the "changed_write_time" as the "sticky"
    write time - set by the SET_FILE_TIME calls.
    
    We can set them independently (although I
    kept the optimization of not setting the
    "old_file_time" is a "changed_write_time"
    was already set, as we'll never see it.
    
    This allows us to update the write time
    immediately on the SMBwrite truncate case,
    SET_END_OF_FILE and SET_ALLOCATION_SIZE calls,
    whilst still have the 2 second delay on the
    "normal" SMBwrite, SMBwriteX calls.
    
    I think in a subsequent patch I'd like to
    change the name of these from "old_file_time"
    to "write_time" and "changed_write_time" to
    "sticky_write_time" to make this clearer.
    
    I think I also fixed a bug in Metze's original
    code in that once a write timestamp had been
    set from a "normal" SMBwriteX call the fsp->update_write_time_triggered
    variable was set and then never reset - thus
    meaning the write timestamp would never get
    updated again on subsequent SMBwriteX's.
    
    The new code checks the update_write_time_event
    event instead, and doesn't update is there's
    an event already scheduled.
    
    Metze especially, please check this over for
    your understanding.
    
    Jeremy.
    (cherry picked from commit aff490ef3b32b3bb2c11cf35ed3fa0272178da3f)

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

Summary of changes:
 WHATSNEW.txt               |    7 ++++++
 source/Makefile.in         |    5 ++++
 source/include/proto.h     |   14 ++++++------
 source/locking/locking.c   |   33 +++++++++++++++++++++++----
 source/modules/nfs4_acls.c |    4 +++
 source/smbd/dosmode.c      |   52 +++++++++++++++++++++++++++-----------------
 source/smbd/fileio.c       |   42 ++++++++++++++++++++++++++++++-----
 source/smbd/nttrans.c      |   22 ++++++++----------
 source/smbd/process.c      |    2 +-
 source/smbd/reply.c        |    6 +++-
 source/smbd/trans2.c       |   27 +++++++++++++---------
 11 files changed, 150 insertions(+), 64 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index bddfbb9..d322491 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -103,6 +103,7 @@ o   Jeremy Allison <jra at samba.org>
     * Add new "winbind reconnect delay" parameter.
     * Make the change to smbcontrol for "all" to mean broadcast,
       and "smbd" to mean the main smb daemon.
+    * Write times code update.
 
 
 o   Guenther Deschner <gd at samba.org>
@@ -112,6 +113,12 @@ o   Guenther Deschner <gd at samba.org>
 
 o   Volker Lendecke <vl at samba.org>
     * Rework of the Winbind idmap backend.
+    * Fix calculation of useable_space for trans2 and nttrans replies.
+    * Add mapping of generic bits when setting an NFSv4 ACL.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * Some write time fixes.
 
 
 ######################################################################
diff --git a/source/Makefile.in b/source/Makefile.in
index 5793b5e..03f04cc 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -623,6 +623,7 @@ VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
 VFS_FILEID_OBJ = modules/vfs_fileid.o
 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
+VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
 
 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
 
@@ -2381,6 +2382,10 @@ bin/aio_fork. at SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
 	@echo "Building plugin $@"
 	@$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
 
+bin/vfs_acl_xattr. at SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_XATTR_OBJ)
+	@echo "Building plugin $@"
+	@$(SHLD_MODULE) $(VFS_ACL_XATTR_OBJ)
+
 bin/registry. at SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o
 	@echo "Building plugin $@"
 	@$(SHLD_MODULE) libgpo/gpext/registry.o
diff --git a/source/include/proto.h b/source/include/proto.h
index d5e942a..eeb62e1 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -5308,8 +5308,8 @@ void set_delete_on_close_token(struct share_mode_lock *lck, UNIX_USER_TOKEN *tok
 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, UNIX_USER_TOKEN *tok);
 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, UNIX_USER_TOKEN *tok);
 bool set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct *fsp, bool delete_on_close);
-bool set_write_time(struct file_id fileid, struct timespec write_time,
-		    bool overwrite);
+bool set_sticky_write_time(struct file_id fileid, struct timespec write_time);
+bool set_write_time(struct file_id fileid, struct timespec write_time);
 int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
 				 const char *, void *),
 		      void *private_data);
@@ -9616,11 +9616,10 @@ 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, const struct timespec ts[2]);
-bool set_write_time_path(connection_struct *conn, const char *fname,
-			 struct file_id fileid, const struct timespec mtime,
-			 bool overwrite);
-bool set_write_time_fsp(struct files_struct *fsp, const struct timespec mtime,
-			bool overwrite);
+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);
+bool update_write_time(struct files_struct *fsp);
 
 /* The following definitions come from smbd/error.c  */
 
@@ -9665,6 +9664,7 @@ bool directory_has_default_acl(connection_struct *conn, const char *fname);
 
 ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n);
 void trigger_write_time_update(struct files_struct *fsp);
+void trigger_write_time_update_immediate(struct files_struct *fsp);
 ssize_t write_file(struct smb_request *req,
 			files_struct *fsp,
 			const char *data,
diff --git a/source/locking/locking.c b/source/locking/locking.c
index ca61a88..368ab16 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -1405,22 +1405,21 @@ bool set_allow_initial_delete_on_close(struct share_mode_lock *lck, files_struct
 	return True;
 }
 
-bool set_write_time(struct file_id fileid, struct timespec write_time,
-		    bool overwrite)
+bool set_sticky_write_time(struct file_id fileid, struct timespec write_time)
 {
 	struct share_mode_lock *lck;
 
-	DEBUG(5,("set_write_time: %s overwrite=%d id=%s\n",
+	DEBUG(5,("set_sticky_write_time: %s id=%s\n",
 		 timestring(debug_ctx(),
 			    convert_timespec_to_time_t(write_time)),
-		 overwrite, file_id_string_tos(&fileid)));
+		 file_id_string_tos(&fileid)));
 
 	lck = get_share_mode_lock(NULL, fileid, NULL, NULL, NULL);
 	if (lck == NULL) {
 		return False;
 	}
 
-	if (overwrite || null_timespec(lck->changed_write_time)) {
+	if (timespec_compare(&lck->changed_write_time, &write_time) != 0) {
 		lck->modified = True;
 		lck->changed_write_time = write_time;
 	}
@@ -1429,6 +1428,30 @@ bool set_write_time(struct file_id fileid, struct timespec write_time,
 	return True;
 }
 
+bool set_write_time(struct file_id fileid, struct timespec write_time)
+{
+	struct share_mode_lock *lck;
+
+	DEBUG(5,("set_write_time: %s id=%s\n",
+		 timestring(debug_ctx(),
+			    convert_timespec_to_time_t(write_time)),
+		 file_id_string_tos(&fileid)));
+
+	lck = get_share_mode_lock(NULL, fileid, NULL, NULL, NULL);
+	if (lck == NULL) {
+		return False;
+	}
+
+	if (timespec_compare(&lck->old_write_time, &write_time) != 0) {
+		lck->modified = True;
+		lck->old_write_time = write_time;
+	}
+
+	TALLOC_FREE(lck);
+	return True;
+}
+
+
 struct forall_state {
 	void (*fn)(const struct share_mode_entry *entry,
 		   const char *sharepath,
diff --git a/source/modules/nfs4_acls.c b/source/modules/nfs4_acls.c
index dc1b70c..9e28db8 100644
--- a/source/modules/nfs4_acls.c
+++ b/source/modules/nfs4_acls.c
@@ -25,6 +25,8 @@
 
 #define SMBACL4_PARAM_TYPE_NAME "nfs4"
 
+extern const struct generic_mapping file_generic_mapping;
+
 #define SMB_ACE4_INT_MAGIC 0x76F8A967
 typedef struct _SMB_ACE4_INT_T
 {
@@ -528,6 +530,8 @@ static bool smbacl4_fill_ace4(
 	ace_v4->aceMask = ace_nt->access_mask &
 		(STD_RIGHT_ALL_ACCESS | SA_RIGHT_FILE_ALL_ACCESS);
 
+	se_map_generic(&ace_v4->aceMask, &file_generic_mapping);
+
 	if (ace_v4->aceFlags!=ace_nt->flags)
 		DEBUG(9, ("ace_v4->aceFlags(0x%x)!=ace_nt->flags(0x%x)\n",
 			ace_v4->aceFlags, ace_nt->flags));
diff --git a/source/smbd/dosmode.c b/source/smbd/dosmode.c
index 0ac3873..88c6a51 100644
--- a/source/smbd/dosmode.c
+++ b/source/smbd/dosmode.c
@@ -616,39 +616,51 @@ int file_ntimes(connection_struct *conn, const char *fname, const struct timespe
 	return ret;
 }
 
-/*******************************************************************
- Change a filetime - possibly allowing DOS semantics.
-*******************************************************************/
+/******************************************************************
+ Force a "sticky" write time on a pathname. This will always be
+ returned on all future write time queries and set on close.
+******************************************************************/
 
-bool set_write_time_path(connection_struct *conn, const char *fname,
-			 struct file_id fileid, const struct timespec mtime,
-			 bool overwrite)
+bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
+			 struct file_id fileid, const struct timespec mtime)
 {
 	if (null_timespec(mtime)) {
 		return true;
 	}
 
-	if (!set_write_time(fileid, mtime, overwrite)) {
+	if (!set_sticky_write_time(fileid, mtime)) {
 		return false;
 	}
 
-	/* in the overwrite case the caller should trigger the notify */
-	if (!overwrite) {
-		notify_fname(conn, NOTIFY_ACTION_MODIFIED,
-			     FILE_NOTIFY_CHANGE_LAST_WRITE, fname);
-	}
-
 	return true;
 }
 
-bool set_write_time_fsp(struct files_struct *fsp, const struct timespec mtime,
-			bool overwrite)
+/******************************************************************
+ Force a "sticky" write time on an fsp. This will always be
+ returned on all future write time queries and set on close.
+******************************************************************/
+
+bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec mtime)
 {
-	if (overwrite) {
-		fsp->write_time_forced = true;
-		TALLOC_FREE(fsp->update_write_time_event);
+	fsp->write_time_forced = true;
+	TALLOC_FREE(fsp->update_write_time_event);
+
+	return set_sticky_write_time_path(fsp->conn, fsp->fsp_name,
+			fsp->file_id, mtime);
+}
+
+/******************************************************************
+ Update a write time immediately, without the 2 second delay.
+******************************************************************/
+
+bool update_write_time(struct files_struct *fsp)
+{
+	if (!set_write_time(fsp->file_id, timespec_current())) {
+		return false;
 	}
 
-	return set_write_time_path(fsp->conn, fsp->fsp_name, fsp->file_id,
-				   mtime, overwrite);
+	notify_fname(fsp->conn, NOTIFY_ACTION_MODIFIED,
+			FILE_NOTIFY_CHANGE_LAST_WRITE, fsp->fsp_name);
+
+	return true;
 }
diff --git a/source/smbd/fileio.c b/source/smbd/fileio.c
index 64cea7f..0958418 100644
--- a/source/smbd/fileio.c
+++ b/source/smbd/fileio.c
@@ -176,25 +176,36 @@ static void update_write_time_handler(struct event_context *ctx,
 				      const struct timeval *now,
 				      void *private_data)
 {
-       files_struct *fsp = (files_struct *)private_data;
+	files_struct *fsp = (files_struct *)private_data;
 
-       /* Remove the timed event handler. */
-       TALLOC_FREE(fsp->update_write_time_event);
-       DEBUG(5, ("Update write time on %s\n", fsp->fsp_name));
+	/* Remove the timed event handler. */
+	TALLOC_FREE(fsp->update_write_time_event);
+	DEBUG(5, ("Update write time on %s\n", fsp->fsp_name));
 
-       /* change the write time if not already changed by someoneelse */
-       set_write_time_fsp(fsp, timespec_current(), false);
+	/* change the write time if not already changed by someone else */
+	update_write_time(fsp);
 }
 
+/*********************************************************
+ Schedule a write time update for WRITE_TIME_UPDATE_USEC_DELAY
+ in the future.
+*********************************************************/
+
 void trigger_write_time_update(struct files_struct *fsp)
 {
 	int delay;
 
 	if (fsp->write_time_forced) {
+		/* No point - "sticky" write times
+		 * in effect.
+		 */
 		return;
 	}
 
 	if (fsp->update_write_time_triggered) {
+		/*
+		 * No point - an event is already scheduled.
+		 */
 		return;
 	}
 	fsp->update_write_time_triggered = true;
@@ -212,6 +223,25 @@ void trigger_write_time_update(struct files_struct *fsp)
 				update_write_time_handler, fsp);
 }
 
+void trigger_write_time_update_immediate(struct files_struct *fsp)
+{
+        if (fsp->write_time_forced) {
+		/*
+		 * No point - "sticky" write times
+		 * in effect.
+		 */
+                return;
+        }
+
+	TALLOC_FREE(fsp->update_write_time_event);
+	DEBUG(5, ("Update write time immediate on %s\n", fsp->fsp_name));
+
+	fsp->update_write_time_triggered = true;
+
+        fsp->update_write_time_on_close = false;
+	update_write_time(fsp);
+}
+
 /****************************************************************************
  Write to a file.
 ****************************************************************************/
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index b695127..567c428 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -91,14 +91,11 @@ void send_nt_replies(connection_struct *conn,
 				    + alignment_offset
 				    + data_alignment_offset);
 
-	/*
-	 * useable_space can never be more than max_send minus the
-	 * alignment offset.
-	 */
-
-	useable_space = MIN(useable_space,
-				max_send - (alignment_offset+data_alignment_offset));
-
+	if (useable_space < 0) {
+		DEBUG(0, ("send_nt_replies failed sanity useable_space "
+			  "= %d!!!", useable_space));
+		exit_server_cleanly("send_nt_replies: srv_send_smb failed.");
+	}
 
 	while (params_to_send || data_to_send) {
 
@@ -106,8 +103,7 @@ void send_nt_replies(connection_struct *conn,
 		 * Calculate whether we will totally or partially fill this packet.
 		 */
 
-		total_sent_thistime = params_to_send + data_to_send +
-					alignment_offset + data_alignment_offset;
+		total_sent_thistime = params_to_send + data_to_send;
 
 		/*
 		 * We can never send more than useable_space.
@@ -115,7 +111,9 @@ void send_nt_replies(connection_struct *conn,
 
 		total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-		reply_outbuf(req, 18, total_sent_thistime);
+		reply_outbuf(req, 18,
+			     total_sent_thistime + alignment_offset
+			     + data_alignment_offset);
 
 		/*
 		 * Set total params and data to be sent.
@@ -242,7 +240,7 @@ void send_nt_replies(connection_struct *conn,
 		if(params_to_send < 0 || data_to_send < 0) {
 			DEBUG(0,("send_nt_replies failed sanity check pts = %d, dts = %d\n!!!",
 				params_to_send, data_to_send));
-			return;
+			exit_server_cleanly("send_nt_replies: internal error");
 		}
 	}
 }
diff --git a/source/smbd/process.c b/source/smbd/process.c
index b2d19e1..c7e5c4c 100644
--- a/source/smbd/process.c
+++ b/source/smbd/process.c
@@ -152,7 +152,7 @@ static NTSTATUS read_packet_remainder(int fd, char *buffer,
 				1 /* pad byte */)
 
 static NTSTATUS receive_smb_raw_talloc_partial_read(TALLOC_CTX *mem_ctx,
-						    const char lenbuf[4],
+						    const char *lenbuf,
 						    int fd, char **buffer,
 						    unsigned int timeout,
 						    size_t *p_unread,
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index ff38ac8..3ddfad0 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -3813,9 +3813,11 @@ void reply_write(struct smb_request *req)
 			END_PROFILE(SMBwrite);
 			return;
 		}
-	} else
+		trigger_write_time_update_immediate(fsp);
+	} else {
 		nwritten = write_file(req,fsp,data,startpos,numtowrite);
-  
+	}
+
 	status = sync_file(conn, fsp, False);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(5,("reply_write: sync_file for %s returned %s\n",
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 881b29c..3c17533 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -744,14 +744,16 @@ void send_trans2_replies(connection_struct *conn,
 				    + alignment_offset
 				    + data_alignment_offset);
 
-	/* useable_space can never be more than max_send minus the alignment offset. */
-
-	useable_space = MIN(useable_space, max_send - (alignment_offset+data_alignment_offset));
+	if (useable_space < 0) {
+		DEBUG(0, ("send_trans2_replies failed sanity useable_space "
+			  "= %d!!!", useable_space));
+		exit_server_cleanly("send_trans2_replies: Not enough space");
+	}
 
 	while (params_to_send || data_to_send) {
 		/* Calculate whether we will totally or partially fill this packet */
 
-		total_sent_thistime = params_to_send + data_to_send + alignment_offset + data_alignment_offset;
+		total_sent_thistime = params_to_send + data_to_send;
 
 		/* We can never send more than useable_space */
 		/*
@@ -761,9 +763,10 @@ void send_trans2_replies(connection_struct *conn,
 		 * are sent here. Fix from Marc_Jacobsen at hp.com.
 		 */
 
-		total_sent_thistime = MIN(total_sent_thistime, useable_space+ alignment_offset + data_alignment_offset);
+		total_sent_thistime = MIN(total_sent_thistime, useable_space);
 
-		reply_outbuf(req, 10, total_sent_thistime);
+		reply_outbuf(req, 10, total_sent_thistime + alignment_offset
+			     + data_alignment_offset);
 
 		/* Set total params and data to be sent */
 		SSVAL(req->outbuf,smb_tprcnt,paramsize);
@@ -4900,11 +4903,11 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
 			  time_to_asc(convert_timespec_to_time_t(ts[1])) ));
 
 		if (fsp != NULL) {
-			set_write_time_fsp(fsp, ts[1], true);
+			set_sticky_write_time_fsp(fsp, ts[1]);
 		} else {
-			set_write_time_path(conn, fname,
+			set_sticky_write_time_path(conn, fname,
 					    vfs_file_id_from_sbuf(conn, psbuf),
-					    ts[1], true);
+					    ts[1]);
 		}
 	}
 
@@ -4988,6 +4991,7 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
 		if (vfs_set_filelen(fsp, size) == -1) {
 			return map_nt_error_from_unix(errno);
 		}
+		trigger_write_time_update_immediate(fsp);
 		return NT_STATUS_OK;
 	}
 
@@ -5011,6 +5015,7 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
 		return status;
 	}
 
+	trigger_write_time_update_immediate(new_fsp);
 	close_file(new_fsp,NORMAL_CLOSE);
 	return NT_STATUS_OK;
 }
@@ -5737,7 +5742,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
 		 * This is equivalent to a write. Ensure it's seen immediately
 		 * if there are no pending writes.
 		 */
-		trigger_write_time_update(fsp);
+		trigger_write_time_update_immediate(fsp);
 		return NT_STATUS_OK;
 	}
 
@@ -5771,7 +5776,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
 	 * This is equivalent to a write. Ensure it's seen immediately
 	 * if there are no pending writes.
 	 */
-	trigger_write_time_update(new_fsp);
+	trigger_write_time_update_immediate(new_fsp);
 
 	close_file(new_fsp,NORMAL_CLOSE);
 	return NT_STATUS_OK;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list