summaryrefslogtreecommitdiff
path: root/source4/client/cifsddio.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-12 02:15:29 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:42 +0100
commit4b0199a5493ea2b88558cc40871e63c1dc8dbb56 (patch)
tree684450d46a7787e2f3a2a1b20ac0488c1ca8e94f /source4/client/cifsddio.c
parent33582dffcc2d348dc042edfdcccee7500b21d928 (diff)
downloadsamba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.tar.gz
samba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.tar.bz2
samba-4b0199a5493ea2b88558cc40871e63c1dc8dbb56.zip
r26409: Pass smb ports along.
(This used to be commit 2833f320de1f1fd39c710ad0a61c3fa1bb1df31f)
Diffstat (limited to 'source4/client/cifsddio.c')
-rw-r--r--source4/client/cifsddio.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/client/cifsddio.c b/source4/client/cifsddio.c
index 5cea8cf305..c30bf53196 100644
--- a/source4/client/cifsddio.c
+++ b/source4/client/cifsddio.c
@@ -221,7 +221,8 @@ static bool smb_write_func(void * handle, uint8_t * buf, uint64_t wanted,
}
static struct smbcli_state * init_smb_session(const char * host,
- const char * share)
+ const char **ports,
+ const char * share)
{
NTSTATUS ret;
struct smbcli_state * cli = NULL;
@@ -229,7 +230,7 @@ static struct smbcli_state * init_smb_session(const char * host,
/* When we support SMB URLs, we can get different user credentials for
* each connection, but for now, we just use the same one for both.
*/
- ret = smbcli_full_connection(NULL, &cli, host, share,
+ ret = smbcli_full_connection(NULL, &cli, host, ports, share,
NULL /* devtype */, cmdline_credentials, NULL /* events */);
if (!NT_STATUS_IS_OK(ret)) {
@@ -289,6 +290,7 @@ static int open_smb_file(struct smbcli_state * cli,
}
static struct dd_iohandle * open_cifs_handle(const char * host,
+ const char **ports,
const char * share,
const char * path,
uint64_t io_size,
@@ -312,7 +314,7 @@ static struct dd_iohandle * open_cifs_handle(const char * host,
smbh->h.io_write = smb_write_func;
smbh->h.io_seek = smb_seek_func;
- if ((smbh->cli = init_smb_session(host, share)) == NULL) {
+ if ((smbh->cli = init_smb_session(host, ports, share)) == NULL) {
return(NULL);
}
@@ -328,6 +330,7 @@ static struct dd_iohandle * open_cifs_handle(const char * host,
/* ------------------------------------------------------------------------- */
struct dd_iohandle * dd_open_path(const char * path,
+ const char **ports,
uint64_t io_size,
int options)
{
@@ -344,7 +347,7 @@ struct dd_iohandle * dd_open_path(const char * path,
/* Skip over leading directory separators. */
while (*remain == '/' || *remain == '\\') { remain++; }
- return(open_cifs_handle(host, share, remain,
+ return(open_cifs_handle(host, ports, share, remain,
io_size, options));
}