/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

* plugin-runner.c (main): Bug fix: Do setgid before setuid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
936
936
  
937
937
  closedir(dir);
938
938
  dir = NULL;
939
 
  free_plugin(getplugin(NULL));
940
939
  
941
940
  for(plugin *p = plugin_list; p != NULL; p = p->next){
942
941
    if(p->pid != 0){
970
969
 
971
970
          if(debug){
972
971
            if(WIFEXITED(proc->status)){
973
 
              fprintf(stderr, "Plugin %s [%" PRIdMAX "] exited with"
974
 
                      " status %d\n", proc->name,
975
 
                      (intmax_t) (proc->pid),
 
972
              fprintf(stderr, "Plugin %" PRIdMAX " exited with status"
 
973
                      " %d\n", (intmax_t) (proc->pid),
976
974
                      WEXITSTATUS(proc->status));
977
975
            } else if(WIFSIGNALED(proc->status)){
978
 
              fprintf(stderr, "Plugin %s [%" PRIdMAX "] killed by"
979
 
                      " signal %d\n", proc->name,
980
 
                      (intmax_t) (proc->pid),
 
976
              fprintf(stderr, "Plugin %" PRIdMAX " killed by signal"
 
977
                      " %d\n", (intmax_t) (proc->pid),
981
978
                      WTERMSIG(proc->status));
982
979
            } else if(WCOREDUMP(proc->status)){
983
 
              fprintf(stderr, "Plugin %s [%" PRIdMAX "] dumped"
984
 
                      " core\n", proc->name, (intmax_t) (proc->pid));
 
980
              fprintf(stderr, "Plugin %" PRIdMAX " dumped core\n",
 
981
                      (intmax_t) (proc->pid));
985
982
            }
986
983
          }
987
984