r23586: Fix heimdal path in the krb5 renew routine when we need to compose the tgt
authorGünther Deschner <gd@samba.org>
Fri, 22 Jun 2007 14:43:42 +0000 (14:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:33 +0000 (12:23 -0500)
string ourselves.

Guenther

source/libsmb/clikrb5.c

index 078706d1dbab58aa82c681e38bb83bda62153f78..0180bef47ae84fbf82fbddedaef17d420c6393d1 100644 (file)
@@ -1223,7 +1223,11 @@ out:
                        }
                } else {
                        /* build tgt service by default */
                        }
                } else {
                        /* build tgt service by default */
-                       client_realm = krb5_princ_realm(context, client);
+                       client_realm = krb5_princ_realm(context, creds_in.client);
+                       if (!client_realm) {
+                               ret = ENOMEM;
+                               goto done;
+                       }
                        ret = krb5_make_principal(context, &creds_in.server, *client_realm, KRB5_TGS_NAME, *client_realm, NULL);
                        if (ret) {
                                goto done;
                        ret = krb5_make_principal(context, &creds_in.server, *client_realm, KRB5_TGS_NAME, *client_realm, NULL);
                        if (ret) {
                                goto done;