/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2008-09-01 08:29:23 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080901082923-i2liq6t7warmu9xe
* mandos.xml: Enclose "RAM" with <acronym>.
* overview.xml: - '' -

* plugin-runner.xml (DESCRIPTION): Improved wording.
  (PURPOSE): New section.
  (OPTIONS): Improved wording.
  (OVERVIEW, PLUGINS): New section.
  (FALLBACK): New empty placeholder section.

* plugins.d/password-prompt.xml: Enclose "RAM" with <acronym>.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
  }
133
133
  new_plugin->argv[0] = copy_name;
134
134
  new_plugin->argv[1] = NULL;
135
 
  
 
135
 
136
136
  new_plugin->environ = malloc(sizeof(char *));
137
137
  if(new_plugin->environ == NULL){
138
138
    free(copy_name);
141
141
    return NULL;
142
142
  }
143
143
  new_plugin->environ[0] = NULL;
144
 
  
 
144
 
145
145
  /* Append the new plugin to the list */
146
146
  plugin_list = new_plugin;
147
147
  return new_plugin;
183
183
  if(p == NULL){
184
184
    return false;
185
185
  }
186
 
  /* namelen = length of name of environment variable */
187
 
  size_t namelen = (size_t)(strchrnul(def, '=') - def);
188
 
  /* Search for this environment variable */
189
 
  for(char **e = p->environ; *e != NULL; e++){
190
 
    if(strncmp(*e, def, namelen+1) == 0){
191
 
      /* Refuse to add an existing variable */
192
 
      return true;
193
 
    }
194
 
  }
195
186
  return add_to_char_array(def, &(p->environ), &(p->envc));
196
187
}
197
188
 
336
327
    { .name = "global-options", .key = 'g',
337
328
      .arg = "OPTION[,OPTION[,...]]",
338
329
      .doc = "Options passed to all plugins" },
339
 
    { .name = "global-env", .key = 'e',
 
330
    { .name = "global-envs", .key = 'e',
340
331
      .arg = "VAR=value",
341
332
      .doc = "Environment variable passed to all plugins" },
342
333
    { .name = "options-for", .key = 'o',
343
334
      .arg = "PLUGIN:OPTION[,OPTION[,...]]",
344
335
      .doc = "Options passed only to specified plugin" },
345
 
    { .name = "env-for", .key = 'f',
 
336
    { .name = "envs-for", .key = 'f',
346
337
      .arg = "PLUGIN:ENV=value",
347
338
      .doc = "Environment variable passed to specified plugin" },
348
339
    { .name = "disable", .key = 'd',
384
375
        }
385
376
      }
386
377
      break;
387
 
    case 'e':                   /* --global-env */
 
378
    case 'e':                   /* --global-envs */
388
379
      if(arg == NULL){
389
380
        break;
390
381
      }
422
413
        }
423
414
      }
424
415
      break;
425
 
    case 'f':                   /* --env-for */
 
416
    case 'f':                   /* --envs-for */
426
417
      if(arg == NULL){
427
418
        break;
428
419
      }