summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 529aa0fef9..034208f3b2 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -558,7 +558,6 @@ retry:
return(True);
}
-
/****************************************************************************
open the client sockets
****************************************************************************/
@@ -580,8 +579,15 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
if (cli->port == 0) cli->port = 139; /* Set to default */
- cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip,
- cli->port, cli->timeout);
+#ifdef SMB_REGRESSION_TEST
+ if (getenv("LIBSMB_PROG")) {
+ cli->fd = sock_exec(getenv("LIBSMB_PROG"));
+ } else
+#endif
+ {
+ cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip,
+ cli->port, cli->timeout);
+ }
if (cli->fd == -1)
return False;