/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 plugin-runner.xml

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="UTF-8"?>
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
 
<!ENTITY VERSION "1.0">
5
4
<!ENTITY COMMANDNAME "plugin-runner">
6
 
<!ENTITY TIMESTAMP "2008-09-02">
 
5
<!ENTITY TIMESTAMP "2008-09-30">
 
6
<!ENTITY % common SYSTEM "common.ent">
 
7
%common;
7
8
]>
8
9
 
9
10
<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
11
12
    <title>Mandos Manual</title>
12
13
    <!-- Nwalsh’s docbook scripts use this to generate the footer: -->
13
14
    <productname>Mandos</productname>
14
 
    <productnumber>&VERSION;</productnumber>
 
15
    <productnumber>&version;</productnumber>
15
16
    <date>&TIMESTAMP;</date>
16
17
    <authorgroup>
17
18
      <author>
36
37
    </copyright>
37
38
    <xi:include href="legalnotice.xml"/>
38
39
  </refentryinfo>
39
 
 
 
40
  
40
41
  <refmeta>
41
42
    <refentrytitle>&COMMANDNAME;</refentrytitle>
42
43
    <manvolnum>8mandos</manvolnum>
45
46
  <refnamediv>
46
47
    <refname><command>&COMMANDNAME;</command></refname>
47
48
    <refpurpose>
48
 
      Run Mandos plugins.  Pass data from first succesful one.
 
49
      Run Mandos plugins, pass data from first to succeed.
49
50
    </refpurpose>
50
51
  </refnamediv>
51
 
 
 
52
  
52
53
  <refsynopsisdiv>
53
54
    <cmdsynopsis>
54
55
      <command>&COMMANDNAME;</command>
55
56
      <group rep="repeat">
56
57
        <arg choice="plain"><option>--global-env=<replaceable
57
 
        >VAR</replaceable><literal>=</literal><replaceable
 
58
        >ENV</replaceable><literal>=</literal><replaceable
58
59
        >value</replaceable></option></arg>
59
60
        <arg choice="plain"><option>-G
60
 
        <replaceable>VAR</replaceable><literal>=</literal><replaceable
 
61
        <replaceable>ENV</replaceable><literal>=</literal><replaceable
61
62
        >value</replaceable> </option></arg>
62
63
      </group>
63
64
      <sbr/>
140
141
    <title>DESCRIPTION</title>
141
142
    <para>
142
143
      <command>&COMMANDNAME;</command> is a program which is meant to
143
 
      be specified as <quote>keyscript</quote> in <citerefentry>
144
 
      <refentrytitle>crypttab</refentrytitle>
145
 
      <manvolnum>5</manvolnum></citerefentry> for the root disk.  The
146
 
      aim of this program is therefore to output a password, which
147
 
      then <citerefentry><refentrytitle>cryptsetup</refentrytitle>
 
144
      be specified as a <quote>keyscript</quote> for the root disk in
 
145
      <citerefentry><refentrytitle>crypttab</refentrytitle>
 
146
      <manvolnum>5</manvolnum></citerefentry>.  The aim of this
 
147
      program is therefore to output a password, which then
 
148
      <citerefentry><refentrytitle>cryptsetup</refentrytitle>
148
149
      <manvolnum>8</manvolnum></citerefentry> will use to unlock the
149
150
      root disk.
150
151
    </para>
170
171
    <variablelist>
171
172
      <varlistentry>
172
173
        <term><option>--global-env
173
 
        <replaceable>VAR</replaceable><literal>=</literal><replaceable
 
174
        <replaceable>ENV</replaceable><literal>=</literal><replaceable
174
175
        >value</replaceable></option></term>
175
176
        <term><option>-G
176
 
        <replaceable>VAR</replaceable><literal>=</literal><replaceable
 
177
        <replaceable>ENV</replaceable><literal>=</literal><replaceable
177
178
        >value</replaceable></option></term>
178
179
        <listitem>
179
180
          <para>
247
248
          </para>
248
249
        </listitem>
249
250
      </varlistentry>
250
 
 
 
251
      
251
252
      <varlistentry>
252
253
        <term><option>--disable
253
254
        <replaceable>PLUGIN</replaceable></option></term>
261
262
          </para>       
262
263
        </listitem>
263
264
      </varlistentry>
264
 
 
 
265
      
265
266
      <varlistentry>
266
267
        <term><option>--enable
267
268
        <replaceable>PLUGIN</replaceable></option></term>
272
273
            Re-enable the plugin named
273
274
            <replaceable>PLUGIN</replaceable>.  This is only useful to
274
275
            undo a previous <option>--disable</option> option, maybe
275
 
            from the config file.
 
276
            from the configuration file.
276
277
          </para>
277
278
        </listitem>
278
279
      </varlistentry>
279
 
 
 
280
      
280
281
      <varlistentry>
281
282
        <term><option>--groupid
282
283
        <replaceable>ID</replaceable></option></term>
289
290
          </para>
290
291
        </listitem>
291
292
      </varlistentry>
292
 
 
 
293
      
293
294
      <varlistentry>
294
295
        <term><option>--userid
295
296
        <replaceable>ID</replaceable></option></term>
302
303
          </para>
303
304
        </listitem>
304
305
      </varlistentry>
305
 
 
 
306
      
306
307
      <varlistentry>
307
308
        <term><option>--plugin-dir
308
309
        <replaceable>DIRECTORY</replaceable></option></term>
365
366
          </para>
366
367
        </listitem>
367
368
      </varlistentry>
368
 
 
 
369
      
369
370
      <varlistentry>
370
371
        <term><option>--version</option></term>
371
372
        <term><option>-V</option></term>
377
378
      </varlistentry>
378
379
    </variablelist>
379
380
  </refsect1>
380
 
 
 
381
  
381
382
  <refsect1 id="overview">
382
383
    <title>OVERVIEW</title>
383
384
    <xi:include href="overview.xml"/>
403
404
      code will make this plugin-runner output the password from that
404
405
      plugin, stop any other plugins, and exit.
405
406
    </para>
406
 
 
 
407
    
407
408
    <refsect2 id="writing_plugins">
408
409
      <title>WRITING PLUGINS</title>
409
410
      <para>
416
417
        console.
417
418
      </para>
418
419
      <para>
 
420
        If the password is a single-line, manually entered passprase,
 
421
        a final trailing newline character should
 
422
        <emphasis>not</emphasis> be printed.
 
423
      </para>
 
424
      <para>
419
425
        The plugin will run in the initial RAM disk environment, so
420
426
        care must be taken not to depend on any files or running
421
427
        services not available there.
428
434
      </para>
429
435
      <para>
430
436
        The plugin must not use resources, like for instance reading
431
 
        from the standard input, without knowing that no other plugins
432
 
        are also using it.
 
437
        from the standard input, without knowing that no other plugin
 
438
        is also using it.
433
439
      </para>
434
440
      <para>
435
441
        It is useful, but not required, for the plugin to take the
467
473
      only passes on its environment to all the plugins.  The
468
474
      environment passed to plugins can be modified using the
469
475
      <option>--global-env</option> and <option>--env-for</option>
470
 
      optins.
 
476
      options.
471
477
    </para>
472
478
  </refsect1>
473
479
  
510
516
    </para>
511
517
  </refsect1>
512
518
  
513
 
<!--   <refsect1 id="bugs"> -->
514
 
<!--     <title>BUGS</title> -->
515
 
<!--     <para> -->
516
 
<!--     </para> -->
517
 
<!--   </refsect1> -->
 
519
  <refsect1 id="bugs">
 
520
    <title>BUGS</title>
 
521
    <para>
 
522
      The <option>--config-file</option> option is ignored when
 
523
      specified from within a configuration file.
 
524
    </para>
 
525
  </refsect1>
518
526
  
519
527
  <refsect1 id="examples">
520
528
    <title>EXAMPLE</title>
562
570
    </informalexample>
563
571
    <informalexample>
564
572
      <para>
565
 
        Run plugins from a different directory and add a special
566
 
        option to the <citerefentry><refentrytitle
567
 
        >password-request</refentrytitle>
 
573
        Run plugins from a different directory, read a different
 
574
        configuration file, and add two options to the
 
575
        <citerefentry><refentrytitle >mandos-client</refentrytitle>
568
576
        <manvolnum>8mandos</manvolnum></citerefentry> plugin:
569
577
      </para>
570
578
      <para>
571
579
 
572
580
<!-- do not wrap this line -->
573
 
<userinput>&COMMANDNAME;  --plugin-dir=plugins.d --options-for=password-request:--keydir=keydir</userinput>
 
581
<userinput>&COMMANDNAME;  --config-file=/etc/mandos/plugin-runner.conf --plugin-dir /usr/lib/mandos/plugins.d --options-for=mandos-client:--pubkey=/etc/keys/mandos/pubkey.txt,--seckey=/etc/keys/mandos/seckey.txt</userinput>
574
582
 
575
583
      </para>
576
584
    </informalexample>
584
592
      non-privileged.  This user and group is then what all plugins
585
593
      will be started as.  Therefore, the only way to run a plugin as
586
594
      a privileged user is to have the set-user-ID or set-group-ID bit
587
 
      set on the plugin executable files (see <citerefentry>
 
595
      set on the plugin executable file (see <citerefentry>
588
596
      <refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum>
589
597
      </citerefentry>).
590
598
    </para>
591
599
    <para>
592
600
      If this program is used as a keyscript in <citerefentry
593
601
      ><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum>
594
 
      </citerefentry>, there is a risk that if this program fails to
595
 
      work, there might be no way to boot the system except for
596
 
      booting from another media and editing the initial RAM disk
 
602
      </citerefentry>, there is a slight risk that if this program
 
603
      fails to work, there might be no way to boot the system except
 
604
      for booting from another media and editing the initial RAM disk
597
605
      image to not run this program.  This is, however, unlikely,
598
606
      since the <citerefentry><refentrytitle
599
607
      >password-prompt</refentrytitle><manvolnum>8mandos</manvolnum>
618
626
      <manvolnum>8</manvolnum></citerefentry>,
619
627
      <citerefentry><refentrytitle>password-prompt</refentrytitle>
620
628
      <manvolnum>8mandos</manvolnum></citerefentry>,
621
 
      <citerefentry><refentrytitle>password-request</refentrytitle>
 
629
      <citerefentry><refentrytitle>mandos-client</refentrytitle>
622
630
      <manvolnum>8mandos</manvolnum></citerefentry>
623
631
    </para>
624
632
  </refsect1>