#error UNKNOWN_KRB5_CONFIG_ROUTINES
#endif
+/**
+* @brief Return the type of a krb5_principal
+*
+* @param context The krb5_context
+* @param principal The const krb5_principal
+*
+* @return integer type of the principal
+*/
+int smb_krb5_principal_get_type(krb5_context context,
+ krb5_const_principal principal)
+{
+#ifdef HAVE_KRB5_PRINCIPAL_GET_TYPE /* Heimdal */
+ return krb5_principal_get_type(context, principal);
+#elif defined(krb5_princ_type) /* MIT */
+ return krb5_princ_type(context, principal);
+#else
+#error UNKNOWN_PRINC_GET_TYPE_FUNCTION
+#endif
+}
+
#else /* HAVE_KRB5 */
/* this saves a few linking headaches */
int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,
const void *data,
size_t len);
+int smb_krb5_principal_get_type(krb5_context context,
+ krb5_const_principal principal);
+
#endif /* HAVE_KRB5 */
int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,
conf.define('HAVE_KRB5_CONFIG_GET_BOOL_DEFAULT', 1)
conf.define('HAVE_KRB5_DATA_COPY', 1)
conf.define('HAVE_KRB5_PRINCIPAL_SET_REALM', 1)
+conf.define('HAVE_KRB5_PRINCIPAL_GET_TYPE', 1)
heimdal_includedirs = []
heimdal_libdirs = []
krb5_free_checksum_contents krb5_c_make_checksum krb5_create_checksum
krb5_config_get_bool_default krb5_get_profile
krb5_data_copy
- krb5_keyblock_init krb5_principal_set_realm
+ krb5_keyblock_init krb5_principal_set_realm krb5_principal_get_type
''',
lib='krb5 k5crypto')
conf.CHECK_DECLS('''krb5_get_credentials_for_user