handle a NULL hostname in cli_connect()
authorAndrew Tridgell <tridge@samba.org>
Tue, 11 Dec 2001 05:48:27 +0000 (05:48 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 11 Dec 2001 05:48:27 +0000 (05:48 +0000)
(This used to be commit a181f49b4269baa1752ce6ed4f9093e38d2d3ce5)

source3/libsmb/cliconnect.c

index 27034b012d3de710cadb5eab6aaa56f2669ddfb7..fc50e8e02fe07445d70e7a7bf5bb09afbdb601b2 100644 (file)
@@ -978,6 +978,9 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip)
        int name_type = 0x20;
        char *p;
 
+       /* reasonable default hostname */
+       if (!host) host = "*SMBSERVER";
+
        fstrcpy(cli->desthost, host);
 
        /* allow hostnames of the form NAME#xx and do a netbios lookup */