/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 clients.conf

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:
2
2
# values, so uncomment and change them if you want different ones.
3
3
[DEFAULT]
4
4
 
5
 
# How long until a client is disabled and not be allowed to get the
6
 
# data this server holds.
 
5
# How long until a client is considered invalid - that is, ineligible
 
6
# to get the data this server holds.
7
7
;timeout = 1h
8
8
 
9
9
# How often to run the checker to confirm that a client is still up.
10
10
# Note: a new checker will not be started if an old one is still
11
11
# running.  The server will wait for a checker to complete until the
12
 
# above "timeout" occurs, at which time the client will be disabled,
13
 
# and any running checker killed.
 
12
# above "timeout" occurs, at which time the client will be marked
 
13
# invalid, and any running checker killed.
14
14
;interval = 5m
15
15
 
16
16
# What command to run as "the checker".
17
17
;checker = fping -q -- %%(host)s
18
18
 
19
 
# Whether to approve a client by default after the approval delay.
20
 
;approved_by_default = True
21
 
 
22
 
# How long to wait for approval.
23
 
;approval_delay = 0s
24
 
 
25
 
# How long one approval will last.
26
 
;approval_duration = 1s
27
 
 
28
19
 
29
20
;####
30
21
;# Example client
71
62
;
72
63
;# Parameters from the [DEFAULT] section can be overridden per client.
73
64
;interval = 5m
74
 
;
75
 
;# This client requires manual approval before it receives its secret.
76
 
;approved_by_default = False
77
 
;# Require approval within 30 seconds.
78
 
;approval_delay = 30s
79
65
;####