/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/password-prompt.xml

  • Committer: Teddy Hogeborn
  • Date: 2015-08-10 07:34:37 UTC
  • Revision ID: teddy@recompile.se-20150810073437-3m8jgt13nqric6vf
Revert change to D-Bus API.

The D-Bus API signal CheckerCompleted is documented to provide a
wait(2) status value.  Since the server switched to using subprocess
to run checkers, it no longer has access to a wait(2) status value.  A
previous change to work around this made the D-Bus API incompatible.
Revert this change by constructing a fake wait(2) status value; this
keeps the D-Bus API stable.

* DBUS-API (CheckerCompleted): Revert incompatible change.
* mandos (ClientDBus.checker_callback): Construct fake wait(2) status.
* mandos-monitor (MandosClientWidget.checker_completed): Revert to
                                                         using
                                                         original API
                                                         with wait(2)
                                                         condition
                                                         value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version='1.0' encoding='UTF-8'?>
2
 
<?xml-stylesheet type="text/xsl"
3
 
        href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
 
1
<?xml version="1.0" encoding="UTF-8"?>
4
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
5
3
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
6
 
<!ENTITY VERSION "1.0">
7
4
<!ENTITY COMMANDNAME "password-prompt">
 
5
<!ENTITY TIMESTAMP "2015-07-20">
 
6
<!ENTITY % common SYSTEM "../common.ent">
 
7
%common;
8
8
]>
9
9
 
10
 
<refentry>
 
10
<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
11
11
  <refentryinfo>
12
 
    <title>&COMMANDNAME;</title>
13
 
    <!-- NWalsh's docbook scripts use this to generate the footer: -->
14
 
    <productname>&COMMANDNAME;</productname>
15
 
    <productnumber>&VERSION;</productnumber>
 
12
    <title>Mandos Manual</title>
 
13
    <!-- NWalsh’s docbook scripts use this to generate the footer: -->
 
14
    <productname>Mandos</productname>
 
15
    <productnumber>&version;</productnumber>
 
16
    <date>&TIMESTAMP;</date>
16
17
    <authorgroup>
17
18
      <author>
18
19
        <firstname>Björn</firstname>
19
20
        <surname>Påhlsson</surname>
20
21
        <address>
21
 
          <email>belorn@fukt.bsnet.se</email>
 
22
          <email>belorn@recompile.se</email>
22
23
        </address>
23
24
      </author>
24
25
      <author>
25
26
        <firstname>Teddy</firstname>
26
27
        <surname>Hogeborn</surname>
27
28
        <address>
28
 
          <email>teddy@fukt.bsnet.se</email>
 
29
          <email>teddy@recompile.se</email>
29
30
        </address>
30
31
      </author>
31
32
    </authorgroup>
32
33
    <copyright>
33
34
      <year>2008</year>
34
 
      <holder>Teddy Hogeborn &amp; Björn Påhlsson</holder>
 
35
      <year>2009</year>
 
36
      <year>2010</year>
 
37
      <year>2011</year>
 
38
      <year>2012</year>
 
39
      <year>2013</year>
 
40
      <year>2014</year>
 
41
      <year>2015</year>
 
42
      <holder>Teddy Hogeborn</holder>
 
43
      <holder>Björn Påhlsson</holder>
35
44
    </copyright>
36
 
    <legalnotice>
37
 
      <para>
38
 
        This manual page is free software: you can redistribute it
39
 
        and/or modify it under the terms of the GNU General Public
40
 
        License as published by the Free Software Foundation,
41
 
        either version 3 of the License, or (at your option) any
42
 
        later version.
43
 
      </para>
44
 
 
45
 
      <para>
46
 
        This manual page is distributed in the hope that it will
47
 
        be useful, but WITHOUT ANY WARRANTY; without even the
48
 
        implied warranty of MERCHANTABILITY or FITNESS FOR A
49
 
        PARTICULAR PURPOSE.  See the GNU General Public License
50
 
        for more details.
51
 
      </para>
52
 
 
53
 
      <para>
54
 
        You should have received a copy of the GNU General Public
55
 
        License along with this program; If not, see
56
 
        <ulink url="http://www.gnu.org/licenses/"/>.
57
 
      </para>
58
 
    </legalnotice>
 
45
    <xi:include href="../legalnotice.xml"/>
59
46
  </refentryinfo>
60
 
 
 
47
  
61
48
  <refmeta>
62
49
    <refentrytitle>&COMMANDNAME;</refentrytitle>
63
50
    <manvolnum>8mandos</manvolnum>
65
52
  
66
53
  <refnamediv>
67
54
    <refname><command>&COMMANDNAME;</command></refname>
68
 
    <refpurpose>
69
 
      Passprompt for luks during boot sequence
70
 
    </refpurpose>
 
55
    <refpurpose>Prompt for a password and output it.</refpurpose>
71
56
  </refnamediv>
72
57
  
73
58
  <refsynopsisdiv>
74
59
    <cmdsynopsis>
75
60
      <command>&COMMANDNAME;</command>
76
 
      <arg choice='opt'>--prefix<arg choice='plain'>PREFIX</arg></arg>
77
 
      <arg choice='opt'>--debug</arg>
78
 
    </cmdsynopsis>
79
 
    <cmdsynopsis>
80
 
      <command>&COMMANDNAME;</command>
81
 
      <arg choice='plain'>--help</arg>
82
 
    </cmdsynopsis>
83
 
    <cmdsynopsis>
84
 
      <command>&COMMANDNAME;</command>
85
 
      <arg choice='plain'>--usage</arg>
86
 
    </cmdsynopsis>
87
 
    <cmdsynopsis>
88
 
      <command>&COMMANDNAME;</command>
89
 
      <arg choice='plain'>--version</arg>
90
 
    </cmdsynopsis>    
 
61
      <group choice="opt">
 
62
        <arg choice="plain"><option>--prefix <replaceable
 
63
        >PREFIX</replaceable></option></arg>
 
64
        <arg choice="plain"><option>-p </option><replaceable
 
65
        >PREFIX</replaceable></arg>
 
66
      </group>
 
67
      <sbr/>
 
68
      <arg choice="opt"><option>--debug</option></arg>
 
69
    </cmdsynopsis>
 
70
    <cmdsynopsis>
 
71
      <command>&COMMANDNAME;</command>
 
72
      <group choice="req">
 
73
        <arg choice="plain"><option>--help</option></arg>
 
74
        <arg choice="plain"><option>-?</option></arg>
 
75
      </group>
 
76
    </cmdsynopsis>
 
77
    <cmdsynopsis>
 
78
      <command>&COMMANDNAME;</command>
 
79
      <arg choice="plain"><option>--usage</option></arg>
 
80
    </cmdsynopsis>
 
81
    <cmdsynopsis>
 
82
      <command>&COMMANDNAME;</command>
 
83
      <group choice="req">
 
84
        <arg choice="plain"><option>--version</option></arg>
 
85
        <arg choice="plain"><option>-V</option></arg>
 
86
      </group>
 
87
    </cmdsynopsis>
91
88
  </refsynopsisdiv>
92
 
 
 
89
  
93
90
  <refsect1 id="description">
94
91
    <title>DESCRIPTION</title>
95
92
    <para>
96
 
      <command>&COMMANDNAME;</command> is a terminal program that ask for
97
 
      passwords during boot sequence. It is a plugin to
98
 
      <firstterm>mandos</firstterm>, and is used as a fallback and
99
 
      alternative to retriving passwords from a mandos server. During
100
 
      boot sequence the user is prompted for the disk password, and
101
 
      when a password is given it then gets forwarded to
102
 
      <acronym>LUKS</acronym>.
 
93
      All <command>&COMMANDNAME;</command> does is prompt for a
 
94
      password and output any given password to standard output.
 
95
    </para>
 
96
    <para>
 
97
      This program is not very useful on its own.  This program is
 
98
      really meant to run as a plugin in the <application
 
99
      >Mandos</application> client-side system, where it is used as a
 
100
      fallback and alternative to retrieving passwords from a
 
101
      <application >Mandos</application> server.
 
102
    </para>
 
103
    <para>
 
104
      This program is little more than a <citerefentry><refentrytitle
 
105
      >getpass</refentrytitle><manvolnum>3</manvolnum></citerefentry>
 
106
      wrapper, although actual use of that function is not guaranteed
 
107
      or implied.
103
108
    </para>
104
109
  </refsect1>
105
110
  
106
111
  <refsect1 id="options">
107
112
    <title>OPTIONS</title>
108
113
    <para>
109
 
      Commonly not invoked as command lines but from configuration
110
 
      file of plugin runner.
 
114
      This program is commonly not invoked from the command line; it
 
115
      is normally started by the <application>Mandos</application>
 
116
      plugin runner, see <citerefentry><refentrytitle
 
117
      >plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum>
 
118
      </citerefentry>.  Any command line options this program accepts
 
119
      are therefore normally provided by the plugin runner, and not
 
120
      directly.
111
121
    </para>
112
 
 
 
122
    
113
123
    <variablelist>
114
124
      <varlistentry>
115
 
        <term><literal>-p</literal>, <literal>--prefix=<replaceable>PREFIX
116
 
        </replaceable></literal></term>
117
 
        <listitem>
118
 
          <para>
119
 
            Prefix used before the passprompt
120
 
          </para>
121
 
        </listitem>
122
 
      </varlistentry>
123
 
      
124
 
      <varlistentry>
125
 
        <term><literal>--debug</literal></term>
126
 
        <listitem>
127
 
          <para>
128
 
            Debug mode
129
 
          </para>
130
 
        </listitem>
131
 
      </varlistentry>
132
 
      
133
 
      <varlistentry>
134
 
        <term><literal>-?</literal>, <literal>--help</literal></term>
135
 
        <listitem>
136
 
          <para>
137
 
            Gives a help message
138
 
          </para>
139
 
        </listitem>
140
 
      </varlistentry>
141
 
      
142
 
      <varlistentry>
143
 
        <term><literal>--usage</literal></term>
144
 
        <listitem>
145
 
          <para>
146
 
            Gives a short usage message
147
 
          </para>
148
 
        </listitem>
149
 
      </varlistentry>
150
 
 
151
 
      <varlistentry>
152
 
        <term><literal>-V</literal>, <literal>--version</literal></term>
153
 
        <listitem>
154
 
          <para>
155
 
            Prints the program version
156
 
          </para>
157
 
        </listitem>
158
 
      </varlistentry>            
 
125
        <term><option>--prefix=<replaceable
 
126
        >PREFIX</replaceable></option></term>
 
127
        <term><option>-p
 
128
        <replaceable>PREFIX</replaceable></option></term>
 
129
        <listitem>
 
130
          <para>
 
131
            Prefix string shown before the password prompt.
 
132
          </para>
 
133
        </listitem>
 
134
      </varlistentry>
 
135
      
 
136
      <varlistentry>
 
137
        <term><option>--debug</option></term>
 
138
        <listitem>
 
139
          <para>
 
140
            Enable debug mode.  This will enable a lot of output to
 
141
            standard error about what the program is doing.  The
 
142
            program will still perform all other functions normally.
 
143
          </para>
 
144
        </listitem>
 
145
      </varlistentry>
 
146
      
 
147
      <varlistentry>
 
148
        <term><option>--help</option></term>
 
149
        <term><option>-?</option></term>
 
150
        <listitem>
 
151
          <para>
 
152
            Gives a help message about options and their meanings.
 
153
          </para>
 
154
        </listitem>
 
155
      </varlistentry>
 
156
      
 
157
      <varlistentry>
 
158
        <term><option>--usage</option></term>
 
159
        <listitem>
 
160
          <para>
 
161
            Gives a short usage message.
 
162
          </para>
 
163
        </listitem>
 
164
      </varlistentry>
 
165
      
 
166
      <varlistentry>
 
167
        <term><option>--version</option></term>
 
168
        <term><option>-V</option></term>
 
169
        <listitem>
 
170
          <para>
 
171
            Prints the program version.
 
172
          </para>
 
173
        </listitem>
 
174
      </varlistentry>
159
175
    </variablelist>
160
176
  </refsect1>
161
 
 
 
177
  
162
178
  <refsect1 id="exit_status">
163
179
    <title>EXIT STATUS</title>
164
180
    <para>
 
181
      If exit status is 0, the output from the program is the password
 
182
      as it was read.  Otherwise, if exit status is other than 0, the
 
183
      program has encountered an error, and any output so far could be
 
184
      corrupt and/or truncated, and should therefore be ignored.
165
185
    </para>
166
186
  </refsect1>
167
 
 
168
 
  <refsect1 id="notes">
169
 
    <title>NOTES</title>
170
 
    <para>
171
 
    </para>
 
187
  
 
188
  <refsect1 id="environment">
 
189
    <title>ENVIRONMENT</title>
 
190
    <variablelist>
 
191
      <varlistentry>
 
192
        <term><envar>CRYPTTAB_SOURCE</envar></term>
 
193
        <term><envar>CRYPTTAB_NAME</envar></term>
 
194
        <listitem>
 
195
          <para>
 
196
            If set, these environment variables will be assumed to
 
197
            contain the source device name and the target device
 
198
            mapper name, respectively, and will be shown as part of
 
199
            the prompt.
 
200
        </para>
 
201
        <para>
 
202
          These variables will normally be inherited from
 
203
          <citerefentry><refentrytitle>plugin-runner</refentrytitle>
 
204
          <manvolnum>8mandos</manvolnum></citerefentry>, which will
 
205
          normally have inherited them from
 
206
          <filename>/scripts/local-top/cryptroot</filename> in the
 
207
          initial <acronym>RAM</acronym> disk environment, which will
 
208
          have set them from parsing kernel arguments and
 
209
          <filename>/conf/conf.d/cryptroot</filename> (also in the
 
210
          initial RAM disk environment), which in turn will have been
 
211
          created when the initial RAM disk image was created by
 
212
          <filename
 
213
          >/usr/share/initramfs-tools/hooks/cryptroot</filename>, by
 
214
          extracting the information of the root file system from
 
215
          <filename >/etc/crypttab</filename>.
 
216
        </para>
 
217
        <para>
 
218
          This behavior is meant to exactly mirror the behavior of
 
219
          <command>askpass</command>, the default password prompter.
 
220
        </para>
 
221
        </listitem>
 
222
      </varlistentry>
 
223
    </variablelist>
172
224
  </refsect1>
173
225
  
174
226
  <refsect1 id="bugs">
175
227
    <title>BUGS</title>
176
228
    <para>
 
229
      None are known at this time.
177
230
    </para>
178
 
  </refsect1>  
179
 
 
180
 
  <refsect1 id="examples">
181
 
    <title>EXAMPLES</title>
 
231
  </refsect1>
 
232
  
 
233
  <refsect1 id="example">
 
234
    <title>EXAMPLE</title>
182
235
    <para>
 
236
      Note that normally, command line options will not be given
 
237
      directly, but via options for the Mandos <citerefentry
 
238
      ><refentrytitle>plugin-runner</refentrytitle>
 
239
      <manvolnum>8mandos</manvolnum></citerefentry>.
183
240
    </para>
 
241
    <informalexample>
 
242
      <para>
 
243
        Normal invocation needs no options:
 
244
      </para>
 
245
      <para>
 
246
        <userinput>&COMMANDNAME;</userinput>
 
247
      </para>
 
248
    </informalexample>
 
249
    <informalexample>
 
250
      <para>
 
251
        Show a prefix before the prompt; in this case, a host name.
 
252
        It might be useful to be reminded of which host needs a
 
253
        password, in case of <acronym>KVM</acronym> switches, etc.
 
254
      </para>
 
255
      <para>
 
256
 
 
257
<!-- do not wrap this line -->
 
258
<userinput>&COMMANDNAME; --prefix=host.example.org:</userinput>
 
259
 
 
260
      </para>
 
261
    </informalexample>
 
262
    <informalexample>
 
263
      <para>
 
264
        Run in debug mode.
 
265
      </para>
 
266
      <para>
 
267
        <!-- do not wrap this line -->
 
268
        <userinput>&COMMANDNAME; --debug</userinput>
 
269
      </para>
 
270
    </informalexample>
184
271
  </refsect1>
185
 
 
 
272
  
186
273
  <refsect1 id="security">
187
274
    <title>SECURITY</title>
188
275
    <para>
 
276
      On its own, this program is very simple, and does not exactly
 
277
      present any security risks.  The one thing that could be
 
278
      considered worthy of note is this: This program is meant to be
 
279
      run by <citerefentry><refentrytitle
 
280
      >plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum>
 
281
      </citerefentry>, and will, when run standalone, outside, in a
 
282
      normal environment, immediately output on its standard output
 
283
      any presumably secret password it just received.  Therefore,
 
284
      when running this program standalone (which should never
 
285
      normally be done), take care not to type in any real secret
 
286
      password by force of habit, since it would then immediately be
 
287
      shown as output.
 
288
    </para>
 
289
    <para>
 
290
      To further alleviate any risk of being locked out of a system,
 
291
      the <citerefentry><refentrytitle>plugin-runner</refentrytitle>
 
292
      <manvolnum>8mandos</manvolnum></citerefentry> has a fallback
 
293
      mode which does the same thing as this program, only with less
 
294
      features.
189
295
    </para>
190
296
  </refsect1>
191
 
 
 
297
  
192
298
  <refsect1 id="see_also">
193
299
    <title>SEE ALSO</title>
194
300
    <para>
195
 
      <citerefentry><refentrytitle>mandos</refentrytitle>
196
 
      <manvolnum>8</manvolnum></citerefentry>, <citerefentry>
197
 
      <refentrytitle>plugin-runner</refentrytitle>
198
 
      <manvolnum>8mandos</manvolnum></citerefentry> and <citerefentry>
199
 
      <refentrytitle>password-request</refentrytitle>
200
 
      <manvolnum>8mandos</manvolnum></citerefentry>
 
301
      <citerefentry><refentrytitle>intro</refentrytitle>
 
302
      <manvolnum>8mandos</manvolnum></citerefentry>
 
303
      <citerefentry><refentrytitle>crypttab</refentrytitle>
 
304
      <manvolnum>5</manvolnum></citerefentry>
 
305
      <citerefentry><refentrytitle>mandos-client</refentrytitle>
 
306
      <manvolnum>8mandos</manvolnum></citerefentry>
 
307
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
 
308
      <manvolnum>8mandos</manvolnum></citerefentry>,
201
309
    </para>
202
 
  </refsect1>  
203
 
  
 
310
  </refsect1>
204
311
</refentry>
 
312
<!-- Local Variables: -->
 
313
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
 
314
<!-- time-stamp-end: "[\"']>" -->
 
315
<!-- time-stamp-format: "%:y-%02m-%02d" -->
 
316
<!-- End: -->