mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3-libsmb: Remove unused smb_krb5_mk_error()
Also remove now-unused configure checks for krb5_mk_error(). Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html Andrew Bartlett
This commit is contained in:
parent
3d63100890
commit
a7835f4736
@ -4313,19 +4313,6 @@ if test x"$with_ads_support" != x"no"; then
|
|||||||
[Whether the type krb5_addresses type exists])
|
[Whether the type krb5_addresses type exists])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether krb5_mk_error takes 3 arguments MIT or 9 Heimdal],
|
|
||||||
samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE, [
|
|
||||||
AC_TRY_COMPILE([#include <krb5.h>],
|
|
||||||
[
|
|
||||||
krb5_mk_error(0,0,0);],
|
|
||||||
samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE=yes,
|
|
||||||
samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE=no)])
|
|
||||||
|
|
||||||
if test x"$samba_cv_HAVE_SHORT_KRB5_MK_ERROR_INTERFACE" = x"yes"; then
|
|
||||||
AC_DEFINE(HAVE_SHORT_KRB5_MK_ERROR_INTERFACE,1,
|
|
||||||
[whether krb5_mk_error takes 3 arguments MIT or 9 Heimdal])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x"$ac_cv_func_ext_krb5_enctype_to_string" = x"yes"; then
|
if test x"$ac_cv_func_ext_krb5_enctype_to_string" = x"yes"; then
|
||||||
AC_CACHE_CHECK([for krb5_error_code krb5_enctype_to_string(krb5_context context, krb5_enctype enctype, char **str)],
|
AC_CACHE_CHECK([for krb5_error_code krb5_enctype_to_string(krb5_context context, krb5_enctype enctype, char **str)],
|
||||||
smb_krb5_cv_enctype_to_string_takes_krb5_context_arg,[
|
smb_krb5_cv_enctype_to_string_takes_krb5_context_arg,[
|
||||||
|
@ -110,10 +110,6 @@ void smb_krb5_get_init_creds_opt_free(krb5_context context,
|
|||||||
krb5_get_init_creds_opt *opt);
|
krb5_get_init_creds_opt *opt);
|
||||||
krb5_error_code smb_krb5_get_init_creds_opt_alloc(krb5_context context,
|
krb5_error_code smb_krb5_get_init_creds_opt_alloc(krb5_context context,
|
||||||
krb5_get_init_creds_opt **opt);
|
krb5_get_init_creds_opt **opt);
|
||||||
krb5_error_code smb_krb5_mk_error(krb5_context context,
|
|
||||||
krb5_error_code error_code,
|
|
||||||
const krb5_principal server,
|
|
||||||
krb5_data *reply);
|
|
||||||
krb5_enctype smb_get_enctype_from_kt_entry(krb5_keytab_entry *kt_entry);
|
krb5_enctype smb_get_enctype_from_kt_entry(krb5_keytab_entry *kt_entry);
|
||||||
krb5_error_code smb_krb5_enctype_to_string(krb5_context context,
|
krb5_error_code smb_krb5_enctype_to_string(krb5_context context,
|
||||||
krb5_enctype enctype,
|
krb5_enctype enctype,
|
||||||
|
@ -1296,43 +1296,6 @@ done:
|
|||||||
#else
|
#else
|
||||||
#error UNKNOWN_KRB5_ENCTYPE_TO_STRING_FUNCTION
|
#error UNKNOWN_KRB5_ENCTYPE_TO_STRING_FUNCTION
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
krb5_error_code smb_krb5_mk_error(krb5_context context,
|
|
||||||
krb5_error_code error_code,
|
|
||||||
const krb5_principal server,
|
|
||||||
krb5_data *reply)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_SHORT_KRB5_MK_ERROR_INTERFACE /* MIT */
|
|
||||||
/*
|
|
||||||
* The MIT interface is *terrible*.
|
|
||||||
* We have to construct this ourselves...
|
|
||||||
*/
|
|
||||||
krb5_error e;
|
|
||||||
|
|
||||||
memset(&e, 0, sizeof(e));
|
|
||||||
krb5_us_timeofday(context, &e.stime, &e.susec);
|
|
||||||
e.server = server;
|
|
||||||
#if defined(krb5_err_base)
|
|
||||||
e.error = error_code - krb5_err_base;
|
|
||||||
#elif defined(ERROR_TABLE_BASE_krb5)
|
|
||||||
e.error = error_code - ERROR_TABLE_BASE_krb5;
|
|
||||||
#else
|
|
||||||
e.error = error_code; /* Almost certainly wrong, but what can we do... ? */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return krb5_mk_error(context, &e, reply);
|
|
||||||
#else /* Heimdal. */
|
|
||||||
return krb5_mk_error(context,
|
|
||||||
error_code,
|
|
||||||
NULL,
|
|
||||||
NULL, /* e_data */
|
|
||||||
NULL,
|
|
||||||
server,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
reply);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
@ -647,10 +647,6 @@ krb5_get_init_creds_opt_free(ctx, opt);
|
|||||||
'KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT',
|
'KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT',
|
||||||
headers='krb5.h', link=False,
|
headers='krb5.h', link=False,
|
||||||
msg="Checking whether krb5_get_init_creds_opt_free takes a context argument")
|
msg="Checking whether krb5_get_init_creds_opt_free takes a context argument")
|
||||||
conf.CHECK_CODE('krb5_mk_error(0,0,0)',
|
|
||||||
'HAVE_SHORT_KRB5_MK_ERROR_INTERFACE',
|
|
||||||
headers='krb5.h', link=False,
|
|
||||||
msg="Checking whether krb5_mk_error takes 3 arguments MIT or 9 Heimdal")
|
|
||||||
conf.CHECK_CODE('''
|
conf.CHECK_CODE('''
|
||||||
const krb5_data *pkdata;
|
const krb5_data *pkdata;
|
||||||
krb5_context context;
|
krb5_context context;
|
||||||
|
Loading…
Reference in New Issue
Block a user