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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Oops in fe-auth.c
Date: 2007-07-23 17:13:46
Message-ID: 28925.1185210826@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Magnus Hagander <magnus(at)hagander(dot)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.

> (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.

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-07-23 17:16:14 Re: Updated bitmap index patch
Previous Message Alvaro Herrera 2007-07-23 17:05:40 Re: 8.2 is 30% better in pgbench than 8.3

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-07-23 17:16:14 Re: Updated bitmap index patch
Previous Message Teodor Sigaev 2007-07-23 17:12:29 tsearch core path, v0.58