diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-01-26 01:55:52 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2014-02-11 16:20:31 +0100 |
commit | e977884b9bbaebd13fd2ab64fa452b942073d025 (patch) | |
tree | 428b8e743fb3bfb4ec80cc4179aeea31f49ea7b0 /source4/torture/smbtorture.c | |
parent | cd4ae0f7f3d810a44afd184e08c95a89fa35e80c (diff) | |
download | samba-e977884b9bbaebd13fd2ab64fa452b942073d025.tar.gz |
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>
Diffstat (limited to 'source4/torture/smbtorture.c')
-rw-r--r-- | source4/torture/smbtorture.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index cb0be97cafa..fd5315d20ce 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -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); |