Re: Remove one use of IDENT_USERNAME_MAX - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove one use of IDENT_USERNAME_MAX
Date
Msg-id 14311.1572270354@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove one use of IDENT_USERNAME_MAX  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Remove one use of IDENT_USERNAME_MAX
List pgsql-hackers
Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
> At Sat, 26 Oct 2019 08:55:03 +0200, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote in
>> IDENT_USERNAME_MAX is the maximum length of the information returned
>> by an ident server, per RFC 1413.  Using it as the buffer size in peer
>> authentication is inappropriate.  It was done here because of the
>> historical relationship between peer and ident authentication.  But
>> since it's also completely useless code-wise, remove it.

> In think one of the reasons for the coding is the fact that *pw is
> described to be placed in the static area, which can be overwritten by
> succeeding calls to getpw*() functions.

Good point ... so maybe pstrdup instead of using a fixed-size buffer?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Konstantin Knizhnik
Date:
Subject: Re: [Proposal] Global temporary tables