The Samba-Bugzilla – Attachment 4379 Details for
Bug 6520
time stamps - e.g. last mod time is not preserved when "unix extensions=yes" are set - and using latest cifs vfs client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.3 and 3.2.
look1 (text/plain), 1.65 KB, created by
Jeremy Allison
on 2009-06-30 21:15:38 UTC
(
hide
)
Description:
Patch for 3.3 and 3.2.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-06-30 21:15:38 UTC
Size:
1.65 KB
patch
obsolete
>diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c >index 6939cef..c26087a 100644 >--- a/source/smbd/trans2.c >+++ b/source/smbd/trans2.c >@@ -4927,7 +4927,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 >@@ -5997,6 +5997,7 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn, > NTSTATUS status = NT_STATUS_OK; > bool delete_on_fail = False; > enum perm_type ptype; >+ bool modify_mtime = true; > > if (total_data < 100) { > return NT_STATUS_INVALID_PARAMETER; >@@ -6144,12 +6145,37 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", > > /* Deal with any time changes. */ > >- return smb_set_file_time(conn, >+ if (fsp) { >+ /* >+ * We're setting the time explicitly for UNIX. >+ * Cancel any pending change. >+ */ >+ fsp->update_write_time_on_close = false; >+ TALLOC_FREE(fsp->update_write_time_event); >+ } >+ >+ /* >+ * 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(ts[1])) { >+ modify_mtime = false; >+ } >+ >+ status = smb_set_file_time(conn, > fsp, > fname, > psbuf, > ts, >- true); >+ false); >+ >+ if (modify_mtime) { >+ notify_fname(conn, NOTIFY_ACTION_MODIFIED, >+ FILE_NOTIFY_CHANGE_LAST_WRITE, fname); >+ } >+ return status; > } > > /****************************************************************************
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6520
:
4369
|
4370
|
4378
|
4379
|
4384
|
4388
|
4389
|
4391