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 | a181f49b4269baa1752ce6ed4f9093e38d2d3ce5 (patch) | |
tree | c6e939074785e8a5bf289c3e62e7b96853c87af0 /source/libsmb/cliconnect.c | |
parent | 75621d528433a9c1af3eada0b748dfbcfdb8ad62 (diff) | |
download | samba-a181f49b4269baa1752ce6ed4f9093e38d2d3ce5.tar.gz samba-a181f49b4269baa1752ce6ed4f9093e38d2d3ce5.tar.xz samba-a181f49b4269baa1752ce6ed4f9093e38d2d3ce5.zip |
handle a NULL hostname in cli_connect()
Diffstat (limited to 'source/libsmb/cliconnect.c')
-rw-r--r-- | source/libsmb/cliconnect.c | 3 |
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 */ |