From: Andrew Bartlett Date: Wed, 11 Dec 2019 18:35:55 +0000 (+1300) Subject: lib/krb5_wrap: Remove unused smb_krb5_get_allowed_weak_crypto() X-Git-Tag: ldb-2.1.0~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=049f0c3870179aa4977f5d9c49e18566f166412e;p=thirdparty%2Fsamba.git lib/krb5_wrap: Remove unused smb_krb5_get_allowed_weak_crypto() Signed-off-by: Andrew Bartlett Reviewed-by: Isaac Boukris Autobuild-User(master): Isaac Boukris Autobuild-Date(master): Wed Dec 11 22:18:47 UTC 2019 on sn-devel-184 --- diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index a51c3bd10c7..ee7055ea7b8 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -2979,56 +2979,6 @@ char *smb_get_krb5_error_message(krb5_context context, return ret; } - -/** - * @brief Return the kerberos library setting for: libdefaults:allow_weak_crypto - * - * @param[in] context The library context - * - * @return True if weak crypto is allowed, false if not. - */ -krb5_boolean smb_krb5_get_allowed_weak_crypto(krb5_context context) -#if defined(HAVE_KRB5_CONFIG_GET_BOOL_DEFAULT) -{ - return krb5_config_get_bool_default(context, - NULL, - FALSE, - "libdefaults", - "allow_weak_crypto", - NULL); -} -#elif defined(HAVE_PROFILE_H) && defined(HAVE_KRB5_GET_PROFILE) -{ -#include - krb5_error_code ret; - krb5_boolean ret_default = false; - profile_t profile; - int ret_profile; - - ret = krb5_get_profile(context, - &profile); - if (ret) { - return ret_default; - } - - ret = profile_get_boolean(profile, - "libdefaults", - "allow_weak_crypto", - NULL, /* subsubname */ - ret_default, /* def_val */ - &ret_profile /* *ret_default */); - if (ret) { - return ret_default; - } - - profile_release(profile); - - return ret_profile; -} -#else -#error UNKNOWN_KRB5_CONFIG_ROUTINES -#endif - /** * @brief Return the type of a krb5_principal * diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h index b6ee04f60fe..64ae0275dbd 100644 --- a/lib/krb5_wrap/krb5_samba.h +++ b/lib/krb5_wrap/krb5_samba.h @@ -368,8 +368,6 @@ int smb_krb5_create_key_from_string(krb5_context context, krb5_enctype enctype, krb5_keyblock *key); -krb5_boolean smb_krb5_get_allowed_weak_crypto(krb5_context context); - #ifndef krb5_princ_size #if defined(HAVE_KRB5_PRINCIPAL_GET_NUM_COMP) #define krb5_princ_size krb5_principal_get_num_comp