diff options
author | Günther Deschner <gd@samba.org> | 2008-10-29 01:34:49 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-10-29 08:57:52 +0100 |
commit | 556b5bb9eead7785fe0d2cdfe465239ccb4f60b9 (patch) | |
tree | 83c639249fcf3b8c50c706093230c4bbd36b4e50 /source4/torture/rpc/netlogon.c | |
parent | 1798e9d7ec259396e9188714c1b3742f24e3ecfd (diff) | |
download | samba-556b5bb9eead7785fe0d2cdfe465239ccb4f60b9.tar.gz samba-556b5bb9eead7785fe0d2cdfe465239ccb4f60b9.tar.xz samba-556b5bb9eead7785fe0d2cdfe465239ccb4f60b9.zip |
s4-netlogon: merge netr_ServerPasswordSet from s3 idl.
Guenther
Diffstat (limited to 'source4/torture/rpc/netlogon.c')
-rw-r--r-- | source4/torture/rpc/netlogon.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 6da3eaf79d..6a63325116 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -270,6 +270,8 @@ static bool test_SetPassword(struct torture_context *tctx, struct netr_ServerPasswordSet r; const char *password; struct creds_CredentialState *creds; + struct netr_Authenticator credential, return_authenticator; + struct samr_Password new_password; if (!test_SetupCredentials(p, tctx, machine_credentials, &creds)) { return false; @@ -279,22 +281,25 @@ static bool test_SetPassword(struct torture_context *tctx, r.in.account_name = talloc_asprintf(tctx, "%s$", TEST_MACHINE_NAME); r.in.secure_channel_type = SEC_CHAN_BDC; r.in.computer_name = TEST_MACHINE_NAME; + r.in.credential = &credential; + r.in.new_password = &new_password; + r.out.return_authenticator = &return_authenticator; password = generate_random_str(tctx, 8); - E_md4hash(password, r.in.new_password.hash); + E_md4hash(password, new_password.hash); - creds_des_encrypt(creds, &r.in.new_password); + creds_des_encrypt(creds, &new_password); torture_comment(tctx, "Testing ServerPasswordSet on machine account\n"); torture_comment(tctx, "Changing machine account password to '%s'\n", password); - creds_client_authenticator(creds, &r.in.credential); + creds_client_authenticator(creds, &credential); status = dcerpc_netr_ServerPasswordSet(p, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "ServerPasswordSet"); - if (!creds_client_check(creds, &r.out.return_authenticator.cred)) { + if (!creds_client_check(creds, &r.out.return_authenticator->cred)) { torture_comment(tctx, "Credential chaining failed\n"); } @@ -307,12 +312,12 @@ static bool test_SetPassword(struct torture_context *tctx, torture_comment(tctx, "Changing machine account password to '%s' (same as previous run)\n", password); - creds_client_authenticator(creds, &r.in.credential); + creds_client_authenticator(creds, &credential); status = dcerpc_netr_ServerPasswordSet(p, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "ServerPasswordSet (2)"); - if (!creds_client_check(creds, &r.out.return_authenticator.cred)) { + if (!creds_client_check(creds, &r.out.return_authenticator->cred)) { torture_comment(tctx, "Credential chaining failed\n"); } |