diff options
author | Günther Deschner <gd@samba.org> | 2007-12-04 09:41:28 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:08 +0100 |
commit | 96b46e99072f0c31ade85a5fa539cafc021fb42c (patch) | |
tree | c0b15cbdb0a75a7e0af5d83fcadc53c4b21a78f2 /source4/torture | |
parent | 19b00d57f4ea0826bce1b615f23f6e182fdd14af (diff) | |
download | samba-96b46e99072f0c31ade85a5fa539cafc021fb42c.tar.gz samba-96b46e99072f0c31ade85a5fa539cafc021fb42c.tar.bz2 samba-96b46e99072f0c31ade85a5fa539cafc021fb42c.zip |
r26285: Add IDL and torture test for netr_ServerPasswordGet().
Guenther
(This used to be commit d64244cfe871cd549a991ac2a708263fc77d2fef)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/netlogon.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 92fd27b8ce..c0b26e0d87 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -438,6 +438,36 @@ static bool test_SetPassword2(struct torture_context *tctx, return true; } +static bool test_GetPassword(struct torture_context *tctx, + struct dcerpc_pipe *p, + struct cli_credentials *machine_credentials) +{ + struct netr_ServerPasswordGet r; + struct creds_CredentialState *creds; + struct netr_Authenticator credential; + NTSTATUS status; + struct netr_Authenticator return_authenticator; + struct samr_Password password; + + if (!test_SetupCredentials(p, tctx, machine_credentials, &creds)) { + return false; + } + + creds_client_authenticator(creds, &credential); + + r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); + 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.out.return_authenticator = &return_authenticator; + r.out.password = &password; + + status = dcerpc_netr_ServerPasswordGet(p, tctx, &r); + torture_assert_ntstatus_ok(tctx, status, "ServerPasswordGet"); + + return true; +} /* try a netlogon SamLogon */ |