From 511896d08aa5f3a85699a4ed61540f2c614a0778 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 26 Apr 2013 10:47:41 -0700 Subject: [PATCH] Fix bug #9822 - Samba crashing during Win8 sync. When refactoring the dptr desctructor in the fix for bug: 9778 (Samba directory code uses dirfd() without vectoring through a VFS call) I removed the code to NULL out the struct smb_Dir * pointer inside the fsp struct by mistake. Re-add the NULLing out of that pointer when closing a directory pointer associated with an open file. Reporter confirms it fixes the crash. Signed-off-by: Jeremy Allison Reviewed-by: David Disseldorp Autobuild-User(master): David Disseldorp Autobuild-Date(master): Sat Apr 27 20:44:55 CEST 2013 on sn-devel-104 (cherry picked from commit 251767cde9a146d8122d76e257ab232c05ad452a) (cherry picked from commit fe51e23801b24af43ce605f51f3e607fae74d3b7) --- source3/smbd/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index fe643ade8aa..e6c81064c58 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -598,6 +598,7 @@ void dptr_CloseDir(files_struct *fsp) * all resource deallocation. */ dptr_close_internal(fsp->dptr); + fsp->dptr = NULL; } } -- 2.11.4.GIT