1KRB5_ANAME_TO_LOCALNA... BSD Library Functions Manual KRB5_ANAME_TO_LOCALNA...
2
4 krb5_aname_to_localname — converts a principal to a system local name
5
7 Kerberos 5 Library (libkrb5, -lkrb5)
8
10 #include <krb5.h>
11
12 krb5_boolean
13 krb5_aname_to_localname(krb5_context context, krb5_const_principal name,
14 size_t lnsize, char *lname);
15
17 This function takes a principal name, verifies that it is in the local
18 realm (using krb5_get_default_realms()) and then returns the local name
19 of the principal.
20
21 If name isn't in one of the local realms an error is returned.
22
23 If the size (lnsize) of the local name (lname) is too small, an error is
24 returned.
25
26 krb5_aname_to_localname() should only be use by an application that
27 implements protocols that don't transport the login name and thus needs
28 to convert a principal to a local name.
29
30 Protocols should be designed so that they authenticate using Kerberos,
31 send over the login name and then verify the principal that is authenti‐
32 cated is allowed to login and the login name. A way to check if a user
33 is allowed to login is using the function krb5_kuserok().
34
36 krb5_get_default_realms(3), krb5_kuserok(3)
37
38HEIMDAL February 18, 2006 HEIMDAL