Re: BUG #15520: PAM authentication + domain socket -> DNS query for symbolic hostname [local]
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>,
Albert Schabhuetl <albert_schabhuetl@yahoo.de>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2018-11-26T14:02:12Z
Lists: pgsql-bugs
On 25/11/2018 23:30, Thomas Munro wrote: >>> I wonder if anyone out there has come to rely on the value "[local]" >> I vote for changing it, and documenting it in the release notes. > Yeah. Here is a draft patch to change that. Test output: > > $ psql -h localhost postgres munro > PAM_USER=munro, PAM_RHOST=localhost > $ psql postgres munro > PAM_USER=munro, PAM_RHOST= I think this is the right thing to do. About your patch, if we're not going to set PAM_RHOST, then we should also avoid the call to pg_getnameinfo_all() earlier in CheckPAMAuth(). Look at the original patch linked earlier in the thread; we just need to put if statements around both of those hunks. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Don't set PAM_RHOST for Unix sockets.
- 63d8350665c8 9.6.12 landed
- 96ed0b870454 10.7 landed
- 0640d9517e7e 11.2 landed
- 0f9cdd7dca69 12.0 landed
-
Set PAM_RHOST item for PAM authentication
- 2f1d2b7a75fe 9.6.0 cited