summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-09-16 00:26:17 +0200
committerGünther Deschner <gd@samba.org>2009-09-16 01:55:06 +0200
commit799f8d7e13cc712f32cdd779770e4868ad17486b (patch)
tree61da8c7ed7a16b5139708fad679367b15811861b /source3/auth
parentf3979b50a9b2aacb0497df770f09950b78878fcc (diff)
downloadsamba-799f8d7e13cc712f32cdd779770e4868ad17486b.tar.gz
samba-799f8d7e13cc712f32cdd779770e4868ad17486b.tar.bz2
samba-799f8d7e13cc712f32cdd779770e4868ad17486b.zip
schannel: fully share schannel sign/seal between s3 and 4.
Guenther
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_netlogond.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c
index 5f4d2f16e3..8c930a552a 100644
--- a/source3/auth/auth_netlogond.c
+++ b/source3/auth/auth_netlogond.c
@@ -46,9 +46,21 @@ static NTSTATUS netlogond_validate(TALLOC_CTX *mem_ctx,
return status;
}
+ /*
+ * We have to fake a struct dcinfo, so that
+ * rpccli_netlogon_sam_network_logon_ex can decrypt the session keys.
+ */
+
+ p->dc = netlogon_creds_client_init_session_key(p, schannel_key);
+ if (p->dc == NULL) {
+ DEBUG(0, ("talloc failed\n"));
+ TALLOC_FREE(p);
+ return NT_STATUS_NO_MEMORY;
+ }
+
status = rpccli_schannel_bind_data(p, lp_workgroup(),
DCERPC_AUTH_LEVEL_PRIVACY,
- schannel_key, &auth);
+ p->dc, &auth);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("rpccli_schannel_bind_data failed: %s\n",
nt_errstr(status)));
@@ -64,18 +76,6 @@ static NTSTATUS netlogond_validate(TALLOC_CTX *mem_ctx,
return status;
}
- /*
- * We have to fake a struct dcinfo, so that
- * rpccli_netlogon_sam_network_logon_ex can decrypt the session keys.
- */
-
- p->dc = netlogon_creds_client_init_session_key(p, schannel_key);
- if (p->dc == NULL) {
- DEBUG(0, ("talloc failed\n"));
- TALLOC_FREE(p);
- return NT_STATUS_NO_MEMORY;
- }
-
status = rpccli_netlogon_sam_network_logon_ex(
p, p,
user_info->logon_parameters,/* flags such as 'allow