From: Ira Cooper Date: Thu, 15 Jan 2015 16:41:50 +0000 (-0500) Subject: smbd: Stop using vfs_Chdir after SMB_VFS_DISCONNECT. X-Git-Tag: samba-4.2.0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=811fad364241d5553ac12402652cef2b522191f9;p=thirdparty%2Fsamba.git smbd: Stop using vfs_Chdir after SMB_VFS_DISCONNECT. This sequencing is causing problems for vfs_ceph, and likely other vfs modules. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Jan 16 00:13:17 CET 2015 on sn-devel-104 (cherry picked from commit 81464daea71e5fa3067ec7d5f5c69c890c0f7949) BUG: https://bugzilla.samba.org/show_bug.cgi?id=11115 S3: vfs_Chdir() is called after SMB_VFS_DISCONNECT in source3/smbd/service.c::close_cnum(). --- diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 3fd0fc8dab3..ada2d07aa7c 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -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)) {