diff --git a/usr.sbin/gssd/Makefile b/usr.sbin/gssd/Makefile --- a/usr.sbin/gssd/Makefile +++ b/usr.sbin/gssd/Makefile @@ -11,7 +11,14 @@ LIBADD= gssapi .if ${MK_KERBEROS_SUPPORT} != "no" +.if ${MK_MITKRB5} != "no" +# MIT KRB5 +LIBADD+= krb5 k5crypto krb5profile krb5support +CFLAGS+= -DMK_MITKRB5=yes +.else +# Heimdal LIBADD+= krb5 roken +.endif .else CFLAGS+= -DWITHOUT_KERBEROS .endif diff --git a/usr.sbin/gssd/gssd.c b/usr.sbin/gssd/gssd.c --- a/usr.sbin/gssd/gssd.c +++ b/usr.sbin/gssd/gssd.c @@ -1189,8 +1189,11 @@ if (ret == 0) ret = krb5_cc_initialize(context, ccache, principal); if (ret == 0) { +#ifndef MK_MITKRB5 + /* For Hemdal only */ krb5_get_init_creds_opt_set_default_flags(context, "gssd", krb5_principal_get_realm(context, principal), opt); +#endif kt_ret = ret = krb5_kt_default(context, &kt); } if (ret == 0)