printf("Target share: %s\n", share ? share : "");
printf("Target binding: %s\n", binding ? binding : "");
} else if (argc == 1) {
- torture_parse_target(tctx->lp_ctx, argv[0]);
+ torture_parse_target(tctx, tctx->lp_ctx, argv[0]);
} else {
shell_usage(command);
}
return ret;
}
-bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target)
+bool torture_parse_target(TALLOC_CTX *ctx,
+ struct loadparm_context *lp_ctx,
+ const char *target)
{
char *host = NULL, *share = NULL;
struct dcerpc_binding *binding_struct;
if (!smbcli_parse_unc(target, NULL, &host, &share)) {
const char *h;
- status = dcerpc_parse_binding(talloc_autofree_context(), target, &binding_struct);
+ status = dcerpc_parse_binding(ctx, target, &binding_struct);
if (NT_STATUS_IS_ERR(status)) {
d_printf("Invalid option: %s is not a valid torture target (share or binding string)\n\n", target);
return false;
printf("You must specify a test to run, or 'ALL'\n");
usage(pc);
torture->results->returncode = 1;
- } else if (!torture_parse_target(cmdline_lp_ctx, argv_new[1])) {
- /* Take the target name or binding. */
+ } else if (!torture_parse_target(torture,
+ cmdline_lp_ctx, argv_new[1])) {
+ /* Take the target name or binding. */
usage(pc);
torture->results->returncode = 1;
} else {
void torture_print_testsuites(bool structured);
bool torture_run_named_tests(struct torture_context *torture, const char *name,
const char **restricted);
-bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target);
+bool torture_parse_target(TALLOC_CTX *ctx,
+ struct loadparm_context *lp_ctx,
+ const char *target);
/* Server Functionality Support */