smbd: Stop using vfs_Chdir after SMB_VFS_DISCONNECT.
authorIra Cooper <ira@samba.org>
Thu, 15 Jan 2015 16:41:50 +0000 (11:41 -0500)
committerJeremy Allison <jra@samba.org>
Thu, 15 Jan 2015 23:13:17 +0000 (00:13 +0100)
This sequencing is causing problems for vfs_ceph, and likely
other vfs modules.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 16 00:13:17 CET 2015 on sn-devel-104

source3/smbd/service.c

index 3fd0fc8dab3f4c04070d4566a201286b86e7dd73..ada2d07aa7c48bf6f7164a5ddde1f7fed6e578c7 100644 (file)
@@ -1133,12 +1133,12 @@ void close_cnum(connection_struct *conn, uint64_t vuid)
                                                        talloc_tos()),
                                 lp_servicename(talloc_tos(), SNUM(conn))));
 
-       /* Call VFS disconnect hook */    
-       SMB_VFS_DISCONNECT(conn);
-
        /* make sure we leave the directory available for unmount */
        vfs_ChDir(conn, "/");
 
+       /* Call VFS disconnect hook */
+       SMB_VFS_DISCONNECT(conn);
+
        /* execute any "postexec = " line */
        if (*lp_postexec(talloc_tos(), SNUM(conn)) &&
            change_to_user(conn, vuid))  {