diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-09 13:18:31 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-09 14:46:09 +1100 |
commit | 580f955664a0bafc2258bd94d7e4e6ca049cd68a (patch) | |
tree | 94e5df56419af0569a0b601050305756fa53cbbb /source4/torture | |
parent | 3f2415c9bf9342aeb5a70901018527ed1f109754 (diff) | |
download | samba-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/torture')
-rw-r--r-- | source4/torture/util_smb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c index b35a1cb207..216927ce70 100644 --- a/source4/torture/util_smb.c +++ b/source4/torture/util_smb.c @@ -548,8 +548,11 @@ _PUBLIC_ bool torture_get_conn_index(int conn_index, return false; } - if (!smbcli_parse_unc(unc_list[conn_index % num_unc_names], - mem_ctx, host, share)) { + p = unc_list[conn_index % num_unc_names]; + if (p[0] != '/' && p[0] != '\\') { + /* allow UNC lists of hosts */ + (*host) = talloc_strdup(mem_ctx, p); + } else if (!smbcli_parse_unc(p, mem_ctx, host, share)) { DEBUG(0, ("Failed to parse UNC name %s\n", unc_list[conn_index % num_unc_names])); return false; |