/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3
	"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
<!ENTITY COMMANDNAME "usplash">
807 by Teddy Hogeborn
Update copyright year.
5
<!ENTITY TIMESTAMP "2016-02-28">
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
6
<!ENTITY % common SYSTEM "../common.ent">
7
%common;
8
]>
9
10
<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
11
  <refentryinfo>
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>
17
    <authorgroup>
18
      <author>
19
	<firstname>Björn</firstname>
20
	<surname>Påhlsson</surname>
21
	<address>
505.1.2 by Teddy Hogeborn
Change "fukt.bsnet.se" to "recompile.se" throughout.
22
	  <email>belorn@recompile.se</email>
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
23
	</address>
24
      </author>
25
      <author>
26
	<firstname>Teddy</firstname>
27
	<surname>Hogeborn</surname>
28
	<address>
505.1.2 by Teddy Hogeborn
Change "fukt.bsnet.se" to "recompile.se" throughout.
29
	  <email>teddy@recompile.se</email>
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
30
	</address>
31
      </author>
32
    </authorgroup>
33
    <copyright>
34
      <year>2008</year>
246 by Teddy Hogeborn
* README: Update copyright year; add "2009".
35
      <year>2009</year>
778 by Teddy Hogeborn
Update copyright year.
36
      <year>2010</year>
493 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
37
      <year>2011</year>
544 by Teddy Hogeborn
Updated year in copyright notices.
38
      <year>2012</year>
778 by Teddy Hogeborn
Update copyright year.
39
      <year>2013</year>
40
      <year>2014</year>
41
      <year>2015</year>
807 by Teddy Hogeborn
Update copyright year.
42
      <year>2016</year>
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
43
      <holder>Teddy Hogeborn</holder>
44
      <holder>Björn Påhlsson</holder>
45
    </copyright>
46
    <xi:include href="../legalnotice.xml"/>
47
  </refentryinfo>
48
  
49
  <refmeta>
50
    <refentrytitle>&COMMANDNAME;</refentrytitle>
51
    <manvolnum>8mandos</manvolnum>
52
  </refmeta>
53
  
54
  <refnamediv>
55
    <refname><command>&COMMANDNAME;</command></refname>
56
    <refpurpose>Mandos plugin to use usplash to get a
57
    password.</refpurpose>
58
  </refnamediv>
59
  
60
  <refsynopsisdiv>
61
    <cmdsynopsis>
62
      <command>&COMMANDNAME;</command>
63
    </cmdsynopsis>
64
  </refsynopsisdiv>
65
  
66
  <refsect1 id="description">
67
    <title>DESCRIPTION</title>
68
    <para>
69
      This program prompts for a password using <citerefentry>
70
      <refentrytitle>usplash</refentrytitle><manvolnum>8</manvolnum>
71
      </citerefentry> and outputs any given password to standard
72
      output.  If no <citerefentry><refentrytitle
73
      >usplash</refentrytitle><manvolnum>8</manvolnum></citerefentry>
74
      process can be found, this program will immediately exit with an
75
      exit code indicating failure.
76
    </para>
77
    <para>
78
      This program is not very useful on its own.  This program is
79
      really meant to run as a plugin in the <application
80
      >Mandos</application> client-side system, where it is used as a
81
      fallback and alternative to retrieving passwords from a
82
      <application >Mandos</application> server.
83
    </para>
84
    <para>
85
      If this program is killed (presumably by
86
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
87
      <manvolnum>8mandos</manvolnum></citerefentry> because some other
88
      plugin provided the password), it cannot tell <citerefentry>
89
      <refentrytitle>usplash</refentrytitle><manvolnum>8</manvolnum>
90
      </citerefentry> to abort requesting a password, because
91
      <citerefentry><refentrytitle>usplash</refentrytitle>
92
      <manvolnum>8</manvolnum></citerefentry> does not support this.
93
      Therefore, this program will then <emphasis>kill</emphasis> the
94
      running <citerefentry><refentrytitle>usplash</refentrytitle>
95
      <manvolnum>8</manvolnum></citerefentry> process and start a
96
      <emphasis>new</emphasis> one using the same command line
97
      arguments as the old one was using.
98
    </para>
99
  </refsect1>
100
  
101
  <refsect1 id="options">
102
    <title>OPTIONS</title>
103
    <para>
104
      This program takes no options.
105
    </para>
106
  </refsect1>
107
  
108
  <refsect1 id="exit_status">
109
    <title>EXIT STATUS</title>
110
    <para>
111
      If exit status is 0, the output from the program is the password
112
      as it was read.  Otherwise, if exit status is other than 0, the
113
      program was interrupted or encountered an error, and any output
114
      so far could be corrupt and/or truncated, and should therefore
115
      be ignored.
116
    </para>
117
  </refsect1>
118
  
119
  <refsect1 id="environment">
120
    <title>ENVIRONMENT</title>
121
    <variablelist>
122
      <varlistentry>
123
	<term><envar>cryptsource</envar></term>
124
	<term><envar>crypttarget</envar></term>
125
	<listitem>
126
	  <para>
127
	    If set, these environment variables will be assumed to
128
	    contain the source device name and the target device
129
	    mapper name, respectively, and will be shown as part of
130
	    the prompt.
131
	</para>
132
	<para>
133
	  These variables will normally be inherited from
134
	  <citerefentry><refentrytitle>plugin-runner</refentrytitle>
135
	  <manvolnum>8mandos</manvolnum></citerefentry>, which will
136
	  normally have inherited them from
137
	  <filename>/scripts/local-top/cryptroot</filename> in the
138
	  initial <acronym>RAM</acronym> disk environment, which will
139
	  have set them from parsing kernel arguments and
140
	  <filename>/conf/conf.d/cryptroot</filename> (also in the
141
	  initial RAM disk environment), which in turn will have been
142
	  created when the initial RAM disk image was created by
143
	  <filename
144
	  >/usr/share/initramfs-tools/hooks/cryptroot</filename>, by
145
	  extracting the information of the root file system from
146
	  <filename >/etc/crypttab</filename>.
147
	</para>
148
	<para>
149
	  This behavior is meant to exactly mirror the behavior of
150
	  <command>askpass</command>, the default password prompter.
151
	</para>
152
	</listitem>
153
      </varlistentry>
154
    </variablelist>
155
  </refsect1>
156
  
157
  <refsect1 id="files">
158
    <title>FILES</title>
159
    <variablelist>
160
      <varlistentry>
161
	<term><filename>/dev/.initramfs/usplash_fifo</filename></term>
162
	<listitem>
163
	  <para>
164
	    This is the <acronym>FIFO</acronym> to where this program
165
	    will write the commands for <citerefentry><refentrytitle
166
	    >usplash</refentrytitle><manvolnum>8</manvolnum>
167
	    </citerefentry>.  See <citerefentry><refentrytitle
168
	    >fifo</refentrytitle><manvolnum>7</manvolnum>
169
	    </citerefentry>.
170
	  </para>
171
	</listitem>
172
      </varlistentry>
173
      <varlistentry>
174
	<term><filename>/dev/.initramfs/usplash_outfifo</filename></term>
175
	<listitem>
176
	  <para>
177
	    This is the <acronym>FIFO</acronym> where this program
178
	    will read the password from <citerefentry><refentrytitle
179
	    >usplash</refentrytitle><manvolnum>8</manvolnum>
180
	    </citerefentry>.  See <citerefentry><refentrytitle
181
	    >fifo</refentrytitle><manvolnum>7</manvolnum>
182
	    </citerefentry>.
183
	  </para>
184
	</listitem>
185
      </varlistentry>
186
      <varlistentry>
521.1.1 by teddy at bsnet
* plugins.d/mandos-client.c (SYNOPSIS, OPTIONS): Document
187
	<term><filename class="directory">/proc</filename></term>
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
188
	<listitem>
189
	  <para>
190
	    To find the running <citerefentry><refentrytitle
191
	    >usplash</refentrytitle><manvolnum>8</manvolnum>
192
	    </citerefentry>, this directory will be searched for
193
	    numeric entries which will be assumed to be directories.
194
	    In all those directories, the <filename>exe</filename> and
195
	    <filename>cmdline</filename> entries will be used to
196
	    determine the name of the running binary, effective user
197
	    and group <abbrev>ID</abbrev>, and the command line
198
	    arguments.  See <citerefentry><refentrytitle
199
	    >proc</refentrytitle><manvolnum>5</manvolnum>
200
	    </citerefentry>.
201
	  </para>
202
	</listitem>
203
      </varlistentry>
204
      <varlistentry>
205
	<term><filename>/sbin/usplash</filename></term>
206
	<listitem>
207
	  <para>
208
	    This is the name of the binary which will be searched for
209
	    in the process list.  See <citerefentry><refentrytitle
210
	    >usplash</refentrytitle><manvolnum>8</manvolnum>
211
	    </citerefentry>.
212
	  </para>
213
	</listitem>
214
      </varlistentry>
215
    </variablelist>
216
  </refsect1>
217
  
218
  <refsect1 id="bugs">
219
    <title>BUGS</title>
220
    <para>
221
      Killing <citerefentry><refentrytitle>usplash</refentrytitle>
222
      <manvolnum>8</manvolnum></citerefentry> and starting a new one
223
      is ugly, but necessary as long as it does not support aborting a
224
      password request.
225
    </para>
226
  </refsect1>
227
  
228
  <refsect1 id="example">
229
    <title>EXAMPLE</title>
230
    <para>
231
      Note that normally, this program will not be invoked directly,
232
      but instead started by the Mandos <citerefentry><refentrytitle
233
      >plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum>
234
      </citerefentry>.
235
    </para>
236
    <informalexample>
237
      <para>
238
	This program takes no options.
239
      </para>
240
      <para>
241
	<userinput>&COMMANDNAME;</userinput>
242
      </para>
243
    </informalexample>
244
  </refsect1>
245
  
246
  <refsect1 id="security">
247
    <title>SECURITY</title>
248
    <para>
249
      If this program is killed by a signal, it will kill the process
250
      <abbrev>ID</abbrev> which at the start of this program was
251
      determined to run <citerefentry><refentrytitle
252
      >usplash</refentrytitle><manvolnum>8</manvolnum></citerefentry>
253
      as root (see also <xref linkend="files"/>).  There is a very
254
      slight risk that, in the time between those events, that process
255
      <abbrev>ID</abbrev> was freed and then taken up by another
256
      process; the wrong process would then be killed.  Now, this
257
      program can only be killed by the user who started it; see
258
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
259
      <manvolnum>8mandos</manvolnum></citerefentry>.  This program
260
      should therefore be started by a completely separate
261
      non-privileged user, and no other programs should be allowed to
262
      run as that special user.  This means that it is not recommended
263
      to use the user "nobody" to start this program, as other
264
      possibly less trusted programs could be running as "nobody", and
265
      they would then be able to kill this program, triggering the
266
      killing of the process <abbrev>ID</abbrev> which may or may not
267
      be <citerefentry><refentrytitle>usplash</refentrytitle>
268
      <manvolnum>8</manvolnum></citerefentry>.
269
    </para>
270
    <para>
271
      The only other thing that could be considered worthy of note is
272
      this:  This program is meant to be run by <citerefentry>
273
      <refentrytitle>plugin-runner</refentrytitle><manvolnum
274
      >8mandos</manvolnum></citerefentry>, and will, when run
275
      standalone, outside, in a normal environment, immediately output
276
      on its standard output any presumably secret password it just
277
      received.  Therefore, when running this program standalone
278
      (which should never normally be done), take care not to type in
279
      any real secret password by force of habit, since it would then
280
      immediately be shown as output.
281
    </para>
282
  </refsect1>
283
  
284
  <refsect1 id="see_also">
285
    <title>SEE ALSO</title>
286
    <para>
493 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
287
      <citerefentry><refentrytitle>intro</refentrytitle>
288
      <manvolnum>8mandos</manvolnum></citerefentry>,
225 by Teddy Hogeborn
* Makefile (DOCS): Added "plugins.d/usplash.8mandos" and
289
      <citerefentry><refentrytitle>crypttab</refentrytitle>
290
      <manvolnum>5</manvolnum></citerefentry>,
291
      <citerefentry><refentrytitle>fifo</refentrytitle>
292
      <manvolnum>7</manvolnum></citerefentry>,
293
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
294
      <manvolnum>8mandos</manvolnum></citerefentry>,
295
      <citerefentry><refentrytitle>proc</refentrytitle>
296
      <manvolnum>5</manvolnum></citerefentry>,
297
      <citerefentry><refentrytitle>usplash</refentrytitle>
298
      <manvolnum>8</manvolnum></citerefentry>
299
    </para>
300
  </refsect1>
301
</refentry>
302
<!-- Local Variables: -->
303
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
304
<!-- time-stamp-end: "[\"']>" -->
305
<!-- time-stamp-format: "%:y-%02m-%02d" -->
306
<!-- End: -->