}
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;
/* 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)) {
}
static struct dd_iohandle * open_cifs_handle(const char * host,
+ const char **ports,
const char * share,
const char * path,
uint64_t io_size,
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);
}
/* ------------------------------------------------------------------------- */
struct dd_iohandle * dd_open_path(const char * path,
+ const char **ports,
uint64_t io_size,
int options)
{
/* 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));
}