Permanently switch UID only if we succeed in doing setuid
authorAlan T. DeKok <aland@freeradius.org>
Thu, 27 Nov 2008 11:07:18 +0000 (12:07 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 27 Nov 2008 11:10:58 +0000 (12:10 +0100)
commit202cb1c849ac2231403106eb201bfdd433e2b374
treeb03948daf5b0be92f762d002bf1ead43a1a5d028
parente09b349a515b405dceec85dcf914544ea016a684
Permanently switch UID only if we succeed in doing setuid

mainconfig.c does setuid to an unpriviledged user (temporarily).
We do setuid(0) back to bind to the sockets.
But before running anything else, we permanently switch uid's
back to the unpriviledged user.  But only if the first suid was
done
src/main/event.c
src/main/mainconfig.c