/mandos/trunk

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

« back to all changes in this revision

Viewing changes to clients.conf

  • Committer: Teddy Hogeborn
  • Date: 2008-08-16 03:29:08 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080816032908-ihw7c05r2mnyk389
Add feature to specify custom environment variables for plugins.

* plugin-runner.c (plugin): New members "environ" and "envc" to
                            contain possible custom environment.
  (getplugin): Return NULL on failure instead of doing exit(); all
               callers changed.
  (add_to_char_array): New helper function for "add_argument" and
                       "add_environment".
  (addargument): Renamed to "add_argument".  Return bool.  Call
                 "add_to_char_array" to actually do things.
  (add_environment): New; analogous to "add_argument".
  (addcustomargument): Renamed to "add_to_argv" to avoid confusion
                       with "add_argument".
  (main): New options "--global-envs" and "--envs-for" to specify
          custom environment for plugins.  Print environment for
          plugins in debug mode.  Use asprintf instead of strcpy and
          strcat.  Use execve() for plugins with custom environments.
          Free environment for plugin when freeing plugin list.

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.
7
 
;timeout = 5m
 
5
# How long until a client is considered invalid - that is, ineligible
 
6
# to get the data this server holds.
 
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.
14
 
;interval = 2m
15
 
 
16
 
# Extended timeout is an added timeout that is given once after a
17
 
# password has been sent sucessfully to a client.  This allows for
18
 
# additional delays caused by file system checks and quota checks.
19
 
;extended_timeout = 15m
 
12
# "timeout" above occurs, at which time the client will be marked
 
13
# invalid, and any running checker killed.
 
14
;interval = 5m
20
15
 
21
16
# What command to run as "the checker".
22
17
;checker = fping -q -- %%(host)s
23
18
 
24
 
# Whether to approve a client by default after the approval delay.
25
 
;approved_by_default = True
26
 
 
27
 
# How long to wait for approval.
28
 
;approval_delay = 0s
29
 
 
30
 
# How long one approval will last.
31
 
;approval_duration = 1s
32
 
 
33
19
 
34
20
;####
35
21
;# Example client
57
43
;        5MHdW9AYsNJZAQSOpirE4Xi31CSlWAi9KV+cUCmWF5zOFy1x23P6PjdaRm
58
44
;        4T2zw4dxS5NswXWU0sVEXxjs6PYxuIiCTL7vdpx8QjBkrPWDrAbcMyBr2O
59
45
;        QlnHIvPzEArRQLo=
 
46
;        =iHhv
60
47
;
61
48
;# Host name; used only by the checker, not used by the server itself.
62
49
;host = foo.example.org
69
56
;fingerprint = 3e393aeaefb84c7e89e2f547b3a107558fca3a27
70
57
;
71
58
;# If "secret" is not specified, a file can be read for the data.
72
 
;secfile = /etc/mandos/bar-secret.bin
 
59
;;secfile = /etc/mandos/bar-secret.txt.asc
73
60
;
74
61
;# An IP address for host is also fine, if the checker accepts it.
75
62
;host = 192.0.2.3
76
63
;
77
64
;# Parameters from the [DEFAULT] section can be overridden per client.
78
 
;interval = 1m
79
 
;
80
 
;# This client requires manual approval before it receives its secret.
81
 
;approved_by_default = False
82
 
;# Require approval within 30 seconds.
83
 
;approval_delay = 30s
 
65
;interval = 5m
84
66
;####