/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 README

  • Committer: Teddy Hogeborn
  • Date: 2009-10-24 19:17:52 UTC
  • Revision ID: teddy@fukt.bsnet.se-20091024191752-7g6xlf6wpp2pdexb
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:
99
99
   Multiple Mandos servers can coexist on a network without any
100
100
   trouble.  They do not clash, and clients will try all available
101
101
   servers.  This means that if just one reboots then the other can
102
 
   bring it back up, but if both reboot at the same time they will
 
102
   bring it back up, but if both reboots at the same time they will
103
103
   stay down until someone types in the password on one of them.
104
104
 
105
105
** Faking ping replies?
144
144
  plugins to run, all competing to be the first to find a password and
145
145
  provide it to the plugin runner.
146
146
  
147
 
  Four additional plugins are provided:
148
 
  * plymouth(8mandos)
149
 
    This prompts for a password when using plymouth(8).
 
147
  Three additional plugins are provided:
150
148
  * usplash(8mandos)
151
149
    This prompts for a password when using usplash(8).
152
150
  * splashy(8mandos)
162
160
 
163
161
* Copyright
164
162
 
165
 
    Copyright © 2008-2011 Teddy Hogeborn
166
 
    Copyright © 2008-2011 Björn Påhlsson
 
163
    Copyright © 2008,2009 Teddy Hogeborn
 
164
    Copyright © 2008,2009 Björn Påhlsson
167
165
  
168
166
** License:
169
167