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

  • Committer: Teddy Hogeborn
  • Date: 2008-07-29 03:35:39 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080729033539-08zecoj3jwlkpjhw
* server.conf: New file.

* mandos-clients.conf: Renamed to clients.conf.

* Makefile (FORTIFY): New.
  (CFLAGS): Include $(FORTIFY).

* plugins.d/mandosclient.c (main): New "if_index" variable.  Bug fix:
                                   check if interface exists.  New
                                   "--connect" option.

* server.py (serviceInterface): Removed; replaced by
                                "AvahiService.interface".  All users
                                changed.
  (AvahiError, AvahiServiceError, AvahiGroupError): New exception
                                                    classes.
  (AvahiService): New class.
  (serviceName): Removed; replaced by "AvahiService.name".  All users
                 changed.
  (serviceType): Removed; replaced by "AvahiService.type".  All users
                 changed.
  (servicePort): Removed; replaced by "AvahiService.port".  All users
                 changed.
  (serviceTXT): Removed; replaced by "AvahiService.TXT".  All users
                changed.
  (domain): Removed; replaced by "AvahiService.domain".  All users
            changed.
  (host): Removed; replaced by "AvahiService.host".  All users
          changed.
  (rename_count): Removed; replaced by "AvahiService.rename_count" and
                 "AvahiService.max_renames".  All users changed.
  (Client.__init__): If no secret or secfile, raise TypeError instead
                     of RuntimeError.
  (Client.last_seen): Renamed to "Client.last_checked_ok".  All users
                      changed.
  (Client.stop, Client.stop_checker): Use "getattr" with default value
                                      instead of "hasattr".
  (Client.still_valid): Removed "now" argument.
  (Client.handle): Separate the "no client found" and "client invalid"
                   cases for clearer code.
  (IPv6_TCPServer.__init__): "options" argument replaced by
                             "settings".  All callers changed.
  (IPv6_TCPServer.options): Replaced by "IPv6_TCPServer.settings".
                            All users changed.
  (IPv6_TCPServer.server_bind): Use getattr instead of hasattr.
  (add_service): Removed; replaced by "AvahiService.add".  All callers
                 changed.
  (remove_service): Removed; replaced by "AvahiService.remove".  All
                    callers changed.
  (entry_group_state_changed): On entry group collision, call the new
                               AvahiService.rename method.  Raise
                               AvahiGroupError on group error.
  (if_nametoindex): Use ctypes.utils.find_library to locate the C
                    library.  Cache the result.  Loop on EINTR.
  (daemon): Use os.path.devnull to locate "/dev/null".
  (killme): Removed.  All callers changed to do "sys.exit()" instead,
            except where stated otherwise.
  (main): Removed "exitstatus".  Removed all default values from all
          non-bool options.  New option "--configdir".  New variables
          "server_defaults" and "server_settings", read from
          "%(configdir)s/server.conf".  Let any supplied command line
          options override server settings.   Variable "defaults"
          renamed to "client_defaults", which is read from
          "clients.conf" instead of "mandos-clients.conf".  New global
          AvahiService object "service" replaces old global variables.
          Catch AvahiError and exit with error if caught.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version='1.0' encoding='UTF-8'?>
2
 
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3
 
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
 
<!ENTITY VERSION "1.0">
5
 
<!ENTITY COMMANDNAME "mandos-keygen">
6
 
<!ENTITY OVERVIEW SYSTEM "overview.xml">
7
 
]>
8
 
 
9
 
<refentry>
10
 
  <refentryinfo>
11
 
    <title>&COMMANDNAME;</title>
12
 
    <!-- NWalsh's docbook scripts use this to generate the footer: -->
13
 
    <productname>&COMMANDNAME;</productname>
14
 
    <productnumber>&VERSION;</productnumber>
15
 
    <authorgroup>
16
 
      <author>
17
 
        <firstname>Björn</firstname>
18
 
        <surname>Påhlsson</surname>
19
 
        <address>
20
 
          <email>belorn@fukt.bsnet.se</email>
21
 
        </address>
22
 
      </author>
23
 
      <author>
24
 
        <firstname>Teddy</firstname>
25
 
        <surname>Hogeborn</surname>
26
 
        <address>
27
 
          <email>teddy@fukt.bsnet.se</email>
28
 
        </address>
29
 
      </author>
30
 
    </authorgroup>
31
 
    <copyright>
32
 
      <year>2008</year>
33
 
      <holder>Teddy Hogeborn &amp; Björn Påhlsson</holder>
34
 
    </copyright>
35
 
    <legalnotice>
36
 
      <para>
37
 
        This manual page is free software: you can redistribute it
38
 
        and/or modify it under the terms of the GNU General Public
39
 
        License as published by the Free Software Foundation,
40
 
        either version 3 of the License, or (at your option) any
41
 
        later version.
42
 
      </para>
43
 
 
44
 
      <para>
45
 
        This manual page is distributed in the hope that it will
46
 
        be useful, but WITHOUT ANY WARRANTY; without even the
47
 
        implied warranty of MERCHANTABILITY or FITNESS FOR A
48
 
        PARTICULAR PURPOSE.  See the GNU General Public License
49
 
        for more details.
50
 
      </para>
51
 
 
52
 
      <para>
53
 
        You should have received a copy of the GNU General Public
54
 
        License along with this program; If not, see
55
 
        <ulink url="http://www.gnu.org/licenses/"/>.
56
 
      </para>
57
 
    </legalnotice>
58
 
  </refentryinfo>
59
 
 
60
 
  <refmeta>
61
 
    <refentrytitle>&COMMANDNAME;</refentrytitle>
62
 
    <manvolnum>8</manvolnum>
63
 
  </refmeta>
64
 
  
65
 
  <refnamediv>
66
 
    <refname><command>&COMMANDNAME;</command></refname>
67
 
    <refpurpose>
68
 
      Generate keys for <citerefentry><refentrytitle>password-request
69
 
      </refentrytitle><manvolnum>8mandos</manvolnum></citerefentry>
70
 
    </refpurpose>
71
 
  </refnamediv>
72
 
 
73
 
  <refsynopsisdiv>
74
 
    <cmdsynopsis>
75
 
      <command>&COMMANDNAME;</command>
76
 
      <group choice="opt">
77
 
        <arg choice="plain"><option>--dir</option>
78
 
        <replaceable>directory</replaceable></arg>
79
 
      </group>
80
 
      <group choice="opt">
81
 
        <arg choice="plain"><option>--type</option>
82
 
        <replaceable>type</replaceable></arg>
83
 
      </group>
84
 
      <group choice="opt">
85
 
        <arg choice="plain"><option>--length</option>
86
 
        <replaceable>bits</replaceable></arg>
87
 
      </group>
88
 
      <group choice="opt">
89
 
        <arg choice="plain"><option>--name</option>
90
 
        <replaceable>NAME</replaceable></arg>
91
 
      </group>
92
 
      <group choice="opt">
93
 
        <arg choice="plain"><option>--email</option>
94
 
        <replaceable>EMAIL</replaceable></arg>
95
 
      </group>
96
 
      <group choice="opt">
97
 
        <arg choice="plain"><option>--comment</option>
98
 
        <replaceable>COMMENT</replaceable></arg>
99
 
      </group>
100
 
      <group choice="opt">
101
 
        <arg choice="plain"><option>--expire</option>
102
 
        <replaceable>TIME</replaceable></arg>
103
 
      </group>
104
 
      <group choice="opt">
105
 
        <arg choice="plain"><option>--force</option></arg>
106
 
      </group>
107
 
    </cmdsynopsis>
108
 
    <cmdsynopsis>
109
 
      <command>&COMMANDNAME;</command>
110
 
      <group choice="opt">
111
 
        <arg choice="plain"><option>-d</option>
112
 
        <replaceable>directory</replaceable></arg>
113
 
      </group>
114
 
      <group choice="opt">
115
 
        <arg choice="plain"><option>-t</option>
116
 
        <replaceable>type</replaceable></arg>
117
 
      </group>
118
 
      <group choice="opt">
119
 
        <arg choice="plain"><option>-l</option>
120
 
        <replaceable>bits</replaceable></arg>
121
 
      </group>
122
 
      <group choice="opt">
123
 
        <arg choice="plain"><option>-n</option>
124
 
        <replaceable>NAME</replaceable></arg>
125
 
      </group>
126
 
      <group choice="opt">
127
 
        <arg choice="plain"><option>-e</option>
128
 
        <replaceable>EMAIL</replaceable></arg>
129
 
      </group>
130
 
      <group choice="opt">
131
 
        <arg choice="plain"><option>-c</option>
132
 
        <replaceable>COMMENT</replaceable></arg>
133
 
      </group>
134
 
      <group choice="opt">
135
 
        <arg choice="plain"><option>-x</option>
136
 
        <replaceable>TIME</replaceable></arg>
137
 
      </group>
138
 
      <group choice="opt">
139
 
        <arg choice="plain"><option>-f</option></arg>
140
 
      </group>
141
 
    </cmdsynopsis>
142
 
    <cmdsynopsis>
143
 
      <command>&COMMANDNAME;</command>
144
 
      <group choice="req">
145
 
        <arg choice='plain'><option>-h</option></arg>
146
 
        <arg choice='plain'><option>--help</option></arg>
147
 
      </group>
148
 
    </cmdsynopsis>
149
 
    <cmdsynopsis>
150
 
      <command>&COMMANDNAME;</command>
151
 
      <group choice="req">
152
 
        <arg choice='plain'><option>-v</option></arg>
153
 
        <arg choice='plain'><option>--version</option></arg>
154
 
      </group>
155
 
    </cmdsynopsis>
156
 
  </refsynopsisdiv>
157
 
 
158
 
  <refsect1 id="description">
159
 
    <title>DESCRIPTION</title>
160
 
    <para>
161
 
      <command>&COMMANDNAME;</command> is a program to generate the
162
 
      OpenPGP keys used by
163
 
      <citerefentry><refentrytitle>password-request</refentrytitle>
164
 
      <manvolnum>8mandos</manvolnum></citerefentry>.  The keys are
165
 
      normally written to /etc/mandos for later installation into the
166
 
      initrd image, but this, like most things, can be changed with
167
 
      command line options.
168
 
    </para>
169
 
  </refsect1>
170
 
  
171
 
  <refsect1 id="purpose">
172
 
    <title>PURPOSE</title>
173
 
 
174
 
    <para>
175
 
      The purpose of this is to enable <emphasis>remote and unattended
176
 
      rebooting</emphasis> of client host computer with an
177
 
      <emphasis>encrypted root file system</emphasis>.  See <xref
178
 
      linkend="overview"/> for details.
179
 
    </para>
180
 
 
181
 
  </refsect1>
182
 
  
183
 
  <refsect1 id="options">
184
 
    <title>OPTIONS</title>
185
 
 
186
 
    <variablelist>
187
 
      <varlistentry>
188
 
        <term><literal>-h</literal>, <literal>--help</literal></term>
189
 
        <listitem>
190
 
          <para>
191
 
            Show a help message and exit
192
 
          </para>
193
 
        </listitem>
194
 
      </varlistentry>
195
 
 
196
 
      <varlistentry>
197
 
        <term><literal>-d</literal>, <literal>--dir
198
 
        <replaceable>directory</replaceable></literal></term>
199
 
        <listitem>
200
 
          <para>
201
 
            Target directory for key files.
202
 
          </para>
203
 
        </listitem>
204
 
      </varlistentry>
205
 
 
206
 
      <varlistentry>
207
 
        <term><literal>-t</literal>, <literal>--type
208
 
        <replaceable>type</replaceable></literal></term>
209
 
        <listitem>
210
 
          <para>
211
 
            Key type.  Default is DSA.
212
 
          </para>
213
 
        </listitem>
214
 
      </varlistentry>
215
 
 
216
 
      <varlistentry>
217
 
        <term><literal>-l</literal>, <literal>--length
218
 
        <replaceable>bits</replaceable></literal></term>
219
 
        <listitem>
220
 
          <para>
221
 
            Key length in bits.  Default is 1024.
222
 
          </para>
223
 
        </listitem>
224
 
      </varlistentry>
225
 
 
226
 
      <varlistentry>
227
 
        <term><literal>-e</literal>, <literal>--email</literal>
228
 
        <replaceable>address</replaceable></term>
229
 
        <listitem>
230
 
          <para>
231
 
            Email address of key.  Default is empty.
232
 
          </para>
233
 
        </listitem>
234
 
      </varlistentry>
235
 
 
236
 
      <varlistentry>
237
 
        <term><literal>-c</literal>, <literal>--comment</literal>
238
 
        <replaceable>comment</replaceable></term>
239
 
        <listitem>
240
 
          <para>
241
 
            Comment field for key.  The default value is
242
 
            "<literal>Mandos client key</literal>".
243
 
          </para>
244
 
        </listitem>
245
 
      </varlistentry>
246
 
 
247
 
      <varlistentry>
248
 
        <term><literal>-x</literal>, <literal>--expire</literal>
249
 
        <replaceable>time</replaceable></term>
250
 
        <listitem>
251
 
          <para>
252
 
            Key expire time.  Default is no expiration.  See
253
 
            <citerefentry><refentrytitle>gpg</refentrytitle>
254
 
            <manvolnum>1</manvolnum></citerefentry> for syntax.
255
 
          </para>
256
 
        </listitem>
257
 
      </varlistentry>
258
 
 
259
 
      <varlistentry>
260
 
        <term><literal>-f</literal>, <literal>--force</literal></term>
261
 
        <listitem>
262
 
          <para>
263
 
            Force overwriting old keys.
264
 
          </para>
265
 
        </listitem>
266
 
      </varlistentry>
267
 
    </variablelist>
268
 
  </refsect1>
269
 
 
270
 
  <refsect1 id="overview">
271
 
    <title>OVERVIEW</title>
272
 
    &OVERVIEW;
273
 
    <para>
274
 
      This program is a small program to generate new OpenPGP keys for
275
 
      new Mandos clients.
276
 
    </para>
277
 
  </refsect1>
278
 
 
279
 
  <refsect1 id="exit_status">
280
 
    <title>EXIT STATUS</title>
281
 
    <para>
282
 
      The exit status will be 0 if new keys were successfully created,
283
 
      otherwise not.
284
 
    </para>
285
 
  </refsect1>
286
 
  
287
 
  <refsect1 id="environment">
288
 
    <title>ENVIRONMENT</title>
289
 
    <variablelist>
290
 
      <varlistentry>
291
 
        <term><varname>TMPDIR</varname></term>
292
 
        <listitem>
293
 
          <para>
294
 
            If set, temporary files will be created here. See
295
 
            <citerefentry><refentrytitle>mktemp</refentrytitle>
296
 
            <manvolnum>1</manvolnum></citerefentry>.
297
 
          </para>
298
 
        </listitem>
299
 
      </varlistentry>
300
 
    </variablelist>
301
 
  </refsect1>
302
 
  
303
 
  <refsect1 id="file">
304
 
    <title>FILES</title>
305
 
    <para>
306
 
      Use the <option>--dir</option> option to change where
307
 
      <command>&COMMANDNAME;</command> will write the key files.  The
308
 
      default file names are shown here.
309
 
    </para>
310
 
    <variablelist>
311
 
      <varlistentry>
312
 
        <term><filename>/etc/mandos/seckey.txt</filename></term>
313
 
        <listitem>
314
 
          <para>
315
 
            OpenPGP secret key file which will be created or
316
 
            overwritten.
317
 
          </para>
318
 
        </listitem>
319
 
      </varlistentry>
320
 
      <varlistentry>
321
 
        <term><filename>/etc/mandos/pubkey.txt</filename></term>
322
 
        <listitem>
323
 
          <para>
324
 
            OpenPGP public key file which will be created or
325
 
            overwritten.
326
 
          </para>
327
 
        </listitem>
328
 
      </varlistentry>
329
 
      <varlistentry>
330
 
        <term><filename>/tmp</filename></term>
331
 
        <listitem>
332
 
          <para>
333
 
            Temporary files will be written here if
334
 
            <varname>TMPDIR</varname> is not set.
335
 
          </para>
336
 
        </listitem>
337
 
      </varlistentry>
338
 
    </variablelist>
339
 
  </refsect1>
340
 
 
341
 
  <refsect1 id="bugs">
342
 
    <title>BUGS</title>
343
 
    <para>
344
 
      None are known at this time.
345
 
    </para>
346
 
  </refsect1>
347
 
 
348
 
  <refsect1 id="example">
349
 
    <title>EXAMPLE</title>
350
 
    <informalexample>
351
 
      <para>
352
 
        Normal invocation needs no options:
353
 
      </para>
354
 
      <para>
355
 
        <userinput>mandos-keygen</userinput>
356
 
      </para>
357
 
    </informalexample>
358
 
    <informalexample>
359
 
      <para>
360
 
        Create keys in another directory and of another type.  Force
361
 
        overwriting old key files:
362
 
      </para>
363
 
      <para>
364
 
 
365
 
<!-- do not wrap this line -->
366
 
<userinput>mandos-keygen --dir ~/keydir --type RSA --force</userinput>
367
 
 
368
 
      </para>
369
 
    </informalexample>
370
 
  </refsect1>
371
 
 
372
 
  <refsect1 id="security">
373
 
    <title>SECURITY</title>
374
 
    <para>
375
 
      The <option>--type</option> and <option>--length</option>
376
 
      options can be used to create keys of insufficient security.  If
377
 
      in doubt, leave them to the default values.
378
 
    </para>
379
 
    <para>
380
 
      The key expire time is not guaranteed to be honored by
381
 
      <citerefentry><refentrytitle>mandos</refentrytitle>
382
 
      <manvolnum>8</manvolnum></citerefentry>.
383
 
    </para>
384
 
  </refsect1>
385
 
 
386
 
  <refsect1 id="see_also">
387
 
    <title>SEE ALSO</title>
388
 
    <para>
389
 
      <citerefentry><refentrytitle>password-request</refentrytitle>
390
 
      <manvolnum>8mandos</manvolnum></citerefentry>,
391
 
      <citerefentry><refentrytitle>mandos</refentrytitle>
392
 
      <manvolnum>8</manvolnum></citerefentry>, and
393
 
      <citerefentry><refentrytitle>gpg</refentrytitle>
394
 
      <manvolnum>1</manvolnum></citerefentry>
395
 
    </para>
396
 
  </refsect1>
397
 
  
398
 
</refentry>