Arranged to use the shared function.
Implemented getresuid(2).
Implemented Java version of getresuid(2).