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">
5
<!ENTITY TIMESTAMP "2008-10-04">
6
<!ENTITY % common SYSTEM "../common.ent">
10
<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
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>
19
<firstname>Björn</firstname>
20
<surname>Påhlsson</surname>
22
<email>belorn@fukt.bsnet.se</email>
26
<firstname>Teddy</firstname>
27
<surname>Hogeborn</surname>
29
<email>teddy@fukt.bsnet.se</email>
35
<holder>Teddy Hogeborn</holder>
36
<holder>Björn Påhlsson</holder>
38
<xi:include href="../legalnotice.xml"/>
42
<refentrytitle>&COMMANDNAME;</refentrytitle>
43
<manvolnum>8mandos</manvolnum>
47
<refname><command>&COMMANDNAME;</command></refname>
48
<refpurpose>Mandos plugin to use usplash to get a
49
password.</refpurpose>
54
<command>&COMMANDNAME;</command>
58
<refsect1 id="description">
59
<title>DESCRIPTION</title>
61
This program prompts for a password using <citerefentry>
62
<refentrytitle>usplash</refentrytitle><manvolnum>8</manvolnum>
63
</citerefentry> and outputs any given password to standard
64
output. If no <citerefentry><refentrytitle
65
>usplash</refentrytitle><manvolnum>8</manvolnum></citerefentry>
66
process can be found, this program will immediately exit with an
67
exit code indicating failure.
70
This program is not very useful on its own. This program is
71
really meant to run as a plugin in the <application
72
>Mandos</application> client-side system, where it is used as a
73
fallback and alternative to retrieving passwords from a
74
<application >Mandos</application> server.
77
If this program is killed (presumably by
78
<citerefentry><refentrytitle>plugin-runner</refentrytitle>
79
<manvolnum>8mandos</manvolnum></citerefentry> because some other
80
plugin provided the password), it cannot tell <citerefentry>
81
<refentrytitle>usplash</refentrytitle><manvolnum>8</manvolnum>
82
</citerefentry> to abort requesting a password, because
83
<citerefentry><refentrytitle>usplash</refentrytitle>
84
<manvolnum>8</manvolnum></citerefentry> does not support this.
85
Therefore, this program will then <emphasis>kill</emphasis> the
86
running <citerefentry><refentrytitle>usplash</refentrytitle>
87
<manvolnum>8</manvolnum></citerefentry> process and start a
88
<emphasis>new</emphasis> one using the same command line
89
arguments as the old one was using.
93
<refsect1 id="options">
94
<title>OPTIONS</title>
96
This program takes no options.
100
<refsect1 id="exit_status">
101
<title>EXIT STATUS</title>
103
If exit status is 0, the output from the program is the password
104
as it was read. Otherwise, if exit status is other than 0, the
105
program was interrupted or encountered an error, and any output
106
so far could be corrupt and/or truncated, and should therefore
111
<refsect1 id="environment">
112
<title>ENVIRONMENT</title>
115
<term><envar>cryptsource</envar></term>
116
<term><envar>crypttarget</envar></term>
119
If set, these environment variables will be assumed to
120
contain the source device name and the target device
121
mapper name, respectively, and will be shown as part of
125
These variables will normally be inherited from
126
<citerefentry><refentrytitle>plugin-runner</refentrytitle>
127
<manvolnum>8mandos</manvolnum></citerefentry>, which will
128
normally have inherited them from
129
<filename>/scripts/local-top/cryptroot</filename> in the
130
initial <acronym>RAM</acronym> disk environment, which will
131
have set them from parsing kernel arguments and
132
<filename>/conf/conf.d/cryptroot</filename> (also in the
133
initial RAM disk environment), which in turn will have been
134
created when the initial RAM disk image was created by
136
>/usr/share/initramfs-tools/hooks/cryptroot</filename>, by
137
extracting the information of the root file system from
138
<filename >/etc/crypttab</filename>.
141
This behavior is meant to exactly mirror the behavior of
142
<command>askpass</command>, the default password prompter.
149
<refsect1 id="files">
153
<term><filename>/dev/.initramfs/usplash_fifo</filename></term>
156
This is the <acronym>FIFO</acronym> to where this program
157
will write the commands for <citerefentry><refentrytitle
158
>usplash</refentrytitle><manvolnum>8</manvolnum>
159
</citerefentry>. See <citerefentry><refentrytitle
160
>fifo</refentrytitle><manvolnum>7</manvolnum>
166
<term><filename>/dev/.initramfs/usplash_outfifo</filename></term>
169
This is the <acronym>FIFO</acronym> where this program
170
will read the password from <citerefentry><refentrytitle
171
>usplash</refentrytitle><manvolnum>8</manvolnum>
172
</citerefentry>. See <citerefentry><refentrytitle
173
>fifo</refentrytitle><manvolnum>7</manvolnum>
179
<term><filename>/proc</filename></term>
182
To find the running <citerefentry><refentrytitle
183
>usplash</refentrytitle><manvolnum>8</manvolnum>
184
</citerefentry>, this directory will be searched for
185
numeric entries which will be assumed to be directories.
186
In all those directories, the <filename>exe</filename> and
187
<filename>cmdline</filename> entries will be used to
188
determine the name of the running binary, effective user
189
and group <abbrev>ID</abbrev>, and the command line
190
arguments. See <citerefentry><refentrytitle
191
>proc</refentrytitle><manvolnum>5</manvolnum>
197
<term><filename>/sbin/usplash</filename></term>
200
This is the name of the binary which will be searched for
201
in the process list. See <citerefentry><refentrytitle
202
>usplash</refentrytitle><manvolnum>8</manvolnum>
213
Killing <citerefentry><refentrytitle>usplash</refentrytitle>
214
<manvolnum>8</manvolnum></citerefentry> and starting a new one
215
is ugly, but necessary as long as it does not support aborting a
220
<refsect1 id="example">
221
<title>EXAMPLE</title>
223
Note that normally, this program will not be invoked directly,
224
but instead started by the Mandos <citerefentry><refentrytitle
225
>plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum>
230
This program takes no options.
233
<userinput>&COMMANDNAME;</userinput>
238
<refsect1 id="security">
239
<title>SECURITY</title>
241
If this program is killed by a signal, it will kill the process
242
<abbrev>ID</abbrev> which at the start of this program was
243
determined to run <citerefentry><refentrytitle
244
>usplash</refentrytitle><manvolnum>8</manvolnum></citerefentry>
245
as root (see also <xref linkend="files"/>). There is a very
246
slight risk that, in the time between those events, that process
247
<abbrev>ID</abbrev> was freed and then taken up by another
248
process; the wrong process would then be killed. Now, this
249
program can only be killed by the user who started it; see
250
<citerefentry><refentrytitle>plugin-runner</refentrytitle>
251
<manvolnum>8mandos</manvolnum></citerefentry>. This program
252
should therefore be started by a completely separate
253
non-privileged user, and no other programs should be allowed to
254
run as that special user. This means that it is not recommended
255
to use the user "nobody" to start this program, as other
256
possibly less trusted programs could be running as "nobody", and
257
they would then be able to kill this program, triggering the
258
killing of the process <abbrev>ID</abbrev> which may or may not
259
be <citerefentry><refentrytitle>usplash</refentrytitle>
260
<manvolnum>8</manvolnum></citerefentry>.
263
The only other thing that could be considered worthy of note is
264
this: This program is meant to be run by <citerefentry>
265
<refentrytitle>plugin-runner</refentrytitle><manvolnum
266
>8mandos</manvolnum></citerefentry>, and will, when run
267
standalone, outside, in a normal environment, immediately output
268
on its standard output any presumably secret password it just
269
received. Therefore, when running this program standalone
270
(which should never normally be done), take care not to type in
271
any real secret password by force of habit, since it would then
272
immediately be shown as output.
276
<refsect1 id="see_also">
277
<title>SEE ALSO</title>
279
<citerefentry><refentrytitle>crypttab</refentrytitle>
280
<manvolnum>5</manvolnum></citerefentry>,
281
<citerefentry><refentrytitle>fifo</refentrytitle>
282
<manvolnum>7</manvolnum></citerefentry>,
283
<citerefentry><refentrytitle>plugin-runner</refentrytitle>
284
<manvolnum>8mandos</manvolnum></citerefentry>,
285
<citerefentry><refentrytitle>proc</refentrytitle>
286
<manvolnum>5</manvolnum></citerefentry>,
287
<citerefentry><refentrytitle>usplash</refentrytitle>
288
<manvolnum>8</manvolnum></citerefentry>
292
<!-- Local Variables: -->
293
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
294
<!-- time-stamp-end: "[\"']>" -->
295
<!-- time-stamp-format: "%:y-%02m-%02d" -->