1 .\" $NetBSD: krb5_init_context.3,v 1.3 2014/04/24 13:45:34 pettai Exp $
3 .\" Copyright (c) 2001 - 2004 Kungliga Tekniska Högskolan
4 .\" (Royal Institute of Technology, Stockholm, Sweden).
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the Institute nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 .Nm krb5_add_et_list ,
41 .Nm krb5_add_extra_addresses ,
42 .Nm krb5_add_ignore_addresses ,
44 .Nm krb5_free_config_files ,
45 .Nm krb5_free_context ,
46 .Nm krb5_get_default_config_files ,
47 .Nm krb5_get_dns_canonize_hostname ,
48 .Nm krb5_get_extra_addresses ,
49 .Nm krb5_get_fcache_version ,
50 .Nm krb5_get_ignore_addresses ,
51 .Nm krb5_get_kdc_sec_offset ,
52 .Nm krb5_get_max_time_skew ,
53 .Nm krb5_get_use_admin_kdc
54 .Nm krb5_init_context ,
56 .Nm krb5_prepend_config_files ,
57 .Nm krb5_prepend_config_files_default ,
58 .Nm krb5_set_config_files ,
59 .Nm krb5_set_dns_canonize_hostname ,
60 .Nm krb5_set_extra_addresses ,
61 .Nm krb5_set_fcache_version ,
62 .Nm krb5_set_ignore_addresses ,
63 .Nm krb5_set_max_time_skew ,
64 .Nm krb5_set_use_admin_kdc ,
65 .Nd create, modify and delete krb5_context structures
67 Kerberos 5 Library (libkrb5, -lkrb5)
71 .Li "struct krb5_context;"
75 .Fa "krb5_context *context"
79 .Fa "krb5_context context"
83 .Fa "krb5_context context"
87 .Fa "krb5_context context"
88 .Fa "void (*func)(struct et_list **)"
91 .Fo krb5_add_extra_addresses
92 .Fa "krb5_context context"
93 .Fa "krb5_addresses *addresses"
96 .Fo krb5_set_extra_addresses
97 .Fa "krb5_context context"
98 .Fa "const krb5_addresses *addresses"
101 .Fo krb5_get_extra_addresses
102 .Fa "krb5_context context"
103 .Fa "krb5_addresses *addresses"
106 .Fo krb5_add_ignore_addresses
107 .Fa "krb5_context context"
108 .Fa "krb5_addresses *addresses"
111 .Fo krb5_set_ignore_addresses
112 .Fa "krb5_context context"
113 .Fa "const krb5_addresses *addresses"
116 .Fo krb5_get_ignore_addresses
117 .Fa "krb5_context context"
118 .Fa "krb5_addresses *addresses"
121 .Fo krb5_set_fcache_version
122 .Fa "krb5_context context"
126 .Fo krb5_get_fcache_version
127 .Fa "krb5_context context"
131 .Fo krb5_set_dns_canonize_hostname
132 .Fa "krb5_context context"
133 .Fa "krb5_boolean flag"
136 .Fo krb5_get_dns_canonize_hostname
137 .Fa "krb5_context context"
140 .Fo krb5_get_kdc_sec_offset
141 .Fa "krb5_context context"
146 .Fo krb5_set_config_files
147 .Fa "krb5_context context"
148 .Fa "char **filenames"
151 .Fo krb5_prepend_config_files
152 .Fa "const char *filelist"
157 .Fo krb5_prepend_config_files_default
158 .Fa "const char *filelist"
159 .Fa "char ***pfilenames"
162 .Fo krb5_get_default_config_files
163 .Fa "char ***pfilenames"
166 .Fo krb5_free_config_files
167 .Fa "char **filenames"
170 .Fo krb5_set_use_admin_kdc
171 .Fa "krb5_context context"
172 .Fa "krb5_boolean flag"
175 .Fo krb5_get_use_admin_kdc
176 .Fa "krb5_context context"
179 .Fo krb5_get_max_time_skew
180 .Fa "krb5_context context"
183 .Fo krb5_set_max_time_skew
184 .Fa "krb5_context context"
189 .Fn krb5_init_context
190 function initializes the
192 structure and reads the configuration file
195 The structure should be freed by calling
196 .Fn krb5_free_context
197 when it is no longer being used.
199 .Fn krb5_init_context
200 returns 0 to indicate success.
201 Otherwise an errno code is returned.
202 Failure means either that something bad happened during initialization
205 or that Kerberos should not be used
214 .Fn krb5_init_context .
223 The error handler must generated by the the re-rentrant version of the
226 .Fn krb5_add_extra_addresses
227 add a list of addresses that should be added when requesting tickets.
229 .Fn krb5_add_ignore_addresses
230 add a list of addresses that should be ignored when requesting tickets.
232 .Fn krb5_get_extra_addresses
233 get the list of addresses that should be added when requesting tickets.
235 .Fn krb5_get_ignore_addresses
236 get the list of addresses that should be ignored when requesting tickets.
238 .Fn krb5_set_ignore_addresses
239 set the list of addresses that should be ignored when requesting tickets.
241 .Fn krb5_set_extra_addresses
242 set the list of addresses that should be added when requesting tickets.
244 .Fn krb5_set_fcache_version
245 sets the version of file credentials caches that should be used.
247 .Fn krb5_get_fcache_version
248 gets the version of file credentials caches that should be used.
250 .Fn krb5_set_dns_canonize_hostname
251 sets if the context is configured to canonicalize hostnames using DNS.
253 .Fn krb5_get_dns_canonize_hostname
254 returns if the context is configured to canonicalize hostnames using DNS.
256 .Fn krb5_get_kdc_sec_offset
257 returns the offset between the localtime and the KDC's time.
261 are both optional argument and
265 .Fn krb5_set_config_files
266 set the list of configuration files to use and re-initialize the
267 configuration from the files.
269 .Fn krb5_prepend_config_files
272 and prepend the result to the already existing list
274 The result is returned in
276 and should be freed with
277 .Fn krb5_free_config_files .
279 .Fn krb5_prepend_config_files_default
282 and append that to the default
283 list of configuration files.
285 .Fn krb5_get_default_config_files
286 get a list of default configuration files.
288 .Fn krb5_free_config_files
289 free a list of configuration files returned by
290 .Fn krb5_get_default_config_files ,
291 .Fn krb5_prepend_config_files_default ,
293 .Fn krb5_prepend_config_files .
295 .Fn krb5_set_use_admin_kdc
296 sets if all KDC requests should go admin KDC.
298 .Fn krb5_get_use_admin_kdc
299 gets if all KDC requests should go admin KDC.
301 .Fn krb5_get_max_time_skew
303 .Fn krb5_set_max_time_skew
304 get and sets the maximum allowed time skew between client and server.