summaryrefslogtreecommitdiff
path: root/source4/libcli/cliconnect.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-09 13:18:31 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-09 14:46:09 +1100
commit580f955664a0bafc2258bd94d7e4e6ca049cd68a (patch)
tree94e5df56419af0569a0b601050305756fa53cbbb /source4/libcli/cliconnect.c
parent3f2415c9bf9342aeb5a70901018527ed1f109754 (diff)
downloadsamba-580f955664a0bafc2258bd94d7e4e6ca049cd68a.tar.gz
samba-580f955664a0bafc2258bd94d7e4e6ca049cd68a.tar.bz2
samba-580f955664a0bafc2258bd94d7e4e6ca049cd68a.zip
s4-torture: allow host-only in unc lists in smbtorture
Allow UNC lists like this: 192.168.2.1 192.168.2.2 192.168.2.3 the share name will be taken from the command line
Diffstat (limited to 'source4/libcli/cliconnect.c')
-rw-r--r--source4/libcli/cliconnect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 14935dadba..1a5bd607b4 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -238,13 +238,13 @@ bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
{
char *p;
- *hostname = *sharename = NULL;
-
if (strncmp(unc_name, "\\\\", 2) &&
strncmp(unc_name, "//", 2)) {
return false;
}
+ *hostname = *sharename = NULL;
+
*hostname = talloc_strdup(mem_ctx, &unc_name[2]);
p = terminate_path_at_separator(*hostname);