Merge from vendor branch FILE:
[dragonfly.git] / crypto / heimdal-0.6.3 / lib / krb5 / krb5_config.3
1 .\" Copyright (c) 2000 Kungliga Tekniska Högskolan
2 .\" $Id: krb5_config.3,v 1.5 2003/04/16 13:58:14 lha Exp $
3 .Dd July 25, 2000
4 .Dt KRB5_CONFIG 3
5 .Os HEIMDAL
6 .Sh NAME
7 .Nm krb5_config_get_bool_default ,
8 .Nm krb5_config_get_int_default ,
9 .Nm krb5_config_get_string_default ,
10 .Nm krb5_config_get_time_default
11 .Nd get configuration value
12 .Sh LIBRARY
13 Kerberos 5 Library (libkrb5, -lkrb5)
14 .Sh SYNOPSIS
15 .In krb5.h
16 .Ft krb5_boolean
17 .Fn krb5_config_get_bool_default "krb5_context context" "krb5_config_section *c" "krb5_boolean def_value" "..."
18 .Ft int
19 .Fn krb5_config_get_int_default "krb5_context context" "krb5_config_section *c" "int def_value" "..."
20 .Ft const char*
21 .Fn krb5_config_get_string_default "krb5_context context" "krb5_config_section *c" "const char *def_value" "..."
22 .Ft int
23 .Fn krb5_config_get_time_default "krb5_context context" "krb5_config_section *c" "int def_value" "..."
24 .Sh DESCRIPTION
25 These functions get values from the
26 .Xr krb5.conf 5
27 configuration file, or another configuration database specified by the
28 .Fa c
29 parameter.
30 .Pp
31 The variable arguments should be a list of strings naming each
32 subsection to look for. For example:
33 .Bd -literal -offset indent
34 krb5_config_get_bool_default(context, NULL, FALSE, "libdefaults", "log_utc", NULL)
35 .Ed
36 .Pp
37 gets the boolean value for the
38 .Dv log_utc
39 option, defaulting to
40 .Dv FALSE .
41 .Pp
42 .Fn krb5_config_get_bool_default
43 will convert the option value to a boolean value, where
44 .Sq yes ,
45 .Sq true ,
46 and any non-zero number means
47 .Dv TRUE ,
48 and any other value
49 .Dv FALSE .
50 .Pp
51 .Fn krb5_config_get_int_default
52 will convert the value to an integer.
53 .Pp
54 .Fn krb5_config_get_time_default
55 will convert the value to a period of time (not a time stamp) in
56 seconds, so the string
57 .Sq 2 weeks
58 will be converted to
59 1209600 (2 * 7 * 24 * 60 * 60).
60 .Sh BUGS
61 Other than for the string case, there's no way to tell whether there
62 was a value specified or not.
63 .Sh SEE ALSO
64 .Xr krb5_appdefault 3 ,
65 .Xr krb5.conf 5