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 1hpgU9-00032o-Js for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 22:08:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpgU7-0000x4-6v for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 22:08:43 +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 1hpgU6-0000qb-UK for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 22:08:42 +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 1hpgU3-0004kY-Dv for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 22:08:41 +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 x6MM8WqJ021580; Mon, 22 Jul 2019 18:08:32 -0400 From: Tom Lane To: Peter Eisentraut cc: Andrew Dunstan , pgsql-hackers@lists.postgresql.org Subject: Re: initdb recommendations In-reply-to: <12115.1563822921@sss.pgh.pa.us> References: <20190406180839.GA1921989@rfd.leadboat.com> <96389374-9454-d26d-6f79-7c7b15ec14bd@2ndquadrant.com> <91f8272f-117f-2a04-862b-871a7b86eeed@2ndquadrant.com> <7b6c4220-e5ef-2a13-18ad-af596c52b71a@2ndquadrant.com> <23654.1563804669@sss.pgh.pa.us> <7886.1563812705@sss.pgh.pa.us> <27724.1563813541@sss.pgh.pa.us> <12115.1563822921@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 22 Jul 2019 15:15:21 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21578.1563833312.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 22 Jul 2019 18:08:32 -0400 Message-ID: <21579.1563833312@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > I tried doing a run on gaur (old HPUX, so no "peer" auth) before the > revert happened. It got as far as initdb-check [1], which failed quite > thoroughly with lots of the same error as above. > ... > Presumably Noah's AIX menagerie would have failed in about the > same way if it had run. Oh --- actually, Noah's machines *did* report in on that commit, and they got past initdb-check, only to fail at install-check-C much the same as most of the rest of the world. Studying their configure output, the reason is that they have getpeereid(), so that AIX *does* support peer auth. At least on that version of AIX. That makes it only HPUX and Windows that can't do it. BTW, after looking at the patch a bit more, I'm pretty distressed by this: --- a/src/include/port.h +++ b/src/include/port.h @@ -361,6 +361,11 @@ extern int fls(int mask); extern int getpeereid(int sock, uid_t *uid, gid_t *gid); #endif = +/* must match src/port/getpeereid.c */ +#if defined(HAVE_GETPEEREID) || defined(SO_PEERCRED) || defined(LOCAL_PEE= RCRED) || defined(HAVE_GETPEERUCRED) +#define HAVE_AUTH_PEER 1 +#endif + #ifndef HAVE_ISINF extern int isinf(double x); #else I seriously doubt that port.h includes, or should be made to include, whatever headers provide SO_PEERCRED and/or LOCAL_PEERCRED. That means that the result of this test is going to be different in different .c files depending on what was or wasn't included. It could also get silently broken on specific platforms by an ill-advised #include removal (and, once we fix the buildfarm script to not fail on PEER-less platforms, the buildfarm wouldn't detect the breakage either). Another objection to this is that it's entirely unclear from the buildfarm logs whether HAVE_AUTH_PEER got set on a particular system. I think that when/if we try again, configure itself ought to be responsible for setting HAVE_AUTH_PEER after probing for these various antecedent symbols. regards, tom lane