/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-request.xml

  • Committer: Teddy Hogeborn
  • Date: 2008-08-16 03:29:08 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080816032908-ihw7c05r2mnyk389
Add feature to specify custom environment variables for plugins.

* plugin-runner.c (plugin): New members "environ" and "envc" to
                            contain possible custom environment.
  (getplugin): Return NULL on failure instead of doing exit(); all
               callers changed.
  (add_to_char_array): New helper function for "add_argument" and
                       "add_environment".
  (addargument): Renamed to "add_argument".  Return bool.  Call
                 "add_to_char_array" to actually do things.
  (add_environment): New; analogous to "add_argument".
  (addcustomargument): Renamed to "add_to_argv" to avoid confusion
                       with "add_argument".
  (main): New options "--global-envs" and "--envs-for" to specify
          custom environment for plugins.  Print environment for
          plugins in debug mode.  Use asprintf instead of strcpy and
          strcat.  Use execve() for plugins with custom environments.
          Free environment for plugin when freeing plugin list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
6
6
<!ENTITY VERSION "1.0">
7
7
<!ENTITY COMMANDNAME "password-request">
8
 
<!ENTITY TIMESTAMP "2008-08-31">
9
8
]>
10
9
 
11
10
<refentry>
12
11
  <refentryinfo>
13
 
    <title>Mandos Manual</title>
 
12
    <title>&COMMANDNAME;</title>
14
13
    <!-- NWalsh's docbook scripts use this to generate the footer: -->
15
 
    <productname>Mandos</productname>
 
14
    <productname>&COMMANDNAME;</productname>
16
15
    <productnumber>&VERSION;</productnumber>
17
 
    <date>&TIMESTAMP;</date>
18
16
    <authorgroup>
19
17
      <author>
20
18
        <firstname>Björn</firstname>
33
31
    </authorgroup>
34
32
    <copyright>
35
33
      <year>2008</year>
36
 
      <holder>Teddy Hogeborn</holder>
37
 
      <holder>Björn Påhlsson</holder>
 
34
      <holder>Teddy Hogeborn &amp; Björn Påhlsson</holder>
38
35
    </copyright>
39
36
    <legalnotice>
40
37
      <para>
76
73
  <refsynopsisdiv>
77
74
    <cmdsynopsis>
78
75
      <command>&COMMANDNAME;</command>
79
 
      <group>
80
 
        <arg choice="plain"><option>--connect
81
 
        <replaceable>IPADDR</replaceable><literal>:</literal
82
 
        ><replaceable>PORT</replaceable></option></arg>
83
 
        <arg choice="plain"><option>-c
84
 
        <replaceable>IPADDR</replaceable><literal>:</literal
85
 
        ><replaceable>PORT</replaceable></option></arg>
86
 
      </group>
87
 
      <sbr/>
88
 
      <group>
89
 
        <arg choice="plain"><option>--keydir
90
 
        <replaceable>DIRECTORY</replaceable></option></arg>
91
 
        <arg choice="plain"><option>-d
92
 
        <replaceable>DIRECTORY</replaceable></option></arg>
93
 
      </group>
94
 
      <sbr/>
95
 
      <group>
96
 
        <arg choice="plain"><option>--interface
97
 
        <replaceable>NAME</replaceable></option></arg>
98
 
        <arg choice="plain"><option>-i
99
 
        <replaceable>NAME</replaceable></option></arg>
100
 
      </group>
101
 
      <sbr/>
102
 
      <group>
103
 
        <arg choice="plain"><option>--pubkey
104
 
        <replaceable>FILE</replaceable></option></arg>
105
 
        <arg choice="plain"><option>-p
106
 
        <replaceable>FILE</replaceable></option></arg>
107
 
      </group>
108
 
      <sbr/>
109
 
      <group>
110
 
        <arg choice="plain"><option>--seckey
111
 
        <replaceable>FILE</replaceable></option></arg>
112
 
        <arg choice="plain"><option>-s
113
 
        <replaceable>FILE</replaceable></option></arg>
114
 
      </group>
115
 
      <sbr/>
116
 
      <arg>
117
 
        <option>--priority <replaceable>STRING</replaceable></option>
118
 
      </arg>
119
 
      <sbr/>
120
 
      <arg>
121
 
        <option>--dh-bits <replaceable>BITS</replaceable></option>
122
 
      </arg>
123
 
      <sbr/>
124
 
      <arg>
125
 
        <option>--debug</option>
126
 
      </arg>
127
 
    </cmdsynopsis>
128
 
    <cmdsynopsis>
129
 
      <command>&COMMANDNAME;</command>
130
 
      <group choice="req">
131
 
        <arg choice='plain'><option>--help</option></arg>
132
 
        <arg choice='plain'><option>-?</option></arg>
133
 
      </group>
134
 
    </cmdsynopsis>
135
 
    <cmdsynopsis>
136
 
      <command>&COMMANDNAME;</command>
137
 
      <arg choice='plain'><option>--usage</option></arg>
138
 
    </cmdsynopsis>
139
 
    <cmdsynopsis>
140
 
      <command>&COMMANDNAME;</command>
141
 
      <group choice="req">
142
 
        <arg choice='plain'><option>--version</option></arg>
143
 
        <arg choice='plain'><option>-V</option></arg>
144
 
      </group>
145
 
    </cmdsynopsis>
 
76
      <arg choice='opt'>--connect<arg choice='plain'>IP</arg></arg>
 
77
      <arg choice='opt'>--keydir<arg choice='plain'>KEYDIR</arg></arg>
 
78
      <arg choice='opt'>--interface<arg choice='plain'>INTERFACE</arg></arg>
 
79
      <arg choice='opt'>--pubkey<arg choice='plain'>PUBKEY</arg></arg>
 
80
      <arg choice='opt'>--seckey<arg choice='plain'>SECKEY</arg></arg>
 
81
      <arg choice='opt'>--priority<arg choice='plain'>PRIORITY</arg></arg>
 
82
      <arg choice='opt'>--dh-bits<arg choice='plain'>BITS</arg></arg>      
 
83
      <arg choice='opt'>--debug</arg>
 
84
    </cmdsynopsis>
 
85
    <cmdsynopsis>
 
86
      <command>&COMMANDNAME;</command>
 
87
      <arg choice='plain'>--help</arg>
 
88
    </cmdsynopsis>
 
89
    <cmdsynopsis>
 
90
      <command>&COMMANDNAME;</command>
 
91
      <arg choice='plain'>--usage</arg>
 
92
    </cmdsynopsis>
 
93
    <cmdsynopsis>
 
94
      <command>&COMMANDNAME;</command>
 
95
      <arg choice='plain'>--version</arg>
 
96
    </cmdsynopsis>    
146
97
  </refsynopsisdiv>
147
98
 
148
99
  <refsect1 id="description">
154
105
      passwords given is automaticly decrypted and passed to
155
106
      cryptsetup.
156
107
    </para>
157
 
  </refsect1>
158
 
  
159
 
  <refsect1 id="options">
160
 
    <title>OPTIONS</title>
161
 
    <para>
162
 
      Commonly not invoked as command lines but from configuration
163
 
      file of plugin runner.
164
 
    </para>
165
108
 
166
109
    <variablelist>
167
110
      <varlistentry>
168
 
        <term><option>--connect=<replaceable
169
 
        >IPADDR</replaceable><literal>:</literal><replaceable
170
 
        >PORT</replaceable></option></term>
171
 
        <term><option>-c
172
 
        <replaceable>IPADDR</replaceable><literal>:</literal
173
 
        ><replaceable>PORT</replaceable></option></term>
 
111
        <term><literal>-c</literal>, <literal>--connect=<replaceable>
 
112
        IP</replaceable></literal></term>
174
113
        <listitem>
175
114
          <para>
176
 
            Connect directly to a specified mandos server
 
115
            Connect directly to a sepcified mandos server
177
116
          </para>
178
117
        </listitem>
179
118
      </varlistentry>
180
119
 
181
120
      <varlistentry>
182
 
        <term><option>--keydir=<replaceable
183
 
        >DIRECTORY</replaceable></option></term>
184
 
        <term><option>-d
185
 
        <replaceable>DIRECTORY</replaceable></option></term>
 
121
        <term><literal>-d</literal>, <literal>--keydir=<replaceable>
 
122
        KEYDIR</replaceable></literal></term>
186
123
        <listitem>
187
124
          <para>
188
125
            Directory where the openpgp keyring is
189
126
          </para>
190
127
        </listitem>
191
 
      </varlistentry>
 
128
      </varlistentry>      
192
129
 
193
130
      <varlistentry>
194
 
        <term><option>--interface=
195
 
        <replaceable>NAME</replaceable></option></term>
196
 
        <term><option>-i
197
 
        <replaceable>NAME</replaceable></option></term>
 
131
        <term><literal>-i</literal>, <literal>--interface=
 
132
        <replaceable>INTERFACE</replaceable></literal></term>
198
133
        <listitem>
199
134
          <para>
200
 
            Interface that Avahi will connect through
 
135
            Interface that Avahi will conntect through
201
136
          </para>
202
137
        </listitem>
203
 
      </varlistentry>
 
138
      </varlistentry>      
204
139
 
205
140
      <varlistentry>
206
 
        <term><option>--pubkey=<replaceable
207
 
        >FILE</replaceable></option></term>
208
 
        <term><option>-p
209
 
        <replaceable>FILE</replaceable></option></term>
 
141
        <term><literal>-p</literal>, <literal>--pubkey=<replaceable>
 
142
        PUBKEY</replaceable></literal></term>
210
143
        <listitem>
211
144
          <para>
212
145
            Public openpgp key for gnutls authentication
213
146
          </para>
214
147
        </listitem>
215
 
      </varlistentry>
216
 
 
217
 
      <varlistentry>
218
 
        <term><option>--seckey=<replaceable
219
 
        >FILE</replaceable></option></term>
220
 
        <term><option>-s
221
 
        <replaceable>FILE</replaceable></option></term>
222
 
        <listitem>
223
 
          <para>
224
 
            Secret OpenPGP key for GnuTLS authentication
225
 
          </para>
226
 
        </listitem>
227
 
      </varlistentry>
228
 
      
229
 
      <varlistentry>
230
 
        <term><option>--priority=<replaceable
231
 
        >STRING</replaceable></option></term>
232
 
        <listitem>
233
 
          <para>
234
 
            GnuTLS priority
235
 
          </para>
236
 
        </listitem>
237
 
      </varlistentry>
238
 
 
239
 
      <varlistentry>
240
 
        <term><option>--dh-bits=<replaceable
241
 
        >BITS</replaceable></option></term>
242
 
        <listitem>
243
 
          <para>
244
 
            DH bits to use in gnutls communication
245
 
          </para>
246
 
        </listitem>
247
 
      </varlistentry>
248
 
      
249
 
      <varlistentry>
250
 
        <term><option>--debug</option></term>
 
148
      </varlistentry>      
 
149
 
 
150
      <varlistentry>
 
151
        <term><literal>-s</literal>, <literal>--seckey=<replaceable>
 
152
        SECKEY</replaceable></literal></term>
 
153
        <listitem>
 
154
          <para>
 
155
            Secret openpgp key for gnutls authentication
 
156
          </para>
 
157
        </listitem>
 
158
      </varlistentry>            
 
159
      
 
160
      <varlistentry>
 
161
        <term><literal>--priority=<replaceable>PRIORITY</replaceable>
 
162
        </literal></term>
 
163
        <listitem>
 
164
          <para>
 
165
            GNUTLS priority
 
166
          </para>
 
167
        </listitem>
 
168
      </varlistentry>            
 
169
 
 
170
      <varlistentry>
 
171
        <term><literal>--dh-bits=<replaceable>BITS</replaceable>
 
172
        </literal></term>
 
173
        <listitem>
 
174
          <para>
 
175
            dh-bits to use in gnutls communication
 
176
          </para>
 
177
        </listitem>
 
178
      </varlistentry>      
 
179
      
 
180
      <varlistentry>
 
181
        <term><literal>--debug</literal></term>
251
182
        <listitem>
252
183
          <para>
253
184
            Debug mode
256
187
      </varlistentry>
257
188
      
258
189
      <varlistentry>
259
 
        <term><option>--help</option></term>
260
 
        <term><option>-?</option></term>
 
190
        <term><literal>-?</literal>, <literal>--help</literal></term>
261
191
        <listitem>
262
192
          <para>
263
193
            Gives a help message
266
196
      </varlistentry>
267
197
      
268
198
      <varlistentry>
269
 
        <term><option>--usage</option></term>
 
199
        <term><literal>--usage</literal></term>
270
200
        <listitem>
271
201
          <para>
272
202
            Gives a short usage message
275
205
      </varlistentry>
276
206
 
277
207
      <varlistentry>
278
 
        <term><option>--version</option></term>
279
 
        <term><option>-V</option></term>
 
208
        <term><literal>-V</literal>, <literal>--version</literal></term>
280
209
        <listitem>
281
210
          <para>
282
211
            Prints the program version
283
212
          </para>
284
213
        </listitem>
285
 
      </varlistentry>
 
214
      </varlistentry>            
286
215
    </variablelist>
287
216
  </refsect1>
288
 
 
289
 
  <refsect1 id="exit_status">
290
 
    <title>EXIT STATUS</title>
291
 
    <para>
292
 
    </para>
293
 
  </refsect1>
294
 
 
295
 
  <refsect1 id="environment">
296
 
    <title>ENVIRONMENT</title>
297
 
    <para>
298
 
    </para>
299
 
  </refsect1>
300
 
 
301
 
  <refsect1 id="file">
302
 
    <title>FILES</title>
303
 
    <para>
304
 
    </para>
305
 
  </refsect1>
306
 
  
307
 
  <refsect1 id="bugs">
308
 
    <title>BUGS</title>
309
 
    <para>
310
 
    </para>
311
 
  </refsect1>
312
 
 
313
 
  <refsect1 id="example">
314
 
    <title>EXAMPLE</title>
315
 
    <para>
316
 
    </para>
317
 
  </refsect1>
318
 
 
319
 
  <refsect1 id="security">
320
 
    <title>SECURITY</title>
321
 
    <para>
322
 
    </para>
323
 
  </refsect1>
324
 
 
325
 
  <refsect1 id="see_also">
326
 
    <title>SEE ALSO</title>
327
 
    <para>
328
 
      <citerefentry><refentrytitle>mandos</refentrytitle>
329
 
      <manvolnum>8</manvolnum></citerefentry>,
330
 
      <citerefentry><refentrytitle>password-prompt</refentrytitle>
331
 
      <manvolnum>8mandos</manvolnum></citerefentry>,
332
 
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
333
 
      <manvolnum>8mandos</manvolnum></citerefentry>
334
 
    </para>
335
 
    <itemizedlist>
336
 
      <listitem><para>
337
 
        <ulink url="http://www.zeroconf.org/">Zeroconf</ulink>
338
 
      </para></listitem>
339
 
      
340
 
      <listitem><para>
341
 
        <ulink url="http://www.avahi.org/">Avahi</ulink>
342
 
      </para></listitem>
343
 
      
344
 
      <listitem><para>
345
 
        <ulink
346
 
            url="http://www.gnu.org/software/gnutls/">GnuTLS</ulink>
347
 
      </para></listitem>
348
 
      
349
 
      <listitem><para>
350
 
        <ulink
351
 
        url="http://www.gnupg.org/related_software/gpgme/">
352
 
        GPGME</ulink>
353
 
      </para></listitem>
354
 
      
355
 
      <listitem><para>
356
 
        <citation>RFC 4880: <citetitle>OpenPGP Message
357
 
        Format</citetitle></citation>
358
 
      </para></listitem>
359
 
      
360
 
      <listitem><para>
361
 
        <citation>RFC 5081: <citetitle>Using OpenPGP Keys for
362
 
        Transport Layer Security</citetitle></citation>
363
 
      </para></listitem>
364
 
      
365
 
      <listitem><para>
366
 
        <citation>RFC 4291: <citetitle>IP Version 6 Addressing
367
 
        Architecture</citetitle>, section 2.5.6, Link-Local IPv6
368
 
        Unicast Addresses</citation>
369
 
      </para></listitem>
370
 
    </itemizedlist>
371
 
  </refsect1>
372
 
 
373
217
</refentry>
374
 
<!-- Local Variables: -->
375
 
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
376
 
<!-- time-stamp-end: "[\"']>" -->
377
 
<!-- time-stamp-format: "%:y-%02m-%02d" -->
378
 
<!-- End: -->