summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-11 05:48:27 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-11 05:48:27 +0000
commita181f49b4269baa1752ce6ed4f9093e38d2d3ce5 (patch)
treec6e939074785e8a5bf289c3e62e7b96853c87af0
parent75621d528433a9c1af3eada0b748dfbcfdb8ad62 (diff)
downloadsamba-a181f49b4269baa1752ce6ed4f9093e38d2d3ce5.tar.gz
samba-a181f49b4269baa1752ce6ed4f9093e38d2d3ce5.tar.xz
samba-a181f49b4269baa1752ce6ed4f9093e38d2d3ce5.zip
handle a NULL hostname in cli_connect()
-rw-r--r--source/libsmb/cliconnect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 27034b012d3..fc50e8e02fe 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -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 */