/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 plugins.d/mandos-client.xml

  • Committer: Teddy Hogeborn
  • Date: 2019-03-17 18:44:44 UTC
  • Revision ID: teddy@recompile.se-20190317184444-5o7vougp7c3p87ri
mandos-ctl: Refactor tests

* mandos-ctl (TestBaseCommands.test_DumpJSON_normal): Don't run the
  .output method on command; instead, use capture_stdout_to_buffer().
  (TestBaseCommands.test_DumpJSON_one_client): - '' -
  (TestBaseCommands.test_PrintTable_normal): - '' -
  (TestBaseCommands.test_PrintTable_verbose): - '' -
  (TestBaseCommands.test_PrintTable_one_client): - '' -
  (TestBaseCommands.capture_stdout_to_buffer): New.

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-client">
5
 
<!ENTITY TIMESTAMP "2023-10-21">
 
5
<!ENTITY TIMESTAMP "2019-02-10">
6
6
<!ENTITY % common SYSTEM "../common.ent">
7
7
%common;
8
8
]>
196
196
    </para>
197
197
    <para>
198
198
      This program is not meant to be run directly; it is really meant
199
 
      to be run by other programs in the initial
200
 
      <acronym>RAM</acronym> disk environment; see <xref
201
 
      linkend="overview"/>.
 
199
      to run as a plugin of the <application>Mandos</application>
 
200
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
 
201
      <manvolnum>8mandos</manvolnum></citerefentry>, which runs in the
 
202
      initial <acronym>RAM</acronym> disk environment because it is
 
203
      specified as a <quote>keyscript</quote> in the <citerefentry>
 
204
      <refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum>
 
205
      </citerefentry> file.
202
206
    </para>
203
207
  </refsect1>
204
208
  
216
220
    <title>OPTIONS</title>
217
221
    <para>
218
222
      This program is commonly not invoked from the command line; it
219
 
      is normally started by another program as described in <xref
220
 
      linkend="description"/>.  Any command line options this program
221
 
      accepts are therefore normally provided by the invoking program,
222
 
      and not directly.
 
223
      is normally started by the <application>Mandos</application>
 
224
      plugin runner, see <citerefentry><refentrytitle
 
225
      >plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum>
 
226
      </citerefentry>.  Any command line options this program accepts
 
227
      are therefore normally provided by the plugin runner, and not
 
228
      directly.
223
229
    </para>
224
230
    
225
231
    <variablelist>
476
482
    <title>OVERVIEW</title>
477
483
    <xi:include href="../overview.xml"/>
478
484
    <para>
479
 
      This program is the client part.  It is run automatically in an
480
 
      initial <acronym>RAM</acronym> disk environment.
481
 
    </para>
482
 
    <para>
483
 
      In an initial <acronym>RAM</acronym> disk environment using
484
 
      <citerefentry><refentrytitle>systemd</refentrytitle>
485
 
      <manvolnum>1</manvolnum></citerefentry>, this program is started
486
 
      by the <application>Mandos</application> <citerefentry>
487
 
      <refentrytitle>password-agent</refentrytitle>
488
 
      <manvolnum>8mandos</manvolnum></citerefentry>, which in turn is
489
 
      started automatically by the <citerefentry>
490
 
      <refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum>
491
 
      </citerefentry> <quote>Password Agent</quote> system.
492
 
    </para>
493
 
    <para>
494
 
      In the case of a non-<citerefentry>
495
 
      <refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum>
496
 
      </citerefentry> environment, this program is started as a plugin
497
 
      of the <application>Mandos</application> <citerefentry>
498
 
      <refentrytitle>plugin-runner</refentrytitle>
499
 
      <manvolnum>8mandos</manvolnum></citerefentry>, which runs in the
500
 
      initial <acronym>RAM</acronym> disk environment because it is
501
 
      specified as a <quote>keyscript</quote> in the <citerefentry>
502
 
      <refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum>
503
 
      </citerefentry> file.
 
485
      This program is the client part.  It is a plugin started by
 
486
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
 
487
      <manvolnum>8mandos</manvolnum></citerefentry> which will run in
 
488
      an initial <acronym>RAM</acronym> disk environment.
504
489
    </para>
505
490
    <para>
506
491
      This program could, theoretically, be used as a keyscript in
507
492
      <filename>/etc/crypttab</filename>, but it would then be
508
493
      impossible to enter a password for the encrypted root disk at
509
494
      the console, since this program does not read from the console
510
 
      at all.
 
495
      at all.  This is why a separate plugin runner (<citerefentry>
 
496
      <refentrytitle>plugin-runner</refentrytitle>
 
497
      <manvolnum>8mandos</manvolnum></citerefentry>) is used to run
 
498
      both this program and others in in parallel,
 
499
      <emphasis>one</emphasis> of which (<citerefentry>
 
500
      <refentrytitle>password-prompt</refentrytitle>
 
501
      <manvolnum>8mandos</manvolnum></citerefentry>) will prompt for
 
502
      passwords on the system console.
511
503
    </para>
512
504
  </refsect1>
513
505
  
533
525
          <para>
534
526
            This environment variable will be assumed to contain the
535
527
            directory containing any helper executables.  The use and
536
 
            nature of these helper executables, if any, is purposely
537
 
            not documented.
 
528
            nature of these helper executables, if any, is
 
529
            purposefully not documented.
538
530
        </para>
539
531
        </listitem>
540
532
      </varlistentry>
770
762
    <title>EXAMPLE</title>
771
763
    <para>
772
764
      Note that normally, command line options will not be given
773
 
      directly, but passed on via the program responsible for starting
774
 
      this program; see <xref linkend="overview"/>.
 
765
      directly, but via options for the Mandos <citerefentry
 
766
      ><refentrytitle>plugin-runner</refentrytitle>
 
767
      <manvolnum>8mandos</manvolnum></citerefentry>.
775
768
    </para>
776
769
    <informalexample>
777
770
      <para>
823
816
  <refsect1 id="security">
824
817
    <title>SECURITY</title>
825
818
    <para>
826
 
      This program assumes that it is set-uid to root, and will switch
827
 
      back to the original (and presumably non-privileged) user and
828
 
      group after bringing up the network interface.
 
819
      This program is set-uid to root, but will switch back to the
 
820
      original (and presumably non-privileged) user and group after
 
821
      bringing up the network interface.
829
822
    </para>
830
823
    <para>
831
824
      To use this program for its intended purpose (see <xref
879
872
      <manvolnum>5</manvolnum></citerefentry>,
880
873
      <citerefentry><refentrytitle>mandos</refentrytitle>
881
874
      <manvolnum>8</manvolnum></citerefentry>,
882
 
      <citerefentry><refentrytitle>password-agent</refentrytitle>
 
875
      <citerefentry><refentrytitle>password-prompt</refentrytitle>
883
876
      <manvolnum>8mandos</manvolnum></citerefentry>,
884
877
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
885
878
      <manvolnum>8mandos</manvolnum></citerefentry>
898
891
      </varlistentry>
899
892
      <varlistentry>
900
893
        <term>
901
 
          <ulink url="https://www.avahi.org/">Avahi</ulink>
 
894
          <ulink url="http://www.avahi.org/">Avahi</ulink>
902
895
        </term>
903
896
      <listitem>
904
897
        <para>