From 499521611bdba1bd17104bfc9b15bb029ad60c19 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Wed, 13 Nov 2019 10:06:20 +0100
Subject: [PATCH 152/187] s4:librpc: Check return code of
netlogon_creds_client_authenticator()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14195
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit a64a5b7e17d80a4363774d4e35d3ee676ecf426d)
---
source4/librpc/rpc/dcerpc_schannel.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 36edf4b95d7..d12647222eb 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -456,10 +456,16 @@ static void continue_bind_auth(struct composite_context *ctx)
/* if we have a AES encrypted connection, verify the capabilities */
if (ndr_syntax_id_equal(&s->table->syntax_id,
&ndr_table_netlogon.syntax_id)) {
+ NTSTATUS status;
ZERO_STRUCT(s->return_auth);
s->save_creds_state = *s->creds_state;
- netlogon_creds_client_authenticator(&s->save_creds_state, &s->auth);
+ status = netlogon_creds_client_authenticator(&s->save_creds_state,
+ &s->auth);
+ if (!NT_STATUS_IS_OK(status)) {
+ composite_error(c, status);
+ return;
+ }
s->c.in.server_name = talloc_asprintf(c,
"\\\\%s",
--
2.23.0