Re: postmaster segfaults when pg_hba.cof is missing

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Rudy Lippan <rlippan(at)remotelinux(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: postmaster segfaults when pg_hba.cof is missing
Date: 2002-12-14 18:49:47
Message-ID: 200212141849.gBEInlw02341@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches


Patch applied to HEAD and 7.3.X. Thanks.

---------------------------------------------------------------------------

Neil Conway wrote:
> On Thu, 2002-12-12 at 13:13, Rudy Lippan wrote:
> > I know this is a broken install, but postmaster should not segfault when
> > it can't find a file.
> >
> > postgres(at)war PGDATA $ ../pgsql7.3/bin/postmaster
> > LOG: load_hba: Unable to open authentication config file
> > "/usr/local/PGDATA/pgsql7.3/pg_hba.conf": No such file or directory
> > Segmentation fault (core dumped)
>
> Good catch. Here's a patch against CVS HEAD that fixes the problem.
>
> The actual segfault was caused by a double pfree(), but ISTM that
> failing to find pg_hba.conf should be a fatal error anyway, so I
> increased the priority of the elog() from LOG to FATAL and refactored
> the code a little bit.
>
> Bruce: unless anyone has an objection, please apply.
>
> Thanks for the report.
>
> Cheers,
>
> Neil

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2002-12-14 20:33:00 Bug #848: Index on bigint column is unused in selects
Previous Message Bruce Momjian 2002-12-14 18:45:43 Re: Bug #838: SSL problems in 7.3

Browse pgsql-patches by date

  From Date Subject
Next Message Frank van Vugt 2002-12-15 11:02:40 v7.3 : \encoding doesn't show changes in client encoding that are not done with \encoding itself (i.e. set names/set client_encoding)
Previous Message Bruce Momjian 2002-12-13 20:40:32 Re: [BUGS] Bug #718: request for improvement of /? to show