From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Christian Ullrich <chris(at)chrullrich(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used |
Date: | 2016-03-29 22:14:13 |
Message-ID: | 20160329221413.GA929448@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > So, it seems that ClientAuthentication() expects to raise ereport(FATAL)
> > in case of authentication failures. But what's the code path that
> > causes that to happen if a ereport(ERROR) happens in there? Because all
> > that code is pretty careful to not do ereport(ERROR) directly and
> > instead return STATUS_ERROR which makes ClientAuthentication do the
> > FATAL report. If this doesn't matter, then isn't this whole code overly
> > complicated for no reason?
>
> The reason why elog(ERROR) will become a FATAL is that no outer setjmp
> has been executed yet, so elog.c will realize it has noplace to longjmp
> to.
Ah, I was looking callers up-stack and found nothing. That should have
cued me that that was happening :-)
> Anyway, as things stand, elog(ERROR) will abort the session safely but
> you won't necessarily get the kind of logging you want, so expected
> auth-failure cases should try to go the STATUS_ERROR route.
In other words, the use of palloc() and friends (psprintf in the patch)
should be acceptable here.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-03-30 01:09:04 | Re: Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used |
Previous Message | Tom Lane | 2016-03-29 21:52:05 | Re: Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-03-29 22:15:15 | Re: [PATCH] Remove TZ entry from postgres CLI doc page. |
Previous Message | David G. Johnston | 2016-03-29 22:06:05 | Re: pg_restore casts check constraints differently |