Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iPSZV-0004nW-2k for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Oct 2019 14:34:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iPSZT-00058A-L7 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Oct 2019 14:34:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iPSZT-000583-CG for pgsql-hackers@lists.postgresql.org; Tue, 29 Oct 2019 14:34:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iPSZQ-0001Bg-Sv for pgsql-hackers@postgresql.org; Tue, 29 Oct 2019 14:34:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9TEY0g6013093; Tue, 29 Oct 2019 10:34:01 -0400 From: Tom Lane To: Peter Eisentraut cc: Kyotaro Horiguchi , pgsql-hackers@postgresql.org Subject: Re: Remove one use of IDENT_USERNAME_MAX In-reply-to: References: <20191028.141008.1808344564081861818.horikyota.ntt@gmail.com> <14311.1572270354@sss.pgh.pa.us> Comments: In-reply-to Peter Eisentraut message dated "Tue, 29 Oct 2019 08:10:28 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13091.1572359640.1@sss.pgh.pa.us> Date: Tue, 29 Oct 2019 10:34:00 -0400 Message-ID: <13092.1572359640@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > On 2019-10-28 14:45, Tom Lane wrote: >> Kyotaro Horiguchi 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