func getUserInfo(uid: UID) throws -> Passwd {
    // getpwuid(2) documentation says "If one wants to check errno after
    // the call, it should be set to zero before the call."
    errno = 0
    return try getpwuid(uid)?.pointee ?! UserInfoError.getError()