diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-08-02 10:08:54 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-08-10 09:18:59 +0200 |
commit | 2ea3a24dced0814100e352bbbca124011be73602 (patch) | |
tree | 8a1c34c43a72d296d20676b36bc0854489377683 /source4/torture/rpc/samr.c | |
parent | c0144273af8f0956a05d102113c40cec77069f7a (diff) | |
download | samba-2ea3a24dced0814100e352bbbca124011be73602.tar.gz samba-2ea3a24dced0814100e352bbbca124011be73602.tar.xz samba-2ea3a24dced0814100e352bbbca124011be73602.zip |
s4:torture: avoid usage of dcerpc_schannel_creds()
We use cli_credentials_get_netlogon_creds() which returns the same value.
dcerpc_schannel_creds() is a layer violation.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/torture/rpc/samr.c')
-rw-r--r-- | source4/torture/rpc/samr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index a0a5f1a6863..a06529348e5 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -37,7 +37,6 @@ #include "torture/rpc/torture_rpc.h" #include "param/param.h" #include "auth/gensec/gensec.h" -#include "auth/gensec/schannel.h" #include "auth/gensec/gensec_proto.h" #include "../libcli/auth/schannel.h" @@ -2953,6 +2952,7 @@ static bool test_QueryUserInfo_pwdlastset(struct dcerpc_binding_handle *b, static bool test_SamLogon(struct torture_context *tctx, struct dcerpc_pipe *p, + struct cli_credentials *machine_credentials, struct cli_credentials *test_credentials, NTSTATUS expected_result, bool interactive) @@ -2972,7 +2972,7 @@ static bool test_SamLogon(struct torture_context *tctx, struct netr_Authenticator a; struct dcerpc_binding_handle *b = p->binding_handle; - torture_assert_ntstatus_ok(tctx, dcerpc_schannel_creds(p->conn->security_state.generic_state, tctx, &creds), ""); + torture_assert(tctx, (creds = cli_credentials_get_netlogon_creds(machine_credentials)), ""); if (lpcfg_client_lanman_auth(tctx->lp_ctx)) { flags |= CLI_CRED_LANMAN_AUTH; @@ -3099,7 +3099,7 @@ static bool test_SamLogon_with_creds(struct torture_context *tctx, torture_comment(tctx, "Testing samlogon (%s) as %s password: %s\n", interactive ? "interactive" : "network", acct_name, password); - if (!test_SamLogon(tctx, p, test_credentials, + if (!test_SamLogon(tctx, p, machine_creds, test_credentials, expected_samlogon_result, interactive)) { torture_warning(tctx, "new password did not work\n"); ret = false; |