diff options
| author | Andrew Tridgell <tridge@samba.org> | 2001-12-11 05:48:27 +0000 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2001-12-11 05:48:27 +0000 |
| commit | 70095b09c3cede75fdda6f52823957fab5dd980d (patch) | |
| tree | 6829056d748ba77f69cd9469a1af63def3cd19d7 /source3 | |
| parent | 6939dd050bdfc85fa632272594b2076f87b58760 (diff) | |
| download | samba-70095b09c3cede75fdda6f52823957fab5dd980d.tar.gz samba-70095b09c3cede75fdda6f52823957fab5dd980d.tar.xz samba-70095b09c3cede75fdda6f52823957fab5dd980d.zip | |
handle a NULL hostname in cli_connect()
(This used to be commit a181f49b4269baa1752ce6ed4f9093e38d2d3ce5)
Diffstat (limited to 'source3')
| -rw-r--r-- | source3/libsmb/cliconnect.c | 3 |
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 */ |
