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