Add krb5_princ_type() and krb5_princ_size() that appear in the MIT
API but not in Heimdal, and add commented out empty versions of krb5_princ_set_realm_length(), krb5_princ_set_realm_data(), krb5_princ_name(), and krb5_princ_component(), which also appear in the MIT API, but which cannot be implemented in Heimdal until a change is made to how some data is represented internally (as these API functions expose that, as foolish as that is, but that's how MIT did it, and some applications use it).
This commit is contained in:
parent
22bda73efd
commit
24ceace29d
10
crypto/dist/heimdal/lib/krb5/krb5-protos.h
vendored
10
crypto/dist/heimdal/lib/krb5/krb5-protos.h
vendored
@ -1766,6 +1766,11 @@ krb5_password_key_proc __P((
|
||||
krb5_const_pointer keyseed,
|
||||
krb5_keyblock **key));
|
||||
|
||||
NAME_TYPE
|
||||
krb5_princ_type __P((
|
||||
krb5_context context,
|
||||
krb5_principal principal));
|
||||
|
||||
krb5_realm*
|
||||
krb5_princ_realm __P((
|
||||
krb5_context context,
|
||||
@ -1777,6 +1782,11 @@ krb5_princ_set_realm __P((
|
||||
krb5_principal principal,
|
||||
krb5_realm *realm));
|
||||
|
||||
unsigned int
|
||||
krb5_princ_size __P((
|
||||
krb5_context context,
|
||||
krb5_principal principal));
|
||||
|
||||
krb5_error_code
|
||||
krb5_principal2principalname __P((
|
||||
PrincipalName *p,
|
||||
|
68
crypto/dist/heimdal/lib/krb5/principal.c
vendored
68
crypto/dist/heimdal/lib/krb5/principal.c
vendored
@ -40,7 +40,7 @@
|
||||
#endif
|
||||
#include "resolve.h"
|
||||
|
||||
RCSID("$Id: principal.c,v 1.1.1.2 2000/08/02 19:59:37 assar Exp $");
|
||||
RCSID("$Id: principal.c,v 1.2 2000/08/09 23:27:21 thorpej Exp $");
|
||||
|
||||
#define princ_num_comp(P) ((P)->name.name_string.len)
|
||||
#define princ_type(P) ((P)->name.name_type)
|
||||
@ -330,6 +330,72 @@ krb5_princ_set_realm(krb5_context context,
|
||||
princ_realm(principal) = *realm;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* XXX Implemented in MIT Kerberos, but not here. MIT Kerberos
|
||||
* XXX internally represents realms as krb5_data, whereas we
|
||||
* XXX use C strings, so it's not particularly straightforward
|
||||
* XXX for us.
|
||||
*/
|
||||
void
|
||||
krb5_princ_set_realm_length(krb5_context context,
|
||||
krb5_principal principal,
|
||||
int length)
|
||||
{
|
||||
|
||||
/* XXX XXX XXX */
|
||||
}
|
||||
|
||||
void
|
||||
krb5_princ_set_realm_data(krb5_context context,
|
||||
krb5_principal principal,
|
||||
char *data)
|
||||
{
|
||||
|
||||
/* XXX XXX XXX */
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned int
|
||||
krb5_princ_size(krb5_context context,
|
||||
krb5_principal principal)
|
||||
{
|
||||
|
||||
return (principal->name.name_string.len);
|
||||
}
|
||||
|
||||
NAME_TYPE
|
||||
krb5_princ_type(krb5_context context,
|
||||
krb5_principal principal)
|
||||
{
|
||||
|
||||
return (principal->name.name_type);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* XXX Implemented in MIT Kerberos, but not here. MIT Kerberos
|
||||
* XXX internally represents principal name components as krb5_data,
|
||||
* XXX whereas we use C strings, so it's not particularly
|
||||
* XXX straightforward for us.
|
||||
*/
|
||||
krb5_data *
|
||||
krb5_princ_name(krb5_context context,
|
||||
krb5_principal principal)
|
||||
{
|
||||
|
||||
return (principal->name.name_string.val);
|
||||
}
|
||||
|
||||
krb5_data *
|
||||
krb5_princ_component(krb5_context context,
|
||||
krb5_principal principal,
|
||||
int idx)
|
||||
{
|
||||
|
||||
return (&principal->name.name_string.val[idx]);
|
||||
}
|
||||
#endif
|
||||
|
||||
krb5_error_code
|
||||
krb5_build_principal(krb5_context context,
|
||||
|
@ -1,2 +1,2 @@
|
||||
major=12
|
||||
minor=0
|
||||
minor=1
|
||||
|
Loading…
Reference in New Issue
Block a user