Re: PGSQL 7.2.1 compile error on Red Hat 5.2 due to peercred

From: Joe Bernstein <joe(at)postilion(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-ports(at)postgresql(dot)org
Subject: Re: PGSQL 7.2.1 compile error on Red Hat 5.2 due to peercred
Date: 2002-04-16 01:26:00
Message-ID: 20020415202600.A11417@stanley.postilion.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

(Apologies to Bruce Momjian for double-sending. If it's a real
annoyance, tell me so and I won't again; but I'm not subscribed
to pgsql-ports so not sure...)

On Mon, Apr 15, 2002 at 03:40:36PM -0400, Bruce Momjian wrote:

> Tom Lane wrote:

> > Joe Bernstein <joe(at)sfbooks(dot)com> writes:
> > > So look: Is whatever may or may not be wrong with this machine
> > > concerning peercred so catastrophically wrong that I Must Not attempt
> > > to run PostgreSQL?
> >
> > Just disable the code that tries to support peercred; it's certainly
> > not a necessary feature. (Change "#if defined(SO_PEERCRED)" to #if 0.)

Thanks! Duh!

(I recognise Tom Lane's name, but will wait to do this, partly to do my
taxes, and partly to see if anyone else screams "NO! NO!" But it sure
*looks* like that's all I need, so thanks!)

> > This does indicate that assuming SO_PEERCRED exists means struct ucred
> > exists is Wrong. Probably there should be a direct configure check for
> > HAVE_STRUCT_UCRED.
>
> That is interesting. My guess is that indeed it is a mixed OS version
> installed:
>
> > The machine is an i586 with a Linux on it that is ancestrally Red
> > Hat 5.2, kernel 2.3.2, but that has been hacked since and may since
> > have had another Linux installed over it (I'm not sure). I do know
>
> This is the first compile failure we have heard about and it is hard to
> imagine you have SO_PEERCRED defined but no ucred. My guess is that
> some of the system includes where updated, but not all.

When I wrote "hacked", by the way, I meant the good old-fashioned
meaning of "hacked, i.e., messed with by its owner. He's never clearly
explained to me what he did, and he was admittedly baffled by the SysV
IPC problem that stonkered Perl, but anyway, I didn't mean there had
been extensive redecoration by vandals. (Some exploits have happened,
I gather, but nothing like that.)

I have no clue what happened as regards ucred. I do know that he's done
(on his two Linux boxes) installs of bought Linuxen out of the box, and
he's also done highly customised installs of downloaded Linuxen; he's
also "hacked the kernel". So really, anything goes.

My own take on this was that SO_PEERCRED must be some sort of internal
PgSQL flag for "This is a Linux box, so it must have peercred support"
or some such; the discussion of peercred that I found at Google didn't
really suggest anything else, but I didn't actually locate any evidence
for this view. If SO_PEERCRED is some sort of pre-existing environment
variable, then yes, that would imply that the problem was unique to this
machine.

Anyway, unless there are screams about what Tom Lane suggested, it looks
like this should solve this problem. I'll be sure to let you know if
there are more surprises in the compile process...

Joe Bernstein
joe(at)sfbooks(dot)com
<http://these-survive.postilion.org/>

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Makarov Gera x8521 2002-04-18 05:24:32 Migrating Oracle to PostgreSQL
Previous Message Bruce Momjian 2002-04-16 00:43:39 Re: PGSQL 7.2.1 compile error on Red Hat 5.2 due to peercred