summaryrefslogtreecommitdiff
path: root/src/util/sss_krb5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/sss_krb5.c')
-rw-r--r--src/util/sss_krb5.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index 5f36f7e9..c9b16107 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -1079,3 +1079,22 @@ done:
return NULL;
#endif /* HAVE_KRB5_CC_COLLECTION */
}
+
+krb5_error_code KRB5_CALLCONV
+sss_krb5_unparse_name_ext(krb5_context ctx,
+ krb5_const_principal principal,
+ char **name,
+ unsigned int *len)
+{
+ krb5_error_code kerr;
+
+#ifdef HAVE_KRB5_UNPARSE_NAME_EXT
+ kerr = krb5_unparse_name_ext(ctx, principal, name, len);
+#else
+ kerr = krb5_unparse_name(ctx, principal, name);
+ if (kerr == 0 && *name)
+ *len = strlen(*name);
+#endif /* HAVE_KRB5_UNPARSE_NAME_EXT */
+
+ return kerr;
+}