|
|
#endif | #endif |
#endif | #endif |
| |
|
/** |
|
* The type of a principal is different for MIT Krb5 and Heimdal. |
|
* These macros are provided by Heimdal, and introduced here for MIT. |
|
*/ |
|
#ifndef krb5_realm_length |
|
#define krb5_realm_length(r) ((r).length) |
|
#define krb5_realm_data(r) ((r).data) |
|
#endif |
|
|
/* | /* |
* Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME | * Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME |
* environment variable so that the library knows where to find it. | * environment variable so that the library knows where to find it. |
|
|
| |
/* setup a principal for the ticket granting service */ | /* setup a principal for the ticket granting service */ |
ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ, | ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ, |
krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length, |
krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)), |
krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data, |
krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)), |
strlen(KRB5_TGS_NAME), KRB5_TGS_NAME, | strlen(KRB5_TGS_NAME), KRB5_TGS_NAME, |
krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length, |
krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)), |
krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data, |
krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)), |
0); | 0); |
if (ret) { | if (ret) { |
error(logopt, | error(logopt, |