check the return value of setuid and friends

Under some circumstances, setuid() and family can fail,
returning a non-zero value.  (see "man setuid" for details).
If this happens, we want to ensure that init doesn't spawn a
process which has root privileges when it's not suppose to.

Change-Id: Idd03f2c8f82a7eaf6e696b5bcfe308e51ea58b52
1 file changed