]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:gse: Check if we have a target_princpal set we should use
authorAndreas Schneider <asn@samba.org>
Thu, 9 Mar 2017 07:11:07 +0000 (08:11 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 10 Mar 2017 10:37:22 +0000 (11:37 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12554

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/librpc/crypto/gse.c

index 9d4334393951b393c1aacaee8cc861665318e546..83e152f7239dfbce83f2b1d0f60942f7c8f89509 100644 (file)
@@ -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,