[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Mon Feb 8 20:46:55 MST 2010
The branch, master has been updated
via 580f955... s4-torture: allow host-only in unc lists in smbtorture
from 3f2415c... Make "nmbd bind explicit broadcast" on by default.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 580f955664a0bafc2258bd94d7e4e6ca049cd68a
Author: Andrew Tridgell <tridge at samba.org>
Date: Tue Feb 9 13:18:31 2010 +1100
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
-----------------------------------------------------------------------
Summary of changes:
source4/libcli/cliconnect.c | 4 ++--
source4/torture/util_smb.c | 7 +++++--
2 files changed, 7 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 14935da..1a5bd60 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);
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index b35a1cb..216927c 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;
--
Samba Shared Repository
More information about the samba-cvs
mailing list