/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to mandos-clients.conf.xml

Convert some programs to use the exit codes from <sysexits.h>.  Change
all programs using the "argp" parsing functions to use them correctly;
checking return value, using argp_error() to report parse errors etc.

* plugin-runner.c: Use <sysexits.h> exit codes.  Always use fallback,
                   even on option errors, except for "--help", etc.
  (getplugin): Make sure "errno" is set correctly on return.
  (main): Declare our own "--help", "--usage", and "--version"
          options which do not cause the fallback to be invoked.
          In all other options, use fallback on any error.
  (parse_opt, parse_opt_config_file): Reset errno at start and return
                                      errno.  No need to check "arg"
                                      for NULL.  New "--help",
                                      "--usage", and "--version"
                                      options.
  (parse_opt): Accept empty string as global option.  Do not print
               errors which will be detected and reported later.  Do
               "argp_error()" on parse error or empty plugin names.
* plugins.d/mandos-client.c: Use <sysexits.h> exit codes.  Do not
                             return successful exit code on "--help",
                             etc. since this would give the wrong
                             message to "plugin-runner".
  (main): Declare our own "--help", "--usage", and "--version"
          options which do not return a successful exit code.
  (parse_opt): Reset errno at start and return errno.  Do
               "argp_error()" on parse errors.  New "--help",
               "--usage", and "--version" options.
* plugins.d/password-prompt.c: Use exit codes from <sysexits.h>.  Do
                               not return successful exit code on
                               "--help", etc. since this would give
                               the wrong message to "plugin-runner".
  (main): Declare our own "--help", "--usage", and "--version" options
          which do not return a successful exit code.  Do
          close(STDOUT_FILENO) after writing to check its return code.
  (parse_opt): Reset errno at start and return errno.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
4
<!ENTITY CONFNAME "mandos-clients.conf">
5
5
<!ENTITY CONFPATH "<filename>/etc/mandos/clients.conf</filename>">
6
 
<!ENTITY TIMESTAMP "2008-09-30">
 
6
<!ENTITY TIMESTAMP "2009-09-17">
7
7
<!ENTITY % common SYSTEM "common.ent">
8
8
%common;
9
9
]>
33
33
    </authorgroup>
34
34
    <copyright>
35
35
      <year>2008</year>
 
36
      <year>2009</year>
36
37
      <holder>Teddy Hogeborn</holder>
37
38
      <holder>Björn Påhlsson</holder>
38
39
    </copyright>
107
108
            This option is <emphasis>optional</emphasis>.
108
109
          </para>
109
110
          <para>
110
 
            The timeout is how long the server will wait for a
111
 
            successful checker run until a client is considered
112
 
            invalid - that is, ineligible to get the data this server
113
 
            holds.  By default Mandos will use 1 hour.
 
111
            The timeout is how long the server will wait (for either a
 
112
            successful checker run or a client receiving its secret)
 
113
            until a client is considered invalid - that is, ineligible
 
114
            to get the data this server holds.  By default Mandos will
 
115
            use 1 hour.
114
116
          </para>
115
117
          <para>
116
118
            The <replaceable>TIME</replaceable> is specified as a
169
171
            <varname>PATH</varname> will be searched.  The default
170
172
            value for the checker command is <quote><literal
171
173
            ><command>fping</command> <option>-q</option> <option
172
 
            >--</option> %(host)s</literal></quote>.
 
174
            >--</option> %%(host)s</literal></quote>.
173
175
          </para>
174
176
          <para>
175
177
            In addition to normal start time expansion, this option
240
242
            should <emphasis>not</emphasis> be base64-encoded, but
241
243
            will be sent to clients verbatim.
242
244
          </para>
 
245
          <para>
 
246
            File names of the form <filename>~user/foo/bar</filename>
 
247
            and <filename>$<envar>ENVVAR</envar>/foo/bar</filename>
 
248
            are supported.
 
249
          </para>
243
250
        </listitem>
244
251
      </varlistentry>
245
252
      
251
258
            This option is <emphasis>optional</emphasis>, but highly
252
259
            <emphasis>recommended</emphasis> unless the
253
260
            <option>checker</option> option is modified to a
254
 
            non-standard value without <quote>%(host)s</quote> in it.
 
261
            non-standard value without <quote>%%(host)s</quote> in it.
255
262
          </para>
256
263
          <para>
257
264
            Host name for this client.  This is not used by the server
345
352
[DEFAULT]
346
353
timeout = 1h
347
354
interval = 5m
348
 
checker = fping -q -- %(host)s
 
355
checker = fping -q -- %%(host)s
349
356
 
350
357
# Client "foo"
351
358
[foo]