/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-12-10 01:26:02 UTC
  • mfrom: (237.1.2 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20081210012602-vhz3h75xkj24t340
First version of a somewhat complete D-Bus server interface.  Also
change user/group name to "_mandos".

* debian/mandos.postinst: Rename old "mandos" user and group to
                          "_mandos"; create "_mandos" user and group
                          if none exist.
* debian/mandos-client.postinst: - '' -

* initramfs-tools-hook: Try "_mandos" before "mandos" as user and
                        group name.

* mandos (_datetime_to_dbus_struct): New; was previously local.
  (Client.started): Renamed to "last_started".  All users changed.
  (Client.started): New; boolean.
  (Client.dbus_object_path): New.
  (Client.check_command): Renamed to "checker_command".  All users
                          changed.
  (Client.__init__): Set and use "self.dbus_object_path".  Set
                     "self.started".
  (Client.start): Update "self.started".  Emit "self.PropertyChanged"
                  signals for both "started" and "last_started".
  (Client.stop): Update "self.started".  Emit "self.PropertyChanged"
                 signal for "started".
  (Client.checker_callback): Take additional "command" argument.  All
                             callers changed. Emit
                             "self.PropertyChanged" signal.
  (Client.bump_timeout): Emit "self.PropertyChanged" signal for
                         "last_checked_ok".
  (Client.start_checker): Emit "self.PropertyChanged" signal for
                          "checker_running".
  (Client.stop_checker): Emit "self.PropertyChanged" signal for
                         "checker_running".
  (Client.still_valid): Bug fix: use "getattr(self, started, False)"
                        instead of "self.started" in case this client
                        object is so new that the "started" attribute
                        has not been created yet.
  (Client.IntervalChanged, Client.CheckerIsRunning, Client.GetChecker,
  Client.GetCreated, Client.GetFingerprint, Client.GetHost,
  Client.GetInterval, Client.GetName, Client.GetStarted,
  Client.GetTimeout, Client.StateChanged, Client.TimeoutChanged):
  Removed; all callers changed.
  (Client.CheckerCompleted): Add "condition" and "command" arguments.
                             All callers changed.
  (Client.GetAllProperties, Client.PropertyChanged): New.
  (Client.StillValid): Renamed to "IsStillValid".
  (Client.StartChecker): Changed to its own function to avoid the
                         return value from "Client.start_checker()".
  (Client.Stop): Changed to its own function to avoid the return value
                 from "Client.stop()".
  (main): Try "_mandos" before "mandos" as user and group name.
          Removed inner function "remove_from_clients".  New inner
          class "MandosServer".

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-06">
 
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>
48
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/>
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>
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>
571
572
      <para>
572
573
        Run plugins from a different directory, read a different
573
574
        configuration file, and add two options to the
574
 
        <citerefentry><refentrytitle >password-request</refentrytitle>
 
575
        <citerefentry><refentrytitle >mandos-client</refentrytitle>
575
576
        <manvolnum>8mandos</manvolnum></citerefentry> plugin:
576
577
      </para>
577
578
      <para>
578
579
 
579
580
<!-- do not wrap this line -->
580
 
<userinput>&COMMANDNAME;  --config-file=/etc/mandos/plugin-runner.conf --plugin-dir /usr/lib/mandos/plugins.d --options-for=password-request:--pubkey=/etc/keys/mandos/pubkey.txt,--seckey=/etc/keys/mandos/seckey.txt</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>
581
582
 
582
583
      </para>
583
584
    </informalexample>
625
626
      <manvolnum>8</manvolnum></citerefentry>,
626
627
      <citerefentry><refentrytitle>password-prompt</refentrytitle>
627
628
      <manvolnum>8mandos</manvolnum></citerefentry>,
628
 
      <citerefentry><refentrytitle>password-request</refentrytitle>
 
629
      <citerefentry><refentrytitle>mandos-client</refentrytitle>
629
630
      <manvolnum>8mandos</manvolnum></citerefentry>
630
631
    </para>
631
632
  </refsect1>