From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | Albert Schabhuetl <albert_schabhuetl(at)yahoo(dot)de>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #15520: PAM authentication + domain socket -> DNS query for symbolic hostname [local] |
Date: | 2018-11-27 00:39:01 |
Message-ID: | CAEepm=094tcbtyXdqtTHZ8NO0FFzrUZZ-i=h5XJ4rrEYvAaWGQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Nov 27, 2018 at 3:02 AM Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> 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.
Thanks for the review. Right. Here's a new version that moves both
things under the same if, and refactors a long line to fit in passing.
I wondered whether we could write
src/test/authentication/t/003_pam.pl, but it seems hard to do without
underhand tricks. Both open source PAM implementations really want to
read their configuration from /etc.
--
Thomas Munro
http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
0001-Don-t-set-PAM_RHOST-for-Unix-sockets-v2.patch | application/octet-stream | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2018-11-27 07:10:50 | Re: New sessions on a database to be dropped consume 100% cpu |
Previous Message | PG Bug reporting form | 2018-11-26 14:57:17 | BUG #15522: pg_upgrade from 9.6 to PG 11.1 with postgis 2.4.5 give error undefined symbol geod_polygon_init |