From 70095b09c3cede75fdda6f52823957fab5dd980d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 11 Dec 2001 05:48:27 +0000 Subject: handle a NULL hostname in cli_connect() (This used to be commit a181f49b4269baa1752ce6ed4f9093e38d2d3ce5) --- source3/libsmb/cliconnect.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3') diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 27034b012d..fc50e8e02f 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/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 */ -- cgit