get{pw,gr}nam no-such-user/group error condition
According to POSIX, they are supposed to return NULL and leave errno unchanged in case no such user exists. However, Sortix libc uses ENOUSER and ENOGROUP instead! Additionally, the functions check if errnum us less than zero, instead of being non-zero, which is wrong. Review all the functions for conformance and proper error handling. There's a whole family of functions.