diff --git a/lib/krb5/get_cred.c b/lib/krb5/get_cred.c index c16053b19..5ce27d968 100644 --- a/lib/krb5/get_cred.c +++ b/lib/krb5/get_cred.c @@ -255,7 +255,8 @@ init_tgs_req (krb5_context context, } } - ret = set_auth_data (context, &t->req_body, &in_creds->authdata, key); + ret = set_auth_data (context, &t->req_body, &in_creds->authdata, + key ? key : &krbtgt->session); if (ret) { if (key) krb5_free_keyblock (context, key);