Remove unused make_connection_with_chdir()
authorVolker Lendecke <vl@samba.org>
Sun, 23 Nov 2008 22:14:39 +0000 (23:14 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 24 Nov 2008 10:39:03 +0000 (11:39 +0100)
source3/include/proto.h
source3/smbd/service.c

index 853d827f2b39c93c8d60ba72f80d9a38bc8565f2..605066f763805233881a64dcd46f14c1e55bd53e 100644 (file)
@@ -8422,10 +8422,6 @@ bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir);
 void load_registry_shares(void);
 int add_home_service(const char *service, const char *username, const char *homedir);
 int find_service(fstring service);
-connection_struct *make_connection_with_chdir(const char *service_in,
-                                             DATA_BLOB password, 
-                                             const char *dev, uint16 vuid,
-                                             NTSTATUS *status);
 connection_struct *make_connection(const char *service_in, DATA_BLOB password, 
                                   const char *pdev, uint16 vuid,
                                   NTSTATUS *status);
index 05197021a3242d1186e1a4e7f70f630c28261025..0dea615fb58026f60a1e1e267939b7cfe1dc3f8c 100644 (file)
@@ -1123,38 +1123,6 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
        return NULL;
 }
 
-/***************************************************************************************
- Simple wrapper function for make_connection() to include a call to 
- vfs_chdir()
- **************************************************************************************/
-connection_struct *make_connection_with_chdir(const char *service_in,
-                                             DATA_BLOB password, 
-                                             const char *dev, uint16 vuid,
-                                             NTSTATUS *status)
-{
-       connection_struct *conn = NULL;
-       
-       conn = make_connection(service_in, password, dev, vuid, status);
-       
-       /*
-        * make_connection() does not change the directory for us any more
-        * so we have to do it as a separate step  --jerry
-        */
-        
-       if ( conn && vfs_ChDir(conn,conn->connectpath) != 0 ) {
-               DEBUG(0,("make_connection_with_chdir: Can't change "
-                        "directory to %s for [print$] (%s)\n",
-                        conn->connectpath,strerror(errno)));
-               yield_connection(conn, lp_servicename(SNUM(conn)));
-               conn_free(conn);
-               *status = NT_STATUS_UNSUCCESSFUL;
-               return NULL;
-       }
-       
-       return conn;
-}
-
 /****************************************************************************
  Make a connection to a service.
  *