/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.c

  • Committer: Teddy Hogeborn
  • Date: 2009-02-03 22:41:49 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090203224149-fc1301jojmusbzlx
* Makefile (run-server): Use "--no-dbus" unconditionally.

* initramfs-tools-script: Correct tests for writable "/conf/conf.d".

* mandos: Add process ID number to logging messages.
  (IPv6_TCPServer.server_bind): Use plain "raise".
  (main): Do not try to handle SIGSEGV; it does not work.  Use plain
         "raise".  Log KeyboardInterrupt and server exit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
    }
121
121
  }
122
122
  
123
 
  *new_plugin = (plugin){ .name = copy_name,
124
 
                          .argc = 1,
125
 
                          .disabled = false,
126
 
                          .next = plugin_list };
 
123
  *new_plugin = (plugin) { .name = copy_name,
 
124
                           .argc = 1,
 
125
                           .disabled = false,
 
126
                           .next = plugin_list };
127
127
  
128
128
  new_plugin->argv = malloc(sizeof(char *) * 2);
129
129
  if(new_plugin->argv == NULL){
376
376
  };
377
377
  
378
378
  error_t parse_opt(int key, char *arg, __attribute__((unused))
379
 
                    struct argp_state *state){
380
 
    switch(key){
 
379
                    struct argp_state *state) {
 
380
    switch(key) {
381
381
    case 'g':                   /* --global-options */
382
382
      if(arg != NULL){
383
383
        char *p;
512
512
     ignores everything but the --config-file option. */
513
513
  error_t parse_opt_config_file(int key, char *arg,
514
514
                                __attribute__((unused))
515
 
                                struct argp_state *state){
516
 
    switch(key){
 
515
                                struct argp_state *state) {
 
516
    switch(key) {
517
517
    case 'g':                   /* --global-options */
518
518
    case 'G':                   /* --global-env */
519
519
    case 'o':                   /* --options-for */
970
970
              fprintf(stderr, "Plugin %" PRIdMAX " exited with status"
971
971
                      " %d\n", (intmax_t) (proc->pid),
972
972
                      WEXITSTATUS(proc->status));
973
 
            } else if(WIFSIGNALED(proc->status)){
 
973
            } else if(WIFSIGNALED(proc->status)) {
974
974
              fprintf(stderr, "Plugin %" PRIdMAX " killed by signal"
975
975
                      " %d\n", (intmax_t) (proc->pid),
976
976
                      WTERMSIG(proc->status));