summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-27 22:14:37 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-27 22:14:37 +0000
commitb9b04afc354edc56c9dad8a861b4e4c8854e3d8e (patch)
treef8fc6487e648541b27477cb9d4d3e0e7978769fc
parent3fc5ec73be6009d50ec1e8e83505572ad16c1943 (diff)
downloadsamba-b9b04afc354edc56c9dad8a861b4e4c8854e3d8e.tar.gz
samba-b9b04afc354edc56c9dad8a861b4e4c8854e3d8e.tar.bz2
samba-b9b04afc354edc56c9dad8a861b4e4c8854e3d8e.zip
modified cli_connect_serverlist to take server list of format
\\server_name \\other_server etc. (This used to be commit 4fd4aeb57455792bd8eaf81f8fa45bca6bd3e2e2)
-rw-r--r--source3/libsmb/clientgen.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 94cd89e342..06fa97df0c 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -3360,6 +3360,7 @@ BOOL cli_connect_serverlist(struct cli_state *cli, char *p)
extern pstring global_myname;
extern pstring scope;
fstring remote_machine;
+ fstring desthost;
struct in_addr dest_ip;
struct nmb_name calling, called, stupid_smbserver_called;
BOOL connected_ok = False;
@@ -3382,7 +3383,7 @@ BOOL cli_connect_serverlist(struct cli_state *cli, char *p)
standard_sub_basic(remote_machine);
strupper(remote_machine);
- if (!resolve_name( remote_machine, &dest_ip, 0x20))
+ if (!resolve_srv_name( remote_machine, desthost, &dest_ip))
{
DEBUG(1,("cli_connect_serverlist: Can't resolve address for %s\n", remote_machine));
continue;
@@ -3394,8 +3395,8 @@ BOOL cli_connect_serverlist(struct cli_state *cli, char *p)
continue;
}
- make_nmb_name(&calling, global_myname , 0x0 , scope);
- make_nmb_name(&called , remote_machine, 0x20, scope);
+ make_nmb_name(&calling, global_myname, 0x0 , scope);
+ make_nmb_name(&called , desthost , 0x20, scope);
/* stupid microsoft destruction of the ability of netbios
* to provide multiple netbios servers on one host.
*/
@@ -3403,11 +3404,11 @@ BOOL cli_connect_serverlist(struct cli_state *cli, char *p)
pwd_set_nullpwd(&cli->usr.pwd);
- if (!cli_establish_connection(cli, remote_machine, &dest_ip,
+ if (!cli_establish_connection(cli, desthost, &dest_ip,
&calling, &called,
"IPC$", "IPC",
False, True) &&
- !cli_establish_connection(cli, remote_machine, &dest_ip,
+ !cli_establish_connection(cli, desthost, &dest_ip,
&calling, &stupid_smbserver_called,
"IPC$", "IPC",
False, True))