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

  • Committer: Teddy Hogeborn
  • Date: 2008-09-04 12:38:35 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080904123835-hervuvv4pmpxl8r1
* README: Improved wording.

* initramfs-tools-hook: Do not copy auto-save files from
                        "/etc/mandos/plugins.d".  Do not create key
                        ring files.  Do not reset permissions on
                        things like "$DESTDIR/lib/mandos/plugins.d",
                        which should not be publicly accessible.

* plugin-runner.xml (DESCRIPTION, PLUGINS): Improved grammar.

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">
4
5
<!ENTITY COMMANDNAME "plugin-runner">
5
 
<!ENTITY TIMESTAMP "2008-09-30">
6
 
<!ENTITY % common SYSTEM "common.ent">
7
 
%common;
 
6
<!ENTITY TIMESTAMP "2008-09-04">
8
7
]>
9
8
 
10
9
<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
12
11
    <title>Mandos Manual</title>
13
12
    <!-- Nwalsh’s docbook scripts use this to generate the footer: -->
14
13
    <productname>Mandos</productname>
15
 
    <productnumber>&version;</productnumber>
 
14
    <productnumber>&VERSION;</productnumber>
16
15
    <date>&TIMESTAMP;</date>
17
16
    <authorgroup>
18
17
      <author>
37
36
    </copyright>
38
37
    <xi:include href="legalnotice.xml"/>
39
38
  </refentryinfo>
40
 
  
 
39
 
41
40
  <refmeta>
42
41
    <refentrytitle>&COMMANDNAME;</refentrytitle>
43
42
    <manvolnum>8mandos</manvolnum>
46
45
  <refnamediv>
47
46
    <refname><command>&COMMANDNAME;</command></refname>
48
47
    <refpurpose>
49
 
      Run Mandos plugins, pass data from first to succeed.
 
48
      Run Mandos plugins.  Pass data from first succesful one.
50
49
    </refpurpose>
51
50
  </refnamediv>
52
 
  
 
51
 
53
52
  <refsynopsisdiv>
54
53
    <cmdsynopsis>
55
54
      <command>&COMMANDNAME;</command>
56
55
      <group rep="repeat">
57
56
        <arg choice="plain"><option>--global-env=<replaceable
58
 
        >ENV</replaceable><literal>=</literal><replaceable
 
57
        >VAR</replaceable><literal>=</literal><replaceable
59
58
        >value</replaceable></option></arg>
60
59
        <arg choice="plain"><option>-G
61
 
        <replaceable>ENV</replaceable><literal>=</literal><replaceable
 
60
        <replaceable>VAR</replaceable><literal>=</literal><replaceable
62
61
        >value</replaceable> </option></arg>
63
62
      </group>
64
63
      <sbr/>
171
170
    <variablelist>
172
171
      <varlistentry>
173
172
        <term><option>--global-env
174
 
        <replaceable>ENV</replaceable><literal>=</literal><replaceable
 
173
        <replaceable>VAR</replaceable><literal>=</literal><replaceable
175
174
        >value</replaceable></option></term>
176
175
        <term><option>-G
177
 
        <replaceable>ENV</replaceable><literal>=</literal><replaceable
 
176
        <replaceable>VAR</replaceable><literal>=</literal><replaceable
178
177
        >value</replaceable></option></term>
179
178
        <listitem>
180
179
          <para>
248
247
          </para>
249
248
        </listitem>
250
249
      </varlistentry>
251
 
      
 
250
 
252
251
      <varlistentry>
253
252
        <term><option>--disable
254
253
        <replaceable>PLUGIN</replaceable></option></term>
262
261
          </para>       
263
262
        </listitem>
264
263
      </varlistentry>
265
 
      
 
264
 
266
265
      <varlistentry>
267
266
        <term><option>--enable
268
267
        <replaceable>PLUGIN</replaceable></option></term>
273
272
            Re-enable the plugin named
274
273
            <replaceable>PLUGIN</replaceable>.  This is only useful to
275
274
            undo a previous <option>--disable</option> option, maybe
276
 
            from the configuration file.
 
275
            from the config file.
277
276
          </para>
278
277
        </listitem>
279
278
      </varlistentry>
280
 
      
 
279
 
281
280
      <varlistentry>
282
281
        <term><option>--groupid
283
282
        <replaceable>ID</replaceable></option></term>
290
289
          </para>
291
290
        </listitem>
292
291
      </varlistentry>
293
 
      
 
292
 
294
293
      <varlistentry>
295
294
        <term><option>--userid
296
295
        <replaceable>ID</replaceable></option></term>
303
302
          </para>
304
303
        </listitem>
305
304
      </varlistentry>
306
 
      
 
305
 
307
306
      <varlistentry>
308
307
        <term><option>--plugin-dir
309
308
        <replaceable>DIRECTORY</replaceable></option></term>
366
365
          </para>
367
366
        </listitem>
368
367
      </varlistentry>
369
 
      
 
368
 
370
369
      <varlistentry>
371
370
        <term><option>--version</option></term>
372
371
        <term><option>-V</option></term>
378
377
      </varlistentry>
379
378
    </variablelist>
380
379
  </refsect1>
381
 
  
 
380
 
382
381
  <refsect1 id="overview">
383
382
    <title>OVERVIEW</title>
384
383
    <xi:include href="overview.xml"/>
404
403
      code will make this plugin-runner output the password from that
405
404
      plugin, stop any other plugins, and exit.
406
405
    </para>
407
 
    
 
406
 
408
407
    <refsect2 id="writing_plugins">
409
408
      <title>WRITING PLUGINS</title>
410
409
      <para>
417
416
        console.
418
417
      </para>
419
418
      <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>
425
419
        The plugin will run in the initial RAM disk environment, so
426
420
        care must be taken not to depend on any files or running
427
421
        services not available there.
473
467
      only passes on its environment to all the plugins.  The
474
468
      environment passed to plugins can be modified using the
475
469
      <option>--global-env</option> and <option>--env-for</option>
476
 
      options.
 
470
      optins.
477
471
    </para>
478
472
  </refsect1>
479
473
  
516
510
    </para>
517
511
  </refsect1>
518
512
  
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>
 
513
<!--   <refsect1 id="bugs"> -->
 
514
<!--     <title>BUGS</title> -->
 
515
<!--     <para> -->
 
516
<!--     </para> -->
 
517
<!--   </refsect1> -->
526
518
  
527
519
  <refsect1 id="examples">
528
520
    <title>EXAMPLE</title>
570
562
    </informalexample>
571
563
    <informalexample>
572
564
      <para>
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>
 
565
        Run plugins from a different directory and add a special
 
566
        option to the <citerefentry><refentrytitle
 
567
        >password-request</refentrytitle>
576
568
        <manvolnum>8mandos</manvolnum></citerefentry> plugin:
577
569
      </para>
578
570
      <para>
579
571
 
580
572
<!-- do not wrap this line -->
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>
 
573
<userinput>&COMMANDNAME;  --plugin-dir=plugins.d --options-for=password-request:--keydir=keydir</userinput>
582
574
 
583
575
      </para>
584
576
    </informalexample>
592
584
      non-privileged.  This user and group is then what all plugins
593
585
      will be started as.  Therefore, the only way to run a plugin as
594
586
      a privileged user is to have the set-user-ID or set-group-ID bit
595
 
      set on the plugin executable file (see <citerefentry>
 
587
      set on the plugin executable files (see <citerefentry>
596
588
      <refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum>
597
589
      </citerefentry>).
598
590
    </para>
599
591
    <para>
600
592
      If this program is used as a keyscript in <citerefentry
601
593
      ><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum>
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
 
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
605
597
      image to not run this program.  This is, however, unlikely,
606
598
      since the <citerefentry><refentrytitle
607
599
      >password-prompt</refentrytitle><manvolnum>8mandos</manvolnum>
626
618
      <manvolnum>8</manvolnum></citerefentry>,
627
619
      <citerefentry><refentrytitle>password-prompt</refentrytitle>
628
620
      <manvolnum>8mandos</manvolnum></citerefentry>,
629
 
      <citerefentry><refentrytitle>mandos-client</refentrytitle>
 
621
      <citerefentry><refentrytitle>password-request</refentrytitle>
630
622
      <manvolnum>8mandos</manvolnum></citerefentry>
631
623
    </para>
632
624
  </refsect1>