1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

lib/krb5_wrap: provide krb5_warnx() replacement.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug  8 08:30:50 CEST 2014 on sn-devel-104
This commit is contained in:
Günther Deschner 2014-05-08 15:06:51 +02:00 committed by Andrew Bartlett
parent c0d000692b
commit 9c5470be1e
4 changed files with 29 additions and 0 deletions

View File

@ -2592,6 +2592,29 @@ int smb_krb5_principal_get_type(krb5_context context,
#endif
}
/**
* @brief Generate a krb5 warning, forwarding to com_err
*
* @param context The krb5_context
* @param fmt The message format
* @param ... The message arguments
*
* @return
*/
#if !defined(HAVE_KRB5_WARNX)
krb5_error_code krb5_warnx(krb5_context context, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
DEBUG(1,(fmt, args));
DEBUGADD(1,("\n"));
va_end(args);
return 0;
}
#endif
#else /* HAVE_KRB5 */
/* this saves a few linking headaches */
int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,

View File

@ -342,6 +342,10 @@ krb5_error_code krb5_copy_data_contents(krb5_data *p,
int smb_krb5_principal_get_type(krb5_context context,
krb5_const_principal principal);
#if !defined(HAVE_KRB5_WARNX)
krb5_error_code krb5_warnx(krb5_context context, const char *fmt, ...);
#endif
#endif /* HAVE_KRB5 */
int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,

View File

@ -166,6 +166,7 @@ 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)
conf.define('HAVE_KRB5_WARNX', 1)
heimdal_includedirs = []
heimdal_libdirs = []

View File

@ -109,6 +109,7 @@ conf.CHECK_FUNCS('''
krb5_config_get_bool_default krb5_get_profile
krb5_data_copy
krb5_keyblock_init krb5_principal_set_realm krb5_principal_get_type
krb5_warnx
''',
lib='krb5 k5crypto')
conf.CHECK_DECLS('''krb5_get_credentials_for_user