1KRB5_SET_DEFAULT_REAL... BSD Library Functions Manual KRB5_SET_DEFAULT_REAL...
2
4 krb5_copy_host_realm, krb5_free_host_realm, krb5_get_default_realm,
5 krb5_get_default_realms, krb5_get_host_realm, krb5_set_default_realm —
6 default and host realm read and manipulation routines
7
9 Kerberos 5 Library (libkrb5, -lkrb5)
10
12 #include <krb5.h>
13
14 krb5_error_code
15 krb5_copy_host_realm(krb5_context context, const krb5_realm *from,
16 krb5_realm **to);
17
18 krb5_error_code
19 krb5_free_host_realm(krb5_context context, krb5_realm *realmlist);
20
21 krb5_error_code
22 krb5_get_default_realm(krb5_context context, krb5_realm *realm);
23
24 krb5_error_code
25 krb5_get_default_realms(krb5_context context, krb5_realm **realm);
26
27 krb5_error_code
28 krb5_get_host_realm(krb5_context context, const char *host,
29 krb5_realm **realms);
30
31 krb5_error_code
32 krb5_set_default_realm(krb5_context context, const char *realm);
33
35 krb5_copy_host_realm() copies the list of realms from from to to. to
36 should be freed by the caller using krb5_free_host_realm.
37
38 krb5_free_host_realm() frees all memory allocated by realmlist.
39
40 krb5_get_default_realm() returns the first default realm for this host.
41 The realm returned should be freed with krb5_xfree().
42
43 krb5_get_default_realms() returns a NULL terminated list of default
44 realms for this context. Realms returned by krb5_get_default_realms()
45 should be freed with krb5_free_host_realm().
46
47 krb5_get_host_realm() returns a NULL terminated list of realms for host
48 by looking up the information in the [domain_realm] in krb5.conf or in
49 DNS. If the mapping in [domain_realm] results in the string dns_locate,
50 DNS is used to lookup the realm.
51
52 When using DNS to a resolve the domain for the host a.b.c,
53 krb5_get_host_realm() looks for a TXT resource record named
54 _kerberos.a.b.c, and if not found, it strips off the first component and
55 tries a again (_kerberos.b.c) until it reaches the root.
56
57 If there is no configuration or DNS information found,
58 krb5_get_host_realm() assumes it can use the domain part of the host to
59 form a realm. Caller must free realmlist with krb5_free_host_realm().
60
61 krb5_set_default_realm() sets the default realm for the context. If NULL
62 is used as a realm, the [libdefaults]default_realm stanza in krb5.conf is
63 used. If there is no such stanza in the configuration file, the
64 krb5_get_host_realm() function is used to form a default realm.
65
67 free(3), krb5.conf(5)
68
69HEIMDAL April 24, 2005 HEIMDAL