diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/krb5_wrap/krb5_samba.c | 23 | ||||
-rw-r--r-- | lib/krb5_wrap/krb5_samba.h | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index fca6cefa334..a3743aef449 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -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, diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h index 51fd4cfd644..af661d9122a 100644 --- a/lib/krb5_wrap/krb5_samba.h +++ b/lib/krb5_wrap/krb5_samba.h @@ -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, |