/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:
664
664
  }
665
665
  
666
666
  /* Strip permissions down to nobody */
 
667
  setgid(gid);
 
668
  if(ret == -1){
 
669
    perror("setgid");
 
670
  }
667
671
  ret = setuid(uid);
668
672
  if(ret == -1){
669
673
    perror("setuid");
670
 
  }  
671
 
  setgid(gid);
672
 
  if(ret == -1){
673
 
    perror("setgid");
674
674
  }
675
675
  
676
676
  if(plugindir == NULL){