1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s4:torture: handle binding_struct->host == NULL in torture_parse_target()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-01-26 01:55:52 +01:00 committed by Günther Deschner
parent cd4ae0f7f3
commit e977884b9b

View File

@ -163,7 +163,9 @@ bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target)
d_printf("Invalid option: %s is not a valid torture target (share or binding string)\n\n", target);
return false;
}
lpcfg_set_cmdline(lp_ctx, "torture:host", binding_struct->host);
if (binding_struct->host != NULL) {
lpcfg_set_cmdline(lp_ctx, "torture:host", binding_struct->host);
}
if (lpcfg_parm_string(lp_ctx, NULL, "torture", "share") == NULL)
lpcfg_set_cmdline(lp_ctx, "torture:share", "IPC$");
lpcfg_set_cmdline(lp_ctx, "torture:binding", target);