func getUserInfo(username: String) throws -> Passwd {
    // getpwnam(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 getpwnam(username)?.pointee ?! UserInfoError.getError()