[SCM] Samba Shared Repository - branch v3-4-stable updated -
release-3-4-0rc1-21-g207ff88
Karolin Seeger
kseeger at samba.org
Thu Jul 2 09:47:47 GMT 2009
The branch, v3-4-stable has been updated
via 207ff886784db12b8c779347638a2f6f93199667 (commit)
via 9521ac831f18a3f702ab277fd65c7b27f6cad979 (commit)
from 3329658ba9f83e03de463bd9d8a751516b64ac8b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-stable
- Log -----------------------------------------------------------------
commit 207ff886784db12b8c779347638a2f6f93199667
Author: Karolin Seeger <kseeger at samba.org>
Date: Thu Jul 2 08:32:05 2009 +0200
WHATSNEW: Update changes since 3.4.0rc1.
Karolin
(cherry picked from commit d08f8595b15144513febe089f2ba0c322dba9ea9)
commit 9521ac831f18a3f702ab277fd65c7b27f6cad979
Author: Jeremy Allison <jra at samba.org>
Date: Wed Jul 1 16:58:14 2009 -0700
Fix bug #6520 time stamps - e.g. last mod time is not preserved when "unix extensions=yes" are set - and using latest cifs vfs client
Cancel out any pending "sticky" writes or "last write" changes when
doing a UNIX info level set.
Jeremy.
(cherry picked from commit b971860e01a3e616b0dd21990c054c8f8356f513)
(cherry picked from commit 3c8e5d5339ec246bca846aee48ecfba74c7d7c69)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 4 ++++
source3/smbd/trans2.c | 34 +++++++++++++++++++++++++++++++---
2 files changed, 35 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index a1ac150..0c6bd76 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -206,6 +206,10 @@ Changes since 3.4.0rc1
----------------------
+o Jeremy Allison <jra at samba.org>
+ * BUG 6520: Fix time stamps when "unix extensions = yes".
+
+
o Michael Adam <obnox at samba.org>
* BUG 6509: Use gid (not uid) cache in fetch_gid_from_cache().
* BUG 6521: Fix building tevent_ntstatus without config.h.
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 40b4701..cae13df 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4943,7 +4943,7 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
if (setting_write_time) {
/*
- * This was a setfileinfo on an open file.
+ * This was a Windows setfileinfo on an open file.
* NT does this a lot. We also need to
* set the time here, as it can be read by
* FindFirst/FindNext and with the patch for bug #2045
@@ -6044,6 +6044,9 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
NTSTATUS status = NT_STATUS_OK;
bool delete_on_fail = False;
enum perm_type ptype;
+ files_struct *all_fsps = NULL;
+ bool modify_mtime = true;
+ struct file_id id;
ZERO_STRUCT(ft);
@@ -6192,13 +6195,38 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n",
}
/* Deal with any time changes. */
+ id = vfs_file_id_from_sbuf(conn, psbuf);
+ for(all_fsps = file_find_di_first(id); all_fsps;
+ all_fsps = file_find_di_next(all_fsps)) {
+ /*
+ * We're setting the time explicitly for UNIX.
+ * Cancel any pending changes over all handles.
+ */
+ all_fsps->update_write_time_on_close = false;
+ TALLOC_FREE(all_fsps->update_write_time_event);
+ }
- return smb_set_file_time(conn,
+ /*
+ * Override the "setting_write_time"
+ * parameter here as it almost does what
+ * we need. Just remember if we modified
+ * mtime and send the notify ourselves.
+ */
+ if (null_timespec(ft.mtime)) {
+ modify_mtime = false;
+ }
+
+ status = smb_set_file_time(conn,
fsp,
fname,
psbuf,
&ft,
- true);
+ false);
+ if (modify_mtime) {
+ notify_fname(conn, NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_LAST_WRITE, fname);
+ }
+ return status;
}
/****************************************************************************
--
Samba Shared Repository
More information about the samba-cvs
mailing list