X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B138D475C3D for ; Thu, 17 Apr 2003 13:13:22 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 1DE68475C15 for ; Thu, 17 Apr 2003 13:13:21 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h3HHDCs07884; Thu, 17 Apr 2003 13:13:12 -0400 (EDT) From: Bruce Momjian Message-Id: <200304171713.h3HHDCs07884@candle.pha.pa.us> Subject: Re: Require Assistance Solving Problem - erroneous pg_hba.conf In-Reply-To: <11492.1050598388@sss.pgh.pa.us> To: Tom Lane Date: Thu, 17 Apr 2003 13:13:12 -0400 (EDT) Cc: Greg Kelley , pgsql-admin@postgresql.org, Joe Conway X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, hits=-26.0 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/252 X-Sequence-Number: 8407 Yep, makes sense. This is clearly our bug because we overrode a standard C function with one that didn't behave the same. My man page says isblank tests only for space and tab, while we added \r to handle DOS files cleanly. --------------------------------------------------------------------------- Tom Lane wrote: > "Greg Kelley" writes: > > A RedHat Upgrade Saturday from 8.0 to 9.0 just did a 'minor' version > > upgrade from 7.3.1 to 7.3.2. > > [ and broke his pg_hba.conf ] > > Ah-hah, I now know where the behavioral change came from: the Red Hat > RPMs contain this patch: > > --- postgresql-7.3.2/src/backend/libpq/hba.c.sopwith 2003-01-09 09:09:01.000000000 -0500 > +++ postgresql-7.3.2/src/backend/libpq/hba.c 2003-01-09 09:09:09.000000000 -0500 > @@ -72,11 +72,13 @@ > * Some standard C libraries, including GNU, have an isblank() function. > * Others, including Solaris, do not. So we have our own. > */ > +#ifndef isblank > static bool > isblank(const char c) > { > return c == ' ' || c == '\t' || c == '\r'; > } > +#endif > > > /* > > which on RHL 9 causes the system definition of isblank() to be > substituted for Postgres'. That means \r is no longer treated as > whitespace, as it was in prior versions. > > There is a fix in our CVS tree that prevents this problem and restores > the old treatment of \r, but for now you gotta get rid of the Windows- > style newlines. > > regards, tom lane > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073