diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-11-11 23:24:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:43 -0500 |
commit | fd5135a63b4c81688c4e2d729380ca954f22286d (patch) | |
tree | 7179bf31f404359a702f94ed5db03a1a4732617c /source4/torture/rpc/xplogin.c | |
parent | 32e368502d80517dd7b00c1c3bc8b042887d9db0 (diff) | |
download | samba-fd5135a63b4c81688c4e2d729380ca954f22286d.tar.gz samba-fd5135a63b4c81688c4e2d729380ca954f22286d.tar.bz2 samba-fd5135a63b4c81688c4e2d729380ca954f22286d.zip |
r3686: The results of some work on the NETLOGON pipe:
Break out the samsync tests from RPC-NETLOGON into a new RPC-SAMSYNC,
that will cross-verify all the values.
Add support for the way netlogon credentials are shared between the
pipe that sets up schannel and the pipe that is encrypted with it.
Test this support, by calling both NETLOGON and SAMR operations in the
RPC-SCHANNEL test.
Move some of the Netlogon NEG flags into the .idl, now we have an idea
what a few of them really are.
Rename the sam_pwd_hash into a name that has meaning (all other crypto
functions were renamed in Samba4 ages ago).
Break out NTLMv2 functionality for operation on the NT hash - I intend
to do NTLMv2 logins in the samsync test in future, and naturally I
only have the hash.
Andrew Bartlett
(This used to be commit 6e6cc6fb9842113a1b0c7f6904dac709b320a6e5)
Diffstat (limited to 'source4/torture/rpc/xplogin.c')
-rw-r--r-- | source4/torture/rpc/xplogin.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/torture/rpc/xplogin.c b/source4/torture/rpc/xplogin.c index a3cca7003c..e0bb706255 100644 --- a/source4/torture/rpc/xplogin.c +++ b/source4/torture/rpc/xplogin.c @@ -1021,7 +1021,7 @@ static BOOL xp_login(const char *dcname, const char *wksname, struct smbcli_transport *transport; struct dcerpc_pipe *netlogon_pipe; - struct creds_CredentialState netlogon_creds; + struct creds_CredentialState *netlogon_creds; struct dcerpc_pipe *netlogon_schannel_pipe; @@ -1032,13 +1032,18 @@ static BOOL xp_login(const char *dcname, const char *wksname, if (mem_ctx == NULL) return False; + netlogon_creds = talloc_p(mem_ctx, struct creds_CredentialState); + if (!netlogon_creds) { + return False; + } + if (!NT_STATUS_IS_OK(after_negprot(&transport, dcname, 139, wksname))) return False; if (!NT_STATUS_IS_OK(setup_netlogon_creds(transport, &netlogon_pipe, wksname, domain, wkspwd, - &netlogon_creds))) + netlogon_creds))) return False; if (!NT_STATUS_IS_OK(test_enumtrusts(transport))) @@ -1063,13 +1068,13 @@ static BOOL xp_login(const char *dcname, const char *wksname, DCERPC_NETLOGON_UUID, DCERPC_NETLOGON_VERSION, "", "", "", - netlogon_creds.session_key); + netlogon_creds); if (!NT_STATUS_IS_OK(status)) return False; status = torture_samlogon(netlogon_schannel_pipe, - &netlogon_creds, wksname, domain, + netlogon_creds, wksname, domain, user1name, user1pw); if (!NT_STATUS_IS_OK(status)) @@ -1078,7 +1083,7 @@ static BOOL xp_login(const char *dcname, const char *wksname, talloc_free(netlogon_pipe); status = torture_samlogon(netlogon_schannel_pipe, - &netlogon_creds, wksname, domain, + netlogon_creds, wksname, domain, user2name, user2pw); if (!NT_STATUS_IS_OK(status)) |