From ada31d65d6c5929d2fbddfea5611a5f5fe5a0d74 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 9 Mar 2017 08:11:07 +0100 Subject: [PATCH] s3:gse: Check if we have a target_princpal set we should use BUG: https://bugzilla.samba.org/show_bug.cgi?id=12554 Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Andreas Schneider Signed-off-by: Stefan Metzmacher --- source3/librpc/crypto/gse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c index 9d433439395..83e152f7239 100644 --- a/source3/librpc/crypto/gse.c +++ b/source3/librpc/crypto/gse.c @@ -342,6 +342,7 @@ static NTSTATUS gse_get_client_auth_token(TALLOC_CTX *mem_ctx, OM_uint32 time_rec = 0; struct timeval tv; struct cli_credentials *cli_creds = gensec_get_credentials(gensec_security); + const char *target_principal = gensec_get_target_principal(gensec_security); const char *hostname = gensec_get_target_hostname(gensec_security); const char *service = gensec_get_target_service(gensec_security); const char *client_realm = cli_credentials_get_realm(cli_creds); @@ -402,7 +403,7 @@ static NTSTATUS gse_get_client_auth_token(TALLOC_CTX *mem_ctx, } status = gse_setup_server_principal(mem_ctx, - NULL, + target_principal, service, hostname, server_realm, -- 2.47.3