summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-18 15:33:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:01:53 -0500
commit80a30263aacd3ae97843a90d36f357f72c7f7f31 (patch)
tree602967ada374ddf7fe6a49fbc975c0a17e7fe3e3 /source4
parentd78ae0b646028916b59c2beeeefe9c62c1d97517 (diff)
downloadsamba-80a30263aacd3ae97843a90d36f357f72c7f7f31.tar.gz
samba-80a30263aacd3ae97843a90d36f357f72c7f7f31.tar.bz2
samba-80a30263aacd3ae97843a90d36f357f72c7f7f31.zip
r3045: Allow object-uuid@... binding strings
(This used to be commit 38e9290bcf0295fb2a68090061310a4a8cb6c490)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/torture.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 6b5d9ebd2e..8f282caf5d 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -3553,6 +3553,18 @@ static void usage(poptContext pc)
exit(1);
}
+static BOOL is_binding_string(const char *binding_string)
+{
+ TALLOC_CTX *mem_ctx = talloc_init("is_binding_string");
+ struct dcerpc_binding binding_struct;
+ NTSTATUS status;
+
+ status = dcerpc_parse_binding(mem_ctx, binding_string, &binding_struct);
+
+ talloc_destroy(mem_ctx);
+ return NT_STATUS_IS_OK(status);
+}
+
/****************************************************************************
main program
****************************************************************************/
@@ -3648,7 +3660,7 @@ static void usage(poptContext pc)
}
/* see if its a RPC transport specifier */
- if (strncmp(argv_new[1], "ncacn_", 6) == 0) {
+ if (is_binding_string(argv_new[1])) {
lp_set_cmdline("torture:binding", argv_new[1]);
} else {
char *binding = NULL;