1conf(3)               User Contributed Perl Documentation              conf(3)
2
3
4

NAME

6       Net::DNS::SEC::Tools::conf - DNSSEC-Tools configuration routines.
7

SYNOPSIS

9         use Net::DNS::SEC::Tools::conf;
10
11         %dtconf = parseconfig();
12
13         %dtconf = parseconfig("localzone.keyrec");
14
15         cmdcheck(\%options_hashref);
16
17         $prefixdir = getprefixdir();
18
19         $confdir = getconfdir();
20
21         $conffile = getconffile();
22
23         $statedir = getlocalstatedir();
24
25         erraction(ERR_MSG);
26         err("unable to open keyrec file",1);
27

DESCRIPTION

29       The routines in this module perform configuration operations.  Some
30       routines access the DNSSEC-Tools configuration file, while others vali‐
31       date the execution environment.
32
33       The DNSSEC tools have a configuration file for commonly used values.
34       These values are the defaults for a variety of things, such as encryp‐
35       tion algorithm and encryption key length.  The
36       Net::DNS::SEC::Tools::conf module provides methods for accessing the
37       configuration data in this file.
38
39       dnssec-tools.conf is the filename for the DNSSEC tools configuration
40       file.  The full path depends on how DNSSEC-Tools was configured; see
41       the DIRECTORIES section for the complete path.  The paths required by
42       conf.pm are set at DNSSEC-Tools configuration time.
43
44       The DNSSEC tools configuration file consists of a set of configuration
45       value entries, with only one entry per line.  Each entry has the "key‐
46       word value" format.  During parsing, the line is broken into tokens,
47       with tokens being separated by spaces and tabs.  The first token in a
48       line is taken to be the keyword.  All other tokens in that line are
49       concatenated into a single string, with a space separating each token.
50       The untokenized string is added to a hash table, with the keyword as
51       the value's key.
52
53       Comments may be included by prefacing them with the '#' or ';' comment
54       characters.  These comments can encompass an entire line or may follow
55       a configuration entry.  If a comment shares a line with an entry, value
56       tokenization stops just prior to the comment character.
57
58       An example configuration file follows:
59
60           # Sample configuration entries.
61
62           algorithm       rsasha1     # Encryption algorithm.
63           ksk_length      1024        ; KSK key length.
64
65       Another aspect of DNSSEC-Tools configuration is the error action used
66       by the DNSSEC-Tools Perl modules.  The action dictates whether an error
67       condition will only give an error return, print an error message to
68       STDERR, or print an error message and exit.  The erraction() and err()
69       interfaces are used for these operations.
70

INTERFACES

72       parseconfig()
73           This routine reads and parses the system's DNSSEC tools configura‐
74           tion file.  The parsed contents are put into a hash table, which is
75           returned to the caller.
76
77       parseconfig(conffile)
78           This routine reads and parses a caller-specified DNSSEC tools con‐
79           figuration file.  The parsed contents are put into a hash table,
80           which is returned to the caller.  The routine quietly returns if
81           the configuration file does not exist.
82
83       cmdcheck(\%options_hashref)
84           This routine ensures that the needed commands are available and
85           executable.  If any of the commands either don't exist or aren't
86           executable, then an error message will be given and the process
87           will exit.  If all is well, everything will proceed quietly
88           onwards.
89
90           The commands keys currently checked are zonecheck, keygen, and
91           zonesign.  The pathnames for these commands are found in the given
92           options hash referenced by %options_hashref.  If the hash doesn't
93           contain an entry for one of those commands, it is not checked.
94
95       getconfdir()
96           This routine returns the name of the DNSSEC-Tools configuration
97           directory.
98
99       getconffile()
100           This routine returns the name of the DNSSEC-Tools configuration
101           file.
102
103       getprefixdir()
104           This routine returns the name of the DNSSEC-Tools prefix directory.
105
106       getlocalstatedir()
107           This routine returns the name of the local state directory.
108
109       erraction(error_action)
110           This interface sets the error action for DNSSEC-Tools Perl modules.
111           The valid actions are:
112
113               ERR_SILENT          Do not print an error message, do not exit.
114               ERR_MSG             Print an error message, do not exit.
115               ERR_EXIT            Print an error message, exit.
116
117           ERR_SILENT is the default action.
118
119           The previously set error action is returned.
120
121       err("error message",exit_code
122           The err() interface is used by the DNSSEC-Tools Perl modules to
123           report an error and exit, depending on the error action.
124
125           The first argument is an error message to print -- if the error
126           action allows error messages to be printed.
127
128           The second argument is an exit code -- if the error action requires
129           that the process exit.
130

DIRECTORIES

132       The default directories for this installation are:
133
134         prefix                         : /usr
135         sysconf                        : /etc
136         DNSSEC-Tools configuration file: /etc/dnssec-tools
137
139       Copyright 2004-2007 SPARTA, Inc.  All rights reserved.  See the COPYING
140       file included with the DNSSEC-Tools package for details.
141

AUTHOR

143       Wayne Morrison, tewok@users.sourceforge.net
144

SEE ALSO

146       dnssec-tools.conf(5)
147
148
149
150perl v5.8.8                       2008-02-15                           conf(3)
Impressum