pg.ddx.io  pgsql-docs@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: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: initdb recommendations
Date: Mon, 22 Jul 2019 18:08:32 -0400
Message-ID: <21579.1563833312@sss.pgh.pa.us> (raw)
In-Reply-To: <12115.1563822921@sss.pgh.pa.us>
References: <bec17f0a-ddb1-8b95-5e69-368d9d0a3390@postgresql.org>
	<f27d3170-76cf-4afb-1e1a-b1059295ec8d@2ndquadrant.com>
	<CABUevExMizVYea9zaHBte66u9KipEgfwcsaE9spfqK9iYRST_g@mail.gmail.com>
	<20190406180839.GA1921989@rfd.leadboat.com>
	<96389374-9454-d26d-6f79-7c7b15ec14bd@2ndquadrant.com>
	<fcd8848c-618c-23d1-2b39-77b13cb2d0a1@2ndquadrant.com>
	<CAOBaU_bTm5M-787dAw=E3OQ13ag_BqOboVWz9xkjQk1=__MwDQ@mail.gmail.com>
	<91f8272f-117f-2a04-862b-871a7b86eeed@2ndquadrant.com>
	<CAOBaU_Y9quphKH98xCgiAXgTYk5xcfTWcyKO-y3o_UJOk0s2uQ@mail.gmail.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>

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:

inline patch 1: src/include/port.h (+5/-0 lines) download inline-1.patch--- 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_PEERCRED) || 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

view thread (61+ messages)  latest in thread

Message-ID: <21579.1563833312@sss.pgh.pa.us>
Permalink:  ../21579.1563833312@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21579.1563833312@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-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: initdb recommendations
  In-Reply-To: <21579.1563833312@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