s4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_scanner()
authorStefan Metzmacher <metze@samba.org>
Thu, 30 Jan 2014 18:08:07 +0000 (19:08 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 13 Feb 2014 10:54:17 +0000 (11:54 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/torture/rpc/scanner.c

index e910bddedc504826a76376b2003fc38417117f4d..261c3b91d0983b8c00279733032f7e65b12c7924 100644 (file)
@@ -152,7 +152,20 @@ bool torture_rpc_scanner(struct torture_context *torture)
                                continue;
                        }
                } else {
-                       b->endpoint = talloc_strdup(b, l->table->name);
+                       status = dcerpc_binding_set_string_option(b, "endpoint",
+                                                                 l->table->name);
+                       if (!NT_STATUS_IS_OK(status)) {
+                               talloc_free(loop_ctx);
+                               ret = false;
+                               continue;
+                       }
+                       status = dcerpc_binding_set_abstract_syntax(b,
+                                                       &l->table->syntax_id);
+                       if (!NT_STATUS_IS_OK(status)) {
+                               talloc_free(loop_ctx);
+                               ret = false;
+                               continue;
+                       }
                }
 
                lpcfg_set_cmdline(torture->lp_ctx, "torture:binding", dcerpc_binding_string(torture, b));