mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
lib:krb5_wrap: Remove Heimdal‐only krb5_princ_component() implementation
This implementation is no longer called: using a variable of static storage duration as a conduit for return values is only asking for trouble. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
7e62f3921f
commit
187d74d9c0
@ -126,21 +126,6 @@ void krb5_free_string(krb5_context context, char *val) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING) && !defined(HAVE_KRB5_PRINC_COMPONENT)
|
||||
const krb5_data *krb5_princ_component(krb5_context context,
|
||||
krb5_principal principal, int i);
|
||||
|
||||
const krb5_data *krb5_princ_component(krb5_context context,
|
||||
krb5_principal principal, int i)
|
||||
{
|
||||
static krb5_data kdata;
|
||||
|
||||
kdata.data = discard_const_p(char, krb5_principal_get_comp_string(context, principal, i));
|
||||
kdata.length = strlen((const char *)kdata.data);
|
||||
return &kdata;
|
||||
}
|
||||
#endif
|
||||
|
||||
krb5_error_code smb_krb5_princ_component(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
int i,
|
||||
|
@ -61,10 +61,6 @@ krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype
|
||||
krb5_error_code krb5_auth_con_setuseruserkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock *keyblock);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING) && !defined(HAVE_KRB5_PRINC_COMPONENT)
|
||||
const krb5_data *krb5_princ_component(krb5_context context, krb5_principal principal, int i );
|
||||
#endif
|
||||
|
||||
krb5_error_code smb_krb5_princ_component(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
int i,
|
||||
|
Loading…
Reference in New Issue
Block a user