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
33 .\" $Heimdal: krb5_config.3 21905 2007-08-10 10:16:45Z lha $
40 .Nm krb5_config_file_free ,
41 .Nm krb5_config_free_strings ,
43 .Nm krb5_config_get_bool ,
44 .Nm krb5_config_get_bool_default ,
45 .Nm krb5_config_get_int ,
46 .Nm krb5_config_get_int_default ,
47 .Nm krb5_config_get_list ,
48 .Nm krb5_config_get_next ,
49 .Nm krb5_config_get_string ,
50 .Nm krb5_config_get_string_default ,
51 .Nm krb5_config_get_strings ,
52 .Nm krb5_config_get_time ,
53 .Nm krb5_config_get_time_default ,
54 .Nm krb5_config_parse_file ,
55 .Nm krb5_config_parse_file_multi ,
56 .Nm krb5_config_vget ,
57 .Nm krb5_config_vget_bool ,
58 .Nm krb5_config_vget_bool_default ,
59 .Nm krb5_config_vget_int ,
60 .Nm krb5_config_vget_int_default ,
61 .Nm krb5_config_vget_list ,
62 .Nm krb5_config_vget_next ,
63 .Nm krb5_config_vget_string ,
64 .Nm krb5_config_vget_string_default ,
65 .Nm krb5_config_vget_strings ,
66 .Nm krb5_config_vget_time ,
67 .Nm krb5_config_vget_time_default
68 .Nd get configuration value
70 Kerberos 5 Library (libkrb5, -lkrb5)
74 .Fo krb5_config_file_free
75 .Fa "krb5_context context"
76 .Fa "krb5_config_section *s"
79 .Fo krb5_config_free_strings
84 .Fa "krb5_context context"
85 .Fa "const krb5_config_section *c"
90 .Fo krb5_config_get_bool
91 .Fa "krb5_context context"
92 .Fa "krb5_config_section *c"
96 .Fo krb5_config_get_bool_default
97 .Fa "krb5_context context"
98 .Fa "krb5_config_section *c"
99 .Fa "krb5_boolean def_value"
103 .Fo krb5_config_get_int
104 .Fa "krb5_context context"
105 .Fa "krb5_config_section *c"
109 .Fo krb5_config_get_int_default
110 .Fa "krb5_context context"
111 .Fa "krb5_config_section *c"
116 .Fo krb5_config_get_string
117 .Fa "krb5_context context"
118 .Fa "krb5_config_section *c"
122 .Fo krb5_config_get_string_default
123 .Fa "krb5_context context"
124 .Fa "krb5_config_section *c"
125 .Fa "const char *def_value"
129 .Fo krb5_config_get_strings
130 .Fa "krb5_context context"
131 .Fa "const krb5_config_section *c"
135 .Fo krb5_config_get_time
136 .Fa "krb5_context context"
137 .Fa "krb5_config_section *c"
141 .Fo krb5_config_get_time_default
142 .Fa "krb5_context context"
143 .Fa "krb5_config_section *c"
148 .Fo krb5_config_parse_file
149 .Fa "krb5_context context"
150 .Fa "const char *fname"
151 .Fa "krb5_config_section **res"
154 .Fo krb5_config_parse_file_multi
155 .Fa "krb5_context context"
156 .Fa "const char *fname"
157 .Fa "krb5_config_section **res"
161 .Fa "krb5_context context"
162 .Fa "const krb5_config_section *c"
167 .Fo krb5_config_vget_bool
168 .Fa "krb5_context context"
169 .Fa "const krb5_config_section *c"
173 .Fo krb5_config_vget_bool_default
174 .Fa "krb5_context context"
175 .Fa "const krb5_config_section *c"
176 .Fa "krb5_boolean def_value"
180 .Fo krb5_config_vget_int
181 .Fa "krb5_context context"
182 .Fa "const krb5_config_section *c"
186 .Fo krb5_config_vget_int_default
187 .Fa "krb5_context context"
188 .Fa "const krb5_config_section *c"
192 .Ft "const krb5_config_binding *"
193 .Fo krb5_config_vget_list
194 .Fa "krb5_context context"
195 .Fa "const krb5_config_section *c"
199 .Fo krb5_config_vget_next
200 .Fa "krb5_context context"
201 .Fa "const krb5_config_section *c"
202 .Fa "const krb5_config_binding **pointer"
207 .Fo krb5_config_vget_string
208 .Fa "krb5_context context"
209 .Fa "const krb5_config_section *c"
213 .Fo krb5_config_vget_string_default
214 .Fa "krb5_context context"
215 .Fa "const krb5_config_section *c"
216 .Fa "const char *def_value"
220 .Fo krb5_config_vget_strings
221 .Fa "krb5_context context"
222 .Fa "const krb5_config_section *c"
226 .Fo krb5_config_vget_time
227 .Fa "krb5_context context"
228 .Fa "const krb5_config_section *c"
232 .Fo krb5_config_vget_time_default
233 .Fa "krb5_context context"
234 .Fa "const krb5_config_section *c"
239 These functions get values from the
241 configuration file, or another configuration database specified by the
245 The variable arguments should be a list of strings naming each
246 subsection to look for. For example:
247 .Bd -literal -offset indent
248 krb5_config_get_bool_default(context, NULL, FALSE,
249 "libdefaults", "log_utc", NULL);
252 gets the boolean value for the
254 option, defaulting to
257 .Fn krb5_config_get_bool_default
258 will convert the option value to a boolean value, where
261 and any non-zero number means
266 .Fn krb5_config_get_int_default
267 will convert the value to an integer.
269 .Fn krb5_config_get_time_default
270 will convert the value to a period of time (not a time stamp) in
271 seconds, so the string
274 1209600 (2 * 7 * 24 * 60 * 60).
276 .Fn krb5_config_get_string
279 to a string in the configuration database. The string not be valid
280 after reload of the configuration database
281 .\" or a call to .Fn krb5_config_set_string ,
282 so a caller should make a local copy if its need to keep the database.
284 .Fn krb5_config_free_strings
288 .Fn krb5_config_get_strings
290 .Fn krb5_config_vget_strings .
295 pointer, no action occurs.
297 .Fn krb5_config_file_free
299 .Fn krb5_config_parse_file
301 .Fn krb5_config_parse_file_multi .
303 .Xr krb5_appdefault 3 ,
304 .Xr krb5_init_context 3 ,
307 For the default functions, other than for the string case, there's no
308 way to tell whether there was a value specified or not.