[Pkg-samba-maint] [samba] 125/135: smbd - allow updates on directory write times on open handles.

Ivo De Decker ivodd at moszumanska.debian.org
Sat Jan 11 21:30:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

ivodd pushed a commit to branch master
in repository samba.

commit c9b6d8cb5534512ade2ee5e731dddcac9832bbe3
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Dec 3 17:22:19 2013 -0800

    smbd - allow updates on directory write times on open handles.
    
    If we set a non-null 'old timestamp' in the share mode database
    when creating a directory handle, this prevents mtime (write time)
    updates from being seen by clients, as we will always return the
    timestamp stored in the database whilst the handle is open.
    
    For files this is ok, as we update the stored timestamp
    ourselves when we write to the handle. For directories
    we should just rely on the mtime value from the underlying
    filesystem.
    
    Torture test to follow.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=9870
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
---
 source3/smbd/open.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index cd1bb72..6e4f690 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3171,7 +3171,14 @@ static NTSTATUS open_directory(connection_struct *conn,
 		return status;
 	}
 
-	mtimespec = smb_dname->st.st_ex_mtime;
+	/* Don't store old timestamps for directory
+	   handles in the internal database. We don't
+	   update them in there if new objects
+	   are creaded in the directory. Currently
+	   we only update timestamps on file writes.
+	   See bug #9870.
+	*/
+	ZERO_STRUCT(mtimespec);
 
 #ifdef O_DIRECTORY
 	status = fd_open(conn, fsp, O_RDONLY|O_DIRECTORY, 0);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list