]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
modified cli_connect_serverlist to take server list of format
authorLuke Leighton <lkcl@samba.org>
Sat, 27 Nov 1999 22:14:37 +0000 (22:14 +0000)
committerLuke Leighton <lkcl@samba.org>
Sat, 27 Nov 1999 22:14:37 +0000 (22:14 +0000)
\\server_name \\other_server etc.
(This used to be commit 4fd4aeb57455792bd8eaf81f8fa45bca6bd3e2e2)

source3/libsmb/clientgen.c

index 94cd89e3429f42e5a5390fe972d56937411efa38..06fa97df0c983870cf062987a599d7d27e90e840 100644 (file)
@@ -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))