"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotd: support UIDs in the `user' directive
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 6 Aug 2024 08:48:00 +0200

Download raw body.

Thread
On Mon, Aug 05, 2024 at 06:37:32PM +0200, Omar Polo wrote:
> This adds support to use both user ids in addition to user login names
> in the `user' directive.
> 
> My first attempt was more like `connection limit user' is handled, i.e.
> with gotd_parseuid(), except that I found awkward to parse /etc/passwd
> twice, hence the user_name/user_id split in this diff.
> 
> thoughts/comments?

Special cases where either username or uid are not set will
harm us one day.

I would feel better with having fully initialized user info
(name and uid) available as early as possible, even if that
means multiple passes over the password database. This won't
be a performance problem.