Re: [HACKERS] Oops in fe-auth.c

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [HACKERS] Oops in fe-auth.c
Дата
Msg-id 46A4E3EA.70408@hagander.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Oops in fe-auth.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> Actually coding up a patch for that was just a bunch of simple
>> search/replace ops. Attached is one that appears to work fine for me.
>
>> Was there any reason why this wasn't done before, or just nobody had the
>> time? If there was a reason, please let me know what it was :-)
>
> AFAIR nobody got round to it because it hadn't seemed important.

Ok. I actually managed to provoke a GSSAPI error that got cut off at 256
characters in testing. Which is kind of amazing in itself, but...


>> (Question about backpatch remains)
>
> I'd vote against backpatching.  The appropriate fix for back branches
> is probably just to reduce the strncpy and snprintf arguments to
> INITIAL_EXPBUFFER_SIZE, ie, make the code do what that header comment
> says it should do.

Right. See other mail as well.


> Style point: in the places where you've chosen to pass the whole PGconn,
> you should remove any separate arguments that are actually just PGconn
> fields; eg for pg_krb5_sendauth it looks like sock and servicename are
> now redundant.  Otherwise there are risks of programmer confusion, and
> maybe even wrong code generation, due to aliasing.
>
> It would be more consistent to pass PGconn around to all of these
> functions instead of trying to have them have just partial views of it,
> but I dunno if you want to engage in purely cosmetic changes.

I'll go ahead and do that now, while I'm whacking the code around.

//Magnus


В списке pgsql-patches по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Updated bitmap index patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: COPYable logs