From 23c5fa1adf949e308b0082ad23135aa304335ba7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 28 Oct 2016 12:43:44 +0200 Subject: [PATCH] s3:torture: create a global 'torture_creds' cli_credentials structure Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source3/torture/torture.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source3/torture/torture.c b/source3/torture/torture.c index f31d2cc27b2..275f1d39156 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -48,6 +48,7 @@ extern char *optarg; extern int optind; fstring host, workgroup, share, password, username, myname; +struct cli_credentials *torture_creds; static const char *sockops="TCP_NODELAY"; int torture_nprocs=1; static int port_to_use=0; @@ -10793,6 +10794,20 @@ static void usage(void) printf("host=%s share=%s user=%s myname=%s\n", host, share, username, myname); + torture_creds = cli_session_creds_init(frame, + username, + workgroup, + NULL, /* realm */ + password, + use_kerberos, + false, /* fallback_after_kerberos */ + false, /* use_ccache */ + false); /* password_is_nt_hash */ + if (torture_creds == NULL) { + d_printf("cli_session_creds_init() failed.\n"); + exit(1); + } + if (argc == optind) { correct = run_test("ALL"); } else {