summaryrefslogtreecommitdiff
path: root/source3/libsmb
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
commit70095b09c3cede75fdda6f52823957fab5dd980d (patch)
tree6829056d748ba77f69cd9469a1af63def3cd19d7 /source3/libsmb
parent6939dd050bdfc85fa632272594b2076f87b58760 (diff)
downloadsamba-70095b09c3cede75fdda6f52823957fab5dd980d.tar.gz
samba-70095b09c3cede75fdda6f52823957fab5dd980d.tar.bz2
samba-70095b09c3cede75fdda6f52823957fab5dd980d.zip
handle a NULL hostname in cli_connect()
(This used to be commit a181f49b4269baa1752ce6ed4f9093e38d2d3ce5)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c3
1 files changed, 3 insertions, 0 deletions
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 */