1KRB5_CONTEXT(3) BSD Library Functions Manual KRB5_CONTEXT(3)
2
4 krb5_add_et_list, krb5_add_extra_addresses, krb5_add_ignore_addresses,
5 krb5_context, krb5_free_config_files, krb5_free_context,
6 krb5_get_default_config_files, krb5_get_dns_canonize_hostname,
7 krb5_get_extra_addresses, krb5_get_fcache_version,
8 krb5_get_ignore_addresses, krb5_get_kdc_sec_offset,
9 krb5_get_max_time_skew, krb5_get_use_admin_kdc krb5_init_context,
10 krb5_init_ets, krb5_prepend_config_files,
11 krb5_prepend_config_files_default, krb5_set_config_files,
12 krb5_set_dns_canonize_hostname, krb5_set_extra_addresses,
13 krb5_set_fcache_version, krb5_set_ignore_addresses,
14 krb5_set_max_time_skew, krb5_set_use_admin_kdc, — create, modify and
15 delete krb5_context structures
16
18 Kerberos 5 Library (libkrb5, -lkrb5)
19
21 #include <krb5.h>
22
23 struct krb5_context;
24
25 krb5_error_code
26 krb5_init_context(krb5_context *context);
27
28 void
29 krb5_free_context(krb5_context context);
30
31 void
32 krb5_init_ets(krb5_context context);
33
34 krb5_error_code
35 krb5_add_et_list(krb5_context context, void (*func)(struct et_list **));
36
37 krb5_error_code
38 krb5_add_extra_addresses(krb5_context context,
39 krb5_addresses *addresses);
40
41 krb5_error_code
42 krb5_set_extra_addresses(krb5_context context,
43 const krb5_addresses *addresses);
44
45 krb5_error_code
46 krb5_get_extra_addresses(krb5_context context,
47 krb5_addresses *addresses);
48
49 krb5_error_code
50 krb5_add_ignore_addresses(krb5_context context,
51 krb5_addresses *addresses);
52
53 krb5_error_code
54 krb5_set_ignore_addresses(krb5_context context,
55 const krb5_addresses *addresses);
56
57 krb5_error_code
58 krb5_get_ignore_addresses(krb5_context context,
59 krb5_addresses *addresses);
60
61 krb5_error_code
62 krb5_set_fcache_version(krb5_context context, int version);
63
64 krb5_error_code
65 krb5_get_fcache_version(krb5_context context, int *version);
66
67 void
68 krb5_set_dns_canonize_hostname(krb5_context context, krb5_boolean flag);
69
70 krb5_boolean
71 krb5_get_dns_canonize_hostname(krb5_context context);
72
73 krb5_error_code
74 krb5_get_kdc_sec_offset(krb5_context context, int32_t *sec,
75 int32_t *usec);
76
77 krb5_error_code
78 krb5_set_config_files(krb5_context context, char **filenames);
79
80 krb5_error_code
81 krb5_prepend_config_files(const char *filelist, char **pq,
82 char ***ret_pp);
83
84 krb5_error_code
85 krb5_prepend_config_files_default(const char *filelist,
86 char ***pfilenames);
87
88 krb5_error_code
89 krb5_get_default_config_files(char ***pfilenames);
90
91 void
92 krb5_free_config_files(char **filenames);
93
94 void
95 krb5_set_use_admin_kdc(krb5_context context, krb5_boolean flag);
96
97 krb5_boolean
98 krb5_get_use_admin_kdc(krb5_context context);
99
100 time_t
101 krb5_get_max_time_skew(krb5_context context);
102
103 krb5_error_code
104 krb5_set_max_time_skew(krb5_context context, time_t time);
105
107 The krb5_init_context() function initializes the context structure and
108 reads the configuration file /etc/krb5.conf.
109
110 The structure should be freed by calling krb5_free_context() when it is
111 no longer being used.
112
113 krb5_init_context() returns 0 to indicate success. Otherwise an errno
114 code is returned. Failure means either that something bad happened dur‐
115 ing initialization (typically [ENOMEM]) or that Kerberos should not be
116 used [ENXIO].
117
118 krb5_init_ets() adds all com_err(3) libs to context. This is done by
119 krb5_init_context().
120
121 krb5_add_et_list() adds a com_err(3) error-code handler func to the spec‐
122 ified context. The error handler must generated by the the re-rentrant
123 version of the compile_et(1) program. krb5_add_extra_addresses() add a
124 list of addresses that should be added when requesting tickets.
125
126 krb5_add_ignore_addresses() add a list of addresses that should be
127 ignored when requesting tickets.
128
129 krb5_get_extra_addresses() get the list of addresses that should be added
130 when requesting tickets.
131
132 krb5_get_ignore_addresses() get the list of addresses that should be
133 ignored when requesting tickets.
134
135 krb5_set_ignore_addresses() set the list of addresses that should be
136 ignored when requesting tickets.
137
138 krb5_set_extra_addresses() set the list of addresses that should be added
139 when requesting tickets.
140
141 krb5_set_fcache_version() sets the version of file credentials caches
142 that should be used.
143
144 krb5_get_fcache_version() gets the version of file credentials caches
145 that should be used.
146
147 krb5_set_dns_canonize_hostname() sets if the context is configured to
148 canonicalize hostnames using DNS.
149
150 krb5_get_dns_canonize_hostname() returns if the context is configured to
151 canonicalize hostnames using DNS.
152
153 krb5_get_kdc_sec_offset() returns the offset between the localtime and
154 the KDC's time. sec and usec are both optional argument and NULL can be
155 passed in.
156
157 krb5_set_config_files() set the list of configuration files to use and
158 re-initialize the configuration from the files.
159
160 krb5_prepend_config_files() parse the filelist and prepend the result to
161 the already existing list pq The result is returned in ret_pp and should
162 be freed with krb5_free_config_files().
163
164 krb5_prepend_config_files_default() parse the filelist and append that to
165 the default list of configuration files.
166
167 krb5_get_default_config_files() get a list of default configuration
168 files.
169
170 krb5_free_config_files() free a list of configuration files returned by
171 krb5_get_default_config_files(), krb5_prepend_config_files_default(), or
172 krb5_prepend_config_files().
173
174 krb5_set_use_admin_kdc() sets if all KDC requests should go admin KDC.
175
176 krb5_get_use_admin_kdc() gets if all KDC requests should go admin KDC.
177
178 krb5_get_max_time_skew() and krb5_set_max_time_skew() get and sets the
179 maximum allowed time skew between client and server.
180
182 errno(2), krb5(3), krb5_config(3), krb5_context(3), kerberos(8)
183
184HEIMDAL December 8, 2004 HEIMDAL