summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-27 18:10:56 +0000
committerGerald Carter <jerry@samba.org>2002-06-27 18:10:56 +0000
commita9093a1b5819d74e6dc21c413dc84f8fd3f181dc (patch)
tree52ffa375215d830a733bddbd22dbfc6b460a43a3 /source3/smbd
parent551a4cd89596b7f12d23a878d65361197b20a58f (diff)
downloadsamba-a9093a1b5819d74e6dc21c413dc84f8fd3f181dc.tar.gz
samba-a9093a1b5819d74e6dc21c413dc84f8fd3f181dc.tar.bz2
samba-a9093a1b5819d74e6dc21c413dc84f8fd3f181dc.zip
It's fairly obvious that no one has tried to upload a driver
to a Samba print server running HEAD in a while. This has been broken since tridge's changes to make_connection() to not do the chdir() to the connect_path. Sorry it took me so long to get around to fixing it. The problem occured with our internal use of make_connection(). jerry (This used to be commit b5bc8aa0f68ceebfb5c0ec15ff93b0172cec36d8)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/service.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index caf1cef17a..590e4cedfc 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -704,6 +704,34 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
return(conn);
}
+/***************************************************************************************
+ 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,
+ 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 (vfs_ChDir(conn,conn->connectpath) != 0) {
+ DEBUG(0,("move_driver_to_download_area: Can't change directory to %s for [print$] (%s)\n",
+ conn->connectpath,strerror(errno)));
+ yield_connection(conn, lp_servicename(SNUM(conn)));
+ conn_free(conn);
+ return NULL;
+ }
+
+ return conn;
+}
+
/****************************************************************************
Make a connection to a service.
*