srogue: improve privilege handling.

Setgid privileges are now dropped when not required.  restore() is now
less complex.
This commit is contained in:
John "Elwin" Edwards 2015-08-01 16:23:24 -04:00
parent bc5b26fece
commit 2e4f161e40
2 changed files with 3 additions and 45 deletions

View file

@ -121,7 +121,7 @@ char **envp;
#endif
if (!use_savedir)
md_droppriv();
md_normaluser();
/* get home and options from environment */