summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/scanner.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-01 23:01:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:24 -0500
commitc125a7c5a7aee1b0506ab4eddbb4868ca8411fba (patch)
treec7ba922440981ed7ca8c9f1975584a5dafe1b076 /source4/torture/rpc/scanner.c
parent132ddb1f4669eced6b9f2ef81bc141143ae7e6ed (diff)
downloadsamba-c125a7c5a7aee1b0506ab4eddbb4868ca8411fba.tar.gz
samba-c125a7c5a7aee1b0506ab4eddbb4868ca8411fba.tar.bz2
samba-c125a7c5a7aee1b0506ab4eddbb4868ca8411fba.zip
r24872: Use torture API a bit more
(This used to be commit a71355dfc933d4273d81e7b05a28197ca86e0cc6)
Diffstat (limited to 'source4/torture/rpc/scanner.c')
-rw-r--r--source4/torture/rpc/scanner.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index e8203061e7..e1d7c69676 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -97,21 +97,18 @@ bool torture_rpc_scanner(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
- TALLOC_CTX *mem_ctx, *loop_ctx;
+ TALLOC_CTX *loop_ctx;
BOOL ret = True;
const struct ndr_interface_list *l;
struct dcerpc_binding *b;
- mem_ctx = talloc_init("torture_rpc_scanner");
-
status = torture_rpc_binding(torture, &b);
if (!NT_STATUS_IS_OK(status)) {
- talloc_free(mem_ctx);
- return False;
+ return false;
}
for (l=ndr_table_list();l;l=l->next) {
- loop_ctx = talloc_named(mem_ctx, 0, "torture_rpc_scanner loop context");
+ loop_ctx = talloc_named(torture, 0, "torture_rpc_scanner loop context");
/* some interfaces are not mappable */
if (l->table->num_calls == 0 ||
strcmp(l->table->name, "mgmt") == 0) {
@@ -122,7 +119,7 @@ bool torture_rpc_scanner(struct torture_context *torture)
printf("\nTesting pipe '%s'\n", l->table->name);
if (b->transport == NCACN_IP_TCP) {
- status = dcerpc_epm_map_binding(mem_ctx, b, l->table, NULL);
+ status = dcerpc_epm_map_binding(torture, b, l->table, NULL);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to map port for uuid %s\n",
GUID_string(loop_ctx, &l->table->syntax_id.uuid));
@@ -133,7 +130,7 @@ bool torture_rpc_scanner(struct torture_context *torture)
b->endpoint = talloc_strdup(b, l->table->name);
}
- lp_set_cmdline("torture:binding", dcerpc_binding_string(mem_ctx, b));
+ lp_set_cmdline("torture:binding", dcerpc_binding_string(torture, b));
status = torture_rpc_connection(torture, &p, &ndr_table_mgmt);
if (!NT_STATUS_IS_OK(status)) {
@@ -142,7 +139,7 @@ bool torture_rpc_scanner(struct torture_context *torture)
continue;
}
- if (!test_inq_if_ids(torture, p, mem_ctx, test_num_calls, l->table)) {
+ if (!test_inq_if_ids(torture, p, torture, test_num_calls, l->table)) {
ret = False;
}
}