/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 mandos-keygen.xml

  • 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:
2
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3
3
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
4
<!ENTITY COMMANDNAME "mandos-keygen">
5
 
<!ENTITY TIMESTAMP "2013-10-22">
 
5
<!ENTITY TIMESTAMP "2009-01-04">
6
6
<!ENTITY % common SYSTEM "common.ent">
7
7
%common;
8
8
]>
19
19
        <firstname>Björn</firstname>
20
20
        <surname>Påhlsson</surname>
21
21
        <address>
22
 
          <email>belorn@recompile.se</email>
 
22
          <email>belorn@fukt.bsnet.se</email>
23
23
        </address>
24
24
      </author>
25
25
      <author>
26
26
        <firstname>Teddy</firstname>
27
27
        <surname>Hogeborn</surname>
28
28
        <address>
29
 
          <email>teddy@recompile.se</email>
 
29
          <email>teddy@fukt.bsnet.se</email>
30
30
        </address>
31
31
      </author>
32
32
    </authorgroup>
33
33
    <copyright>
34
34
      <year>2008</year>
35
35
      <year>2009</year>
36
 
      <year>2011</year>
37
 
      <year>2012</year>
38
36
      <holder>Teddy Hogeborn</holder>
39
37
      <holder>Björn Påhlsson</holder>
40
38
    </copyright>
215
213
        <listitem>
216
214
          <para>
217
215
            Target directory for key files.  Default is
218
 
            <filename class="directory">/etc/mandos</filename>.
 
216
            <filename>/etc/mandos</filename>.
219
217
          </para>
220
218
        </listitem>
221
219
      </varlistentry>
227
225
        <replaceable>TYPE</replaceable></option></term>
228
226
        <listitem>
229
227
          <para>
230
 
            Key type.  Default is <quote>RSA</quote>.
 
228
            Key type.  Default is <quote>DSA</quote>.
231
229
          </para>
232
230
        </listitem>
233
231
      </varlistentry>
239
237
        <replaceable>BITS</replaceable></option></term>
240
238
        <listitem>
241
239
          <para>
242
 
            Key length in bits.  Default is 4096.
 
240
            Key length in bits.  Default is 2048.
243
241
          </para>
244
242
        </listitem>
245
243
      </varlistentry>
251
249
        <replaceable>KEYTYPE</replaceable></option></term>
252
250
        <listitem>
253
251
          <para>
254
 
            Subkey type.  Default is <quote>RSA</quote> (Elgamal
 
252
            Subkey type.  Default is <quote>ELG-E</quote> (Elgamal
255
253
            encryption-only).
256
254
          </para>
257
255
        </listitem>
264
262
        <replaceable>BITS</replaceable></option></term>
265
263
        <listitem>
266
264
          <para>
267
 
            Subkey length in bits.  Default is 4096.
 
265
            Subkey length in bits.  Default is 2048.
268
266
          </para>
269
267
        </listitem>
270
268
      </varlistentry>
288
286
        <replaceable>TEXT</replaceable></option></term>
289
287
        <listitem>
290
288
          <para>
291
 
            Comment field for key.  Default is empty.
 
289
            Comment field for key.  The default value is
 
290
            <quote><literal>Mandos client key</literal></quote>.
292
291
          </para>
293
292
        </listitem>
294
293
      </varlistentry>
411
410
        </listitem>
412
411
      </varlistentry>
413
412
      <varlistentry>
414
 
        <term><filename class="directory">/tmp</filename></term>
 
413
        <term><filename>/tmp</filename></term>
415
414
        <listitem>
416
415
          <para>
417
416
            Temporary files will be written here if
452
451
    </informalexample>
453
452
    <informalexample>
454
453
      <para>
455
 
        Prompt for a password, encrypt it with the key in <filename
456
 
        class="directory">/etc/mandos</filename> and output a section
457
 
        suitable for <filename>clients.conf</filename>.
 
454
        Prompt for a password, encrypt it with the key in
 
455
        <filename>/etc/mandos</filename> and output a section suitable
 
456
        for <filename>clients.conf</filename>.
458
457
      </para>
459
458
      <para>
460
459
        <userinput>&COMMANDNAME; --password</userinput>
493
492
  <refsect1 id="see_also">
494
493
    <title>SEE ALSO</title>
495
494
    <para>
496
 
      <citerefentry><refentrytitle>intro</refentrytitle>
497
 
      <manvolnum>8mandos</manvolnum></citerefentry>,
498
495
      <citerefentry><refentrytitle>gpg</refentrytitle>
499
496
      <manvolnum>1</manvolnum></citerefentry>,
500
497
      <citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>