cleaning out patch list; patch from Steve L. to change the cwd before the postexec...
authorGerald Carter <jerry@samba.org>
Fri, 3 Oct 2003 15:11:24 +0000 (15:11 +0000)
committerGerald Carter <jerry@samba.org>
Fri, 3 Oct 2003 15:11:24 +0000 (15:11 +0000)
(This used to be commit 497e14ba19f4f637e1203d73981ea1c401a19542)

source3/smbd/service.c

index e4c3890f864610451b9aa8791741ddc14b3b510f..e5655bd9f4c23498016ee6191e637b5c2b2ff31a 100644 (file)
@@ -894,6 +894,9 @@ void close_cnum(connection_struct *conn, uint16 vuid)
        file_close_conn(conn);
        dptr_closecnum(conn);
 
+       /* make sure we leave the directory available for unmount */
+       vfs_ChDir(conn, "/");
+
        /* execute any "postexec = " line */
        if (*lp_postexec(SNUM(conn)) && 
            change_to_user(conn, vuid))  {
@@ -913,8 +916,5 @@ void close_cnum(connection_struct *conn, uint16 vuid)
                smbrun(cmd,NULL);
        }
 
-       /* make sure we leave the directory available for unmount */
-       vfs_ChDir(conn, "/");
-
        conn_free(conn);
 }