Re: [PATCH] Add peer authentication TAP test - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Add peer authentication TAP test
Date
Msg-id YzP2vBC1uBGEDRM6@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Add peer authentication TAP test  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Responses Re: [PATCH] Add peer authentication TAP test
List pgsql-hackers
On Wed, Sep 28, 2022 at 09:12:57AM +0200, Drouvot, Bertrand wrote:
> Maybe the variable name should be system_user instead or should we use
> another way to get the "SYSTEM_USER" to be used in the map?

Hmm, indeed.  It would be more reliable to rely on the contents
returned by getpeereid()/getpwuid() after one successful peer
connection, then use it in the map.  I was wondering whether using
stuff like getpwuid() in the perl script itself would be better, but
it sounds less of a headache in terms of portability to just rely on
authn_id via SYSTEM_USER to generate the contents of the correct map.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "Drouvot, Bertrand"
Date:
Subject: Re: [PATCH] Add peer authentication TAP test
Next
From: Michael Paquier
Date:
Subject: Re: [small patch] Change datatype of ParallelMessagePending from "volatile bool" to "volatile sig_atomic_t"