pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Remove one use of IDENT_USERNAME_MAX
Date: Tue, 29 Oct 2019 10:34:00 -0400
Message-ID: <13092.1572359640@sss.pgh.pa.us> (raw)
In-Reply-To: <eedd3c43-ed87-3c84-de36-07a83ca94265@2ndquadrant.com>
References: <c798fba5-8b71-4f27-c78e-37714037ea31@2ndquadrant.com>
	<20191028.141008.1808344564081861818.horikyota.ntt@gmail.com>
	<14311.1572270354@sss.pgh.pa.us>
	<eedd3c43-ed87-3c84-de36-07a83ca94265@2ndquadrant.com>

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 2019-10-28 14:45, Tom Lane wrote:
>> Kyotaro Horiguchi <horikyota.ntt@gmail.com> writes:
>>> 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?

> Maybe.  Or we just decide that check_usermap() is not allowed to call 
> getpw*().  It's just a string-matching routine, so it doesn't have any 
> such business anyway.

I'm okay with that as long as you add a comment describing this
assumption.

			regards, tom lane





view thread (6+ messages)  latest in thread

Message-ID: <13092.1572359640@sss.pgh.pa.us>
Permalink:  ../13092.1572359640@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13092.1572359640@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, horikyota.ntt@gmail.com
  Subject: Re: Remove one use of IDENT_USERNAME_MAX
  In-Reply-To: <13092.1572359640@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox