From 80a30263aacd3ae97843a90d36f357f72c7f7f31 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Oct 2004 15:33:34 +0000 Subject: r3045: Allow object-uuid@... binding strings (This used to be commit 38e9290bcf0295fb2a68090061310a4a8cb6c490) --- source4/torture/torture.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source4') 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; -- cgit