diff options
author | Jeremy Allison <jra@samba.org> | 2017-05-09 16:10:03 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-05-11 20:30:13 +0200 |
commit | b2de5a81bf2e5a79b101859c738fc057af7308ed (patch) | |
tree | 439e0d660e3ab059deb4b0108170f3a31a9a8d70 /source4/torture/krb5 | |
parent | dd4a3ce92792c4687f92d4b9e88f7bbee6cad593 (diff) | |
download | samba-b2de5a81bf2e5a79b101859c738fc057af7308ed.tar.gz |
s4: popt: Global replace of cmdline_credentials -> popt_get_cmdline_credentials().
Add one use of popt_set_cmdline_credentials().
Fix 80 column limits when cmdline_credentials changes
to popt_get_cmdline_credentials().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/torture/krb5')
-rw-r--r-- | source4/torture/krb5/kdc-canon-heimdal.c | 19 | ||||
-rw-r--r-- | source4/torture/krb5/kdc-heimdal.c | 18 | ||||
-rw-r--r-- | source4/torture/krb5/kdc-mit.c | 15 |
3 files changed, 32 insertions, 20 deletions
diff --git a/source4/torture/krb5/kdc-canon-heimdal.c b/source4/torture/krb5/kdc-canon-heimdal.c index fece17f3249..7f806e73e66 100644 --- a/source4/torture/krb5/kdc-canon-heimdal.c +++ b/source4/torture/krb5/kdc-canon-heimdal.c @@ -1423,7 +1423,8 @@ static bool torture_krb5_as_req_canon(struct torture_context *tctx, const void * int expected_principal_flags; char *got_principal_string; char *assertion_message; - const char *password = cli_credentials_get_password(cmdline_credentials); + const char *password = cli_credentials_get_password( + popt_get_cmdline_credentials()); krb5_context k5_context; struct torture_krb5_context *test_context; bool ok; @@ -1913,7 +1914,8 @@ static bool torture_krb5_as_req_canon(struct torture_context *tctx, const void * torture_assert_int_equal(tctx, k5ret, 0, assertion_message); client_to_server = data_blob_const(enc_ticket.data, enc_ticket.length); torture_assert(tctx, - test_accept_ticket(tctx, cmdline_credentials, + test_accept_ticket(tctx, + popt_get_cmdline_credentials(), expected_unparse_principal_string, client_to_server), "test_accept_ticket failed - failed to accept the ticket we just created"); @@ -2227,10 +2229,15 @@ struct torture_suite *torture_krb5_canon(TALLOC_CTX *mem_ctx) test_data->test_name = name; test_data->real_realm - = strupper_talloc(test_data, cli_credentials_get_realm(cmdline_credentials)); - test_data->real_domain = cli_credentials_get_domain(cmdline_credentials); - test_data->username = cli_credentials_get_username(cmdline_credentials); - test_data->real_username = cli_credentials_get_username(cmdline_credentials); + = strupper_talloc(test_data, + cli_credentials_get_realm( + popt_get_cmdline_credentials())); + test_data->real_domain = cli_credentials_get_domain( + popt_get_cmdline_credentials()); + test_data->username = cli_credentials_get_username( + popt_get_cmdline_credentials()); + test_data->real_username = cli_credentials_get_username( + popt_get_cmdline_credentials()); test_data->canonicalize = (i & TEST_CANONICALIZE) != 0; test_data->enterprise = (i & TEST_ENTERPRISE) != 0; test_data->upper_realm = (i & TEST_UPPER_REALM) != 0; diff --git a/source4/torture/krb5/kdc-heimdal.c b/source4/torture/krb5/kdc-heimdal.c index 2cf972cea6f..7d5a16702c3 100644 --- a/source4/torture/krb5/kdc-heimdal.c +++ b/source4/torture/krb5/kdc-heimdal.c @@ -643,7 +643,8 @@ static bool torture_krb5_as_req_creds(struct torture_context *tctx, static bool torture_krb5_as_req_cmdline(struct torture_context *tctx) { - return torture_krb5_as_req_creds(tctx, cmdline_credentials, TORTURE_KRB5_TEST_PLAIN); + return torture_krb5_as_req_creds(tctx, popt_get_cmdline_credentials(), + TORTURE_KRB5_TEST_PLAIN); } static bool torture_krb5_as_req_pac_request(struct torture_context *tctx) @@ -651,37 +652,40 @@ static bool torture_krb5_as_req_pac_request(struct torture_context *tctx) if (torture_setting_bool(tctx, "expect_rodc", false)) { torture_skip(tctx, "This test needs further investigation in the RODC case against a Windows DC, in particular with non-cached users"); } - return torture_krb5_as_req_creds(tctx, cmdline_credentials, TORTURE_KRB5_TEST_PAC_REQUEST); + return torture_krb5_as_req_creds(tctx, popt_get_cmdline_credentials(), + TORTURE_KRB5_TEST_PAC_REQUEST); } static bool torture_krb5_as_req_break_pw(struct torture_context *tctx) { - return torture_krb5_as_req_creds(tctx, cmdline_credentials, TORTURE_KRB5_TEST_BREAK_PW); + return torture_krb5_as_req_creds(tctx, popt_get_cmdline_credentials(), + TORTURE_KRB5_TEST_BREAK_PW); } static bool torture_krb5_as_req_clock_skew(struct torture_context *tctx) { - return torture_krb5_as_req_creds(tctx, cmdline_credentials, TORTURE_KRB5_TEST_CLOCK_SKEW); + return torture_krb5_as_req_creds(tctx, popt_get_cmdline_credentials(), + TORTURE_KRB5_TEST_CLOCK_SKEW); } static bool torture_krb5_as_req_aes(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_AES); } static bool torture_krb5_as_req_rc4(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_RC4); } static bool torture_krb5_as_req_aes_rc4(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_AES_RC4); } diff --git a/source4/torture/krb5/kdc-mit.c b/source4/torture/krb5/kdc-mit.c index 77fa8c34a95..ba97137cd74 100644 --- a/source4/torture/krb5/kdc-mit.c +++ b/source4/torture/krb5/kdc-mit.c @@ -691,7 +691,7 @@ static bool torture_krb5_as_req_creds(struct torture_context *tctx, static bool torture_krb5_as_req_cmdline(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_PLAIN); } @@ -707,42 +707,43 @@ static bool torture_krb5_as_req_pac_request(struct torture_context *tctx) "RODC case against a Windows DC, in particular " "with non-cached users"); } - return torture_krb5_as_req_creds(tctx, cmdline_credentials, TORTURE_KRB5_TEST_PAC_REQUEST); + return torture_krb5_as_req_creds(tctx, popt_get_cmdline_credentials(), + TORTURE_KRB5_TEST_PAC_REQUEST); } #endif /* HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST */ static bool torture_krb5_as_req_break_pw(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_BREAK_PW); } static bool torture_krb5_as_req_clock_skew(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_CLOCK_SKEW); } static bool torture_krb5_as_req_aes(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_AES); } static bool torture_krb5_as_req_rc4(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_RC4); } static bool torture_krb5_as_req_aes_rc4(struct torture_context *tctx) { return torture_krb5_as_req_creds(tctx, - cmdline_credentials, + popt_get_cmdline_credentials(), TORTURE_KRB5_TEST_AES_RC4); } |