/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-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 "plugin-runner">
8
 
<!ENTITY TIMESTAMP "2008-08-30">
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>
94
92
    <cmdsynopsis>
95
93
      <command>&COMMANDNAME;</command>
96
94
      <arg choice='plain'>--version</arg>
97
 
    </cmdsynopsis>
 
95
    </cmdsynopsis>    
98
96
  </refsynopsisdiv>
99
97
 
100
98
  <refsect1 id="description">
108
106
      and subsequlently started in the initrd environment. See
109
107
      <citerefentry><refentrytitle>crypttab</refentrytitle>
110
108
      <manvolnum>5</manvolnum></citerefentry> for more information on
111
 
      keyscripts.
 
109
      keyscripts.    
112
110
    </para>
113
111
 
114
112
    <para>
127
125
            Global options given to all plugins as additional start
128
126
            arguments.  Options are specified with a -o flag followed
129
127
            by a comma separated string of options.
130
 
          </para>       
 
128
          </para>         
131
129
        </listitem>
132
130
      </varlistentry>
133
131
 
140
138
            Plugin specific options given to the plugin as additional
141
139
            start arguments.  Options are specified with a -o flag
142
140
            followed by a comma separated string of options.
143
 
          </para>       
 
141
          </para>         
144
142
        </listitem>
145
 
      </varlistentry>
 
143
      </varlistentry>      
146
144
 
147
145
      <varlistentry>
148
146
        <term><literal>-d</literal>,<literal> --disable
151
149
        <listitem>
152
150
          <para>
153
151
            Disable a specific plugin
154
 
          </para>       
 
152
          </para>         
155
153
        </listitem>
156
154
      </varlistentry>
157
155
 
163
161
            Group ID the plugins will run as
164
162
          </para>
165
163
        </listitem>
166
 
      </varlistentry>
 
164
      </varlistentry>      
167
165
 
168
166
      <varlistentry>
169
167
        <term><literal>--userid <replaceable>ID</replaceable>
173
171
            User ID the plugins will run as
174
172
          </para>
175
173
        </listitem>
176
 
      </varlistentry>
 
174
      </varlistentry>      
177
175
 
178
176
      <varlistentry>
179
177
        <term><literal>--plugin-dir <replaceable>DIRECTORY</replaceable>
183
181
            Specify a different plugin directory
184
182
          </para>
185
183
        </listitem>
186
 
      </varlistentry>
 
184
      </varlistentry>       
187
185
      
188
186
      <varlistentry>
189
187
        <term><literal>--debug</literal></term>
219
217
            Prints the program version
220
218
          </para>
221
219
        </listitem>
222
 
      </varlistentry>
 
220
      </varlistentry>            
223
221
    </variablelist>
224
222
  </refsect1>
225
223
 
232
230
  <refsect1 id="file">
233
231
    <title>FILES</title>
234
232
    <para>
235
 
    </para>
236
 
  </refsect1>
 
233
      </para>
 
234
  </refsect1>  
237
235
 
238
236
  <refsect1 id="notes">
239
237
    <title>NOTES</title>
240
238
    <para>
241
 
    </para>
 
239
      </para>
242
240
  </refsect1>
243
241
  
244
242
  <refsect1 id="bugs">
245
243
    <title>BUGS</title>
246
244
    <para>
247
 
    </para>
248
 
  </refsect1>
 
245
      </para>
 
246
  </refsect1>  
249
247
 
250
248
  <refsect1 id="examples">
251
 
    <title>EXAMPLE</title>
 
249
    <title>EXAMPLES</title>
252
250
    <para>
253
 
    </para>
 
251
      </para>
254
252
  </refsect1>
255
253
 
256
254
  <refsect1 id="security">
257
255
    <title>SECURITY</title>
258
256
    <para>
259
 
    </para>
 
257
      </para>
260
258
  </refsect1>
261
259
 
262
260
  <refsect1 id="see_also">
263
261
    <title>SEE ALSO</title>
264
262
    <para>
265
 
      <citerefentry><refentrytitle>cryptsetup</refentrytitle>
266
 
      <manvolnum>8</manvolnum></citerefentry>,
267
263
      <citerefentry><refentrytitle>mandos</refentrytitle>
268
 
      <manvolnum>8</manvolnum></citerefentry>,
269
 
      <citerefentry><refentrytitle>password-prompt</refentrytitle>
270
 
      <manvolnum>8mandos</manvolnum></citerefentry>,
271
 
      <citerefentry><refentrytitle>password-request</refentrytitle>
 
264
      <manvolnum>8</manvolnum></citerefentry>, <citerefentry>
 
265
      <refentrytitle>password-request</refentrytitle>
 
266
      <manvolnum>8mandos</manvolnum></citerefentry> and <citerefentry>
 
267
      <refentrytitle>password-prompt</refentrytitle>
272
268
      <manvolnum>8mandos</manvolnum></citerefentry>
273
269
    </para>
274
270
  </refsect1>
275
271
 
276
272
</refentry>
277
 
<!-- Local Variables: -->
278
 
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
279
 
<!-- time-stamp-end: "[\"']>" -->
280
 
<!-- time-stamp-format: "%:y-%02m-%02d" -->
281
 
<!-- End: -->