1 .\" Copyright (c) 2000 - 2007 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
39 .Nm krb5_config_file_free ,
40 .Nm krb5_config_free_strings ,
42 .Nm krb5_config_get_bool ,
43 .Nm krb5_config_get_bool_default ,
44 .Nm krb5_config_get_int ,
45 .Nm krb5_config_get_int_default ,
46 .Nm krb5_config_get_list ,
47 .Nm krb5_config_get_next ,
48 .Nm krb5_config_get_string ,
49 .Nm krb5_config_get_string_default ,
50 .Nm krb5_config_get_strings ,
51 .Nm krb5_config_get_time ,
52 .Nm krb5_config_get_time_default ,
53 .Nm krb5_config_parse_file ,
54 .Nm krb5_config_parse_file_multi ,
55 .Nm krb5_config_vget ,
56 .Nm krb5_config_vget_bool ,
57 .Nm krb5_config_vget_bool_default ,
58 .Nm krb5_config_vget_int ,
59 .Nm krb5_config_vget_int_default ,
60 .Nm krb5_config_vget_list ,
61 .Nm krb5_config_vget_next ,
62 .Nm krb5_config_vget_string ,
63 .Nm krb5_config_vget_string_default ,
64 .Nm krb5_config_vget_strings ,
65 .Nm krb5_config_vget_time ,
66 .Nm krb5_config_vget_time_default
67 .Nd get configuration value
69 Kerberos 5 Library (libkrb5, -lkrb5)
73 .Fo krb5_config_file_free
74 .Fa "krb5_context context"
75 .Fa "krb5_config_section *s"
78 .Fo krb5_config_free_strings
83 .Fa "krb5_context context"
84 .Fa "const krb5_config_section *c"
89 .Fo krb5_config_get_bool
90 .Fa "krb5_context context"
91 .Fa "krb5_config_section *c"
95 .Fo krb5_config_get_bool_default
96 .Fa "krb5_context context"
97 .Fa "krb5_config_section *c"
98 .Fa "krb5_boolean def_value"
102 .Fo krb5_config_get_int
103 .Fa "krb5_context context"
104 .Fa "krb5_config_section *c"
108 .Fo krb5_config_get_int_default
109 .Fa "krb5_context context"
110 .Fa "krb5_config_section *c"
115 .Fo krb5_config_get_string
116 .Fa "krb5_context context"
117 .Fa "krb5_config_section *c"
121 .Fo krb5_config_get_string_default
122 .Fa "krb5_context context"
123 .Fa "krb5_config_section *c"
124 .Fa "const char *def_value"
128 .Fo krb5_config_get_strings
129 .Fa "krb5_context context"
130 .Fa "const krb5_config_section *c"
134 .Fo krb5_config_get_time
135 .Fa "krb5_context context"
136 .Fa "krb5_config_section *c"
140 .Fo krb5_config_get_time_default
141 .Fa "krb5_context context"
142 .Fa "krb5_config_section *c"
147 .Fo krb5_config_parse_file
148 .Fa "krb5_context context"
149 .Fa "const char *fname"
150 .Fa "krb5_config_section **res"
153 .Fo krb5_config_parse_file_multi
154 .Fa "krb5_context context"
155 .Fa "const char *fname"
156 .Fa "krb5_config_section **res"
160 .Fa "krb5_context context"
161 .Fa "const krb5_config_section *c"
166 .Fo krb5_config_vget_bool
167 .Fa "krb5_context context"
168 .Fa "const krb5_config_section *c"
172 .Fo krb5_config_vget_bool_default
173 .Fa "krb5_context context"
174 .Fa "const krb5_config_section *c"
175 .Fa "krb5_boolean def_value"
179 .Fo krb5_config_vget_int
180 .Fa "krb5_context context"
181 .Fa "const krb5_config_section *c"
185 .Fo krb5_config_vget_int_default
186 .Fa "krb5_context context"
187 .Fa "const krb5_config_section *c"
191 .Ft "const krb5_config_binding *"
192 .Fo krb5_config_vget_list
193 .Fa "krb5_context context"
194 .Fa "const krb5_config_section *c"
198 .Fo krb5_config_vget_next
199 .Fa "krb5_context context"
200 .Fa "const krb5_config_section *c"
201 .Fa "const krb5_config_binding **pointer"
206 .Fo krb5_config_vget_string
207 .Fa "krb5_context context"
208 .Fa "const krb5_config_section *c"
212 .Fo krb5_config_vget_string_default
213 .Fa "krb5_context context"
214 .Fa "const krb5_config_section *c"
215 .Fa "const char *def_value"
219 .Fo krb5_config_vget_strings
220 .Fa "krb5_context context"
221 .Fa "const krb5_config_section *c"
225 .Fo krb5_config_vget_time
226 .Fa "krb5_context context"
227 .Fa "const krb5_config_section *c"
231 .Fo krb5_config_vget_time_default
232 .Fa "krb5_context context"
233 .Fa "const krb5_config_section *c"
238 These functions get values from the
240 configuration file, or another configuration database specified by the
244 The variable arguments should be a list of strings naming each
245 subsection to look for. For example:
246 .Bd -literal -offset indent
247 krb5_config_get_bool_default(context, NULL, FALSE,
248 "libdefaults", "log_utc", NULL);
251 gets the boolean value for the
253 option, defaulting to
256 .Fn krb5_config_get_bool_default
257 will convert the option value to a boolean value, where
260 and any non-zero number means
265 .Fn krb5_config_get_int_default
266 will convert the value to an integer.
268 .Fn krb5_config_get_time_default
269 will convert the value to a period of time (not a time stamp) in
270 seconds, so the string
273 1209600 (2 * 7 * 24 * 60 * 60).
275 .Fn krb5_config_get_string
278 to a string in the configuration database. The string not be valid
279 after reload of the configuration database
280 .\" or a call to .Fn krb5_config_set_string ,
281 so a caller should make a local copy if its need to keep the database.
283 .Fn krb5_config_free_strings
287 .Fn krb5_config_get_strings
289 .Fn krb5_config_vget_strings .
294 pointer, no action occurs.
296 .Fn krb5_config_file_free
298 .Fn krb5_config_parse_file
300 .Fn krb5_config_parse_file_multi .
302 .Xr krb5_appdefault 3 ,
303 .Xr krb5_init_context 3 ,
306 For the default functions, other than for the string case, there's no
307 way to tell whether there was a value specified or not.