1 .\" Copyright (c) 2001 - 2004 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" $Heimdal: krb5_init_context.3 19980 2007-01-17 18:06:33Z lha $
39 .Nm krb5_add_et_list ,
40 .Nm krb5_add_extra_addresses ,
41 .Nm krb5_add_ignore_addresses ,
43 .Nm krb5_free_config_files ,
44 .Nm krb5_free_context ,
45 .Nm krb5_get_default_config_files ,
46 .Nm krb5_get_dns_canonize_hostname ,
47 .Nm krb5_get_extra_addresses ,
48 .Nm krb5_get_fcache_version ,
49 .Nm krb5_get_ignore_addresses ,
50 .Nm krb5_get_kdc_sec_offset ,
51 .Nm krb5_get_max_time_skew ,
52 .Nm krb5_get_use_admin_kdc
53 .Nm krb5_init_context ,
55 .Nm krb5_prepend_config_files ,
56 .Nm krb5_prepend_config_files_default ,
57 .Nm krb5_set_config_files ,
58 .Nm krb5_set_dns_canonize_hostname ,
59 .Nm krb5_set_extra_addresses ,
60 .Nm krb5_set_fcache_version ,
61 .Nm krb5_set_ignore_addresses ,
62 .Nm krb5_set_max_time_skew ,
63 .Nm krb5_set_use_admin_kdc ,
64 .Nd create, modify and delete krb5_context structures
66 Kerberos 5 Library (libkrb5, -lkrb5)
70 .Li "struct krb5_context;"
74 .Fa "krb5_context *context"
78 .Fa "krb5_context context"
82 .Fa "krb5_context context"
86 .Fa "krb5_context context"
87 .Fa "void (*func)(struct et_list **)"
90 .Fo krb5_add_extra_addresses
91 .Fa "krb5_context context"
92 .Fa "krb5_addresses *addresses"
95 .Fo krb5_set_extra_addresses
96 .Fa "krb5_context context"
97 .Fa "const krb5_addresses *addresses"
100 .Fo krb5_get_extra_addresses
101 .Fa "krb5_context context"
102 .Fa "krb5_addresses *addresses"
105 .Fo krb5_add_ignore_addresses
106 .Fa "krb5_context context"
107 .Fa "krb5_addresses *addresses"
110 .Fo krb5_set_ignore_addresses
111 .Fa "krb5_context context"
112 .Fa "const krb5_addresses *addresses"
115 .Fo krb5_get_ignore_addresses
116 .Fa "krb5_context context"
117 .Fa "krb5_addresses *addresses"
120 .Fo krb5_set_fcache_version
121 .Fa "krb5_context context"
125 .Fo krb5_get_fcache_version
126 .Fa "krb5_context context"
130 .Fo krb5_set_dns_canonize_hostname
131 .Fa "krb5_context context"
132 .Fa "krb5_boolean flag"
135 .Fo krb5_get_dns_canonize_hostname
136 .Fa "krb5_context context"
139 .Fo krb5_get_kdc_sec_offset
140 .Fa "krb5_context context"
145 .Fo krb5_set_config_files
146 .Fa "krb5_context context"
147 .Fa "char **filenames"
150 .Fo krb5_prepend_config_files
151 .Fa "const char *filelist"
156 .Fo krb5_prepend_config_files_default
157 .Fa "const char *filelist"
158 .Fa "char ***pfilenames"
161 .Fo krb5_get_default_config_files
162 .Fa "char ***pfilenames"
165 .Fo krb5_free_config_files
166 .Fa "char **filenames"
169 .Fo krb5_set_use_admin_kdc
170 .Fa "krb5_context context"
171 .Fa "krb5_boolean flag"
174 .Fo krb5_get_use_admin_kdc
175 .Fa "krb5_context context"
178 .Fo krb5_get_max_time_skew
179 .Fa "krb5_context context"
182 .Fo krb5_set_max_time_skew
183 .Fa "krb5_context context"
188 .Fn krb5_init_context
189 function initializes the
191 structure and reads the configuration file
194 The structure should be freed by calling
195 .Fn krb5_free_context
196 when it is no longer being used.
198 .Fn krb5_init_context
199 returns 0 to indicate success.
200 Otherwise an errno code is returned.
201 Failure means either that something bad happened during initialization
204 or that Kerberos should not be used
213 .Fn krb5_init_context .
222 The error handler must generated by the the re-rentrant version of the
225 .Fn krb5_add_extra_addresses
226 add a list of addresses that should be added when requesting tickets.
228 .Fn krb5_add_ignore_addresses
229 add a list of addresses that should be ignored when requesting tickets.
231 .Fn krb5_get_extra_addresses
232 get the list of addresses that should be added when requesting tickets.
234 .Fn krb5_get_ignore_addresses
235 get the list of addresses that should be ignored when requesting tickets.
237 .Fn krb5_set_ignore_addresses
238 set the list of addresses that should be ignored when requesting tickets.
240 .Fn krb5_set_extra_addresses
241 set the list of addresses that should be added when requesting tickets.
243 .Fn krb5_set_fcache_version
244 sets the version of file credentials caches that should be used.
246 .Fn krb5_get_fcache_version
247 gets the version of file credentials caches that should be used.
249 .Fn krb5_set_dns_canonize_hostname
250 sets if the context is configured to canonicalize hostnames using DNS.
252 .Fn krb5_get_dns_canonize_hostname
253 returns if the context is configured to canonicalize hostnames using DNS.
255 .Fn krb5_get_kdc_sec_offset
256 returns the offset between the localtime and the KDC's time.
260 are both optional argument and
264 .Fn krb5_set_config_files
265 set the list of configuration files to use and re-initialize the
266 configuration from the files.
268 .Fn krb5_prepend_config_files
271 and prepend the result to the already existing list
273 The result is returned in
275 and should be freed with
276 .Fn krb5_free_config_files .
278 .Fn krb5_prepend_config_files_default
281 and append that to the default
282 list of configuration files.
284 .Fn krb5_get_default_config_files
285 get a list of default configuration files.
287 .Fn krb5_free_config_files
288 free a list of configuration files returned by
289 .Fn krb5_get_default_config_files ,
290 .Fn krb5_prepend_config_files_default ,
292 .Fn krb5_prepend_config_files .
294 .Fn krb5_set_use_admin_kdc
295 sets if all KDC requests should go admin KDC.
297 .Fn krb5_get_use_admin_kdc
298 gets if all KDC requests should go admin KDC.
300 .Fn krb5_get_max_time_skew
302 .Fn krb5_set_max_time_skew
303 get and sets the maximum allowed time skew between client and server.