summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-06-14 12:06:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:40 -0500
commit7ae1735798250a7625dfd8d005c08cc8302f400f (patch)
tree2a9cbd64764453a8399b47c03fcb2f0c6d476e08 /source4/torture/rpc
parent19f3bfc0ac317cfd3320187d957972ab3fbd3cad (diff)
downloadsamba-7ae1735798250a7625dfd8d005c08cc8302f400f.tar.gz
samba-7ae1735798250a7625dfd8d005c08cc8302f400f.tar.bz2
samba-7ae1735798250a7625dfd8d005c08cc8302f400f.zip
r1141: - consolidated the netr_SamInfo structures using a netr_SamBaseInfo
structure (andrew, this is the type of structure consolidation I think you were asking about. It's possible here in NDR as it isn't in the top level fn code) - added validation level 6 in sam logon With these changes I can successfully authentication smbclient to a winxp server, with the winxp server using a Samba4 ADS DC for account auth (This used to be commit 705205083a6e2430c420f44436a1d1ff8826bc73)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/netlogon.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 55d60871b6..c334651d46 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -377,58 +377,58 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
if (r->in.validation_level == 2) {
static const char zeros[16];
- if (memcmp(r->out.validation.sam2->key.key, zeros,
- sizeof(r->out.validation.sam2->key.key)) != 0) {
+ if (memcmp(r->out.validation.sam2->base.key.key, zeros,
+ sizeof(r->out.validation.sam2->base.key.key)) != 0) {
creds_arcfour_crypt(&samlogon_state->creds,
- r->out.validation.sam2->key.key,
- sizeof(r->out.validation.sam2->key.key));
+ r->out.validation.sam2->base.key.key,
+ sizeof(r->out.validation.sam2->base.key.key));
}
if (user_session_key) {
- memcpy(user_session_key, r->out.validation.sam2->key.key, 16);
+ memcpy(user_session_key, r->out.validation.sam2->base.key.key, 16);
}
- if (memcmp(r->out.validation.sam2->LMSessKey.key, zeros,
- sizeof(r->out.validation.sam2->LMSessKey.key)) != 0) {
+ if (memcmp(r->out.validation.sam2->base.LMSessKey.key, zeros,
+ sizeof(r->out.validation.sam2->base.LMSessKey.key)) != 0) {
creds_arcfour_crypt(&samlogon_state->creds,
- r->out.validation.sam2->LMSessKey.key,
- sizeof(r->out.validation.sam2->LMSessKey.key));
+ r->out.validation.sam2->base.LMSessKey.key,
+ sizeof(r->out.validation.sam2->base.LMSessKey.key));
}
if (lm_key) {
- memcpy(lm_key, r->out.validation.sam2->LMSessKey.key, 8);
+ memcpy(lm_key, r->out.validation.sam2->base.LMSessKey.key, 8);
}
} else if (r->in.validation_level == 3) {
static const char zeros[16];
- if (memcmp(r->out.validation.sam3->key.key, zeros,
- sizeof(r->out.validation.sam3->key.key)) != 0) {
+ if (memcmp(r->out.validation.sam3->base.key.key, zeros,
+ sizeof(r->out.validation.sam3->base.key.key)) != 0) {
creds_arcfour_crypt(&samlogon_state->creds,
- r->out.validation.sam3->key.key,
- sizeof(r->out.validation.sam3->key.key));
+ r->out.validation.sam3->base.key.key,
+ sizeof(r->out.validation.sam3->base.key.key));
}
if (user_session_key) {
- memcpy(user_session_key, r->out.validation.sam3->key.key, 16);
+ memcpy(user_session_key, r->out.validation.sam3->base.key.key, 16);
}
- if (memcmp(r->out.validation.sam3->LMSessKey.key, zeros,
- sizeof(r->out.validation.sam3->LMSessKey.key)) != 0) {
+ if (memcmp(r->out.validation.sam3->base.LMSessKey.key, zeros,
+ sizeof(r->out.validation.sam3->base.LMSessKey.key)) != 0) {
creds_arcfour_crypt(&samlogon_state->creds,
- r->out.validation.sam3->LMSessKey.key,
- sizeof(r->out.validation.sam3->LMSessKey.key));
+ r->out.validation.sam3->base.LMSessKey.key,
+ sizeof(r->out.validation.sam3->base.LMSessKey.key));
}
if (lm_key) {
- memcpy(lm_key, r->out.validation.sam3->LMSessKey.key, 8);
+ memcpy(lm_key, r->out.validation.sam3->base.LMSessKey.key, 8);
}
} else if (r->in.validation_level == 6) {
/* they aren't encrypted! */
if (user_session_key) {
- memcpy(user_session_key, r->out.validation.sam6->key.key, 16);
+ memcpy(user_session_key, r->out.validation.sam6->base.key.key, 16);
}
if (lm_key) {
- memcpy(lm_key, r->out.validation.sam6->LMSessKey.key, 8);
+ memcpy(lm_key, r->out.validation.sam6->base.LMSessKey.key, 8);
}
}
}