1
2A profile file is a generic way of storing program configuration
3information for applications.  An application may choose to consult
4multiple configuration files; for example, a Kerberos application
5might look first in ~/.krb5rc, and then in /etc/krb5.conf.  So
6/etc/krb5.conf would contain the side-wide default configuration for
7Kerberos, and ~/.krb5rc would contain the user's specific
8configuration overrides.
9
10Configuration information is stored in relations, which have a name
11and a value.  There may be multiple relations with the same name.
12Relations are always contained inside named sections.  Sections can
13contain relations and other named child sections.
14
15Top-level sections are defined by enclosing the section name in square
16braces.  Child sections are defined by enclosing the contents of the
17child section in curly braces.  Relations are defined by using the
18format "name = value".
19
20An example profile file might look like this:
21
22[libdefaults]
23	default_realm = ATHENA.MIT.EDU
24
25[realms]
26	ATHENA.MIT.EDU = {
27		kdc = kerberos.mit.edu
28		kdc = kerberos-1.mit.edu
29		kdc = kerberos-2.mit.edu
30		master_kdc = kerberos.mit.edu
31		admin_server = kerberos.mit.edu
32	}
33	CYGNUS.COM = {
34		kdc = KERBEROS-1.CYGNUS.COM
35		kdc = KERBEROS.CYGNUS.COM
36		admin_server = KERBEROS.MIT.EDU
37	}
38
39In this example, the profile file has two top-level sections,
40"libdefaults" and "realms".  The libdefaults section has a single
41relation which is named "default_realm" and has the value
42"ATHENA.MIT.EDU".  The realms section has two child sections,
43"ATHENA.MIT.EDU" and "CYGNUS.MIT.EDU".  Each of these child has a
44number of relations, "kdc", "admin_server", and (in the case of
45"ATHENA.MIT.EDU"), "default_domain".  Note that there are multiple
46relations with the name "kdc" in both sections; if a
47profile_get_values() is called querying the "kdc" relation, both
48values will be returned.
49
50Sections may be marked as "final".  If they are marked as final, then
51the contents of that section override all subsequent profile files (if
52the application is searching multiple profile files for its
53configuration information).  Normally, all of the profiles are
54searched for a matching relation, and all of the values found in all
55of the various profile files will be returned.
56
57Top-level sections are marked as final by adding an '*' character
58following the closing square brace.  Child sections are marked as
59final by adding a '*' character after the closing curly brace.  So for
60example, in this example both the "libdefaults" and "ATHENA.MIT.EDU"
61sections have been marked as final:
62
63[libdefaults]*
64	default_realm = ATHENA.MIT.EDU
65
66[realms]
67	ATHENA.MIT.EDU = {
68		kdc = kerberos.mit.edu
69		master_kdc = kerberos.mit.edu
70		admin_server = kerberos.mit.edu
71	}*
72
73