Check the return value of setuid, and make sure that it worked.