Use priv when setting ruid, euid and suid

Changes to proc.c + cleaning up useless privs.