Re: BUG #3902: Segmentation faults using GSSAPI authentication - Mailing list pgsql-bugs

From Peter Koczan
Subject Re: BUG #3902: Segmentation faults using GSSAPI authentication
Date
Msg-id 4544e0330801301102y64156aadx39c2be114ebd04de@mail.gmail.com
Whole thread Raw
In response to Re: BUG #3902: Segmentation faults using GSSAPI authentication  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
> Hmm, crash inside getenv??  That's weird, that suggests something has
> clobbered the environment-strings data structure.
>
> [ pokes around in code... ]  And behold, here's a smoking gun:
> pg_GSS_recvauth() is doing a putenv() with a string that it got from
> palloc().  The active context at this point is PostmasterContext,
> which *is* going to go away soon, leaving a gaping hole in the environ
> list.
>
> I still couldn't reproduce a crash with that knowledge, but I bet that
> if you apply the attached patch, things will get better.

The patch worked like a charm. Thanks, Tom.

Peter

pgsql-bugs by date:

Previous
From: "Marcus Torres"
Date:
Subject: BUG #3914: Self-Join Group-By Clause Produces Incorrect Results
Next
From: "David Dunwoody"
Date:
Subject: Re: BUG #3913: pg_dump -T option not recognised