Re: Fwd: Bug#249083: postgresql: Postgres SIGSEGV if wins in nsswitch.conf

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Pitt <martin(at)piware(dot)de>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Fwd: Bug#249083: postgresql: Postgres SIGSEGV if wins in nsswitch.conf
Date: 2004-05-25 19:13:38
Message-ID: 26583.1085512418@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I said:
> I would suggest adding more paranoia along these lines:

Actually the correct patch is as per attached. Even without a core
dump, the original code would not print the token that was really
causing the problem :-(. Please apply this patch and then tell us
what you see with winbind.

regards, tom lane

Index: hba.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/libpq/hba.c,v
retrieving revision 1.116.2.1
diff -c -r1.116.2.1 hba.c
*** hba.c 5 Dec 2003 15:50:39 -0000 1.116.2.1
--- hba.c 25 May 2004 19:06:54 -0000
***************
*** 124,137 ****

if (buf >= end_buf)
{
ereport(LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("authentication file token too long, skipping: \"%s\"",
! buf)));
/* Discard remainder of line */
while ((c = getc(fp)) != EOF && c != '\n')
;
- buf[0] = '\0';
break;
}

--- 124,137 ----

if (buf >= end_buf)
{
+ *buf = '\0';
ereport(LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("authentication file token too long, skipping: \"%s\"",
! start_buf)));
/* Discard remainder of line */
while ((c = getc(fp)) != EOF && c != '\n')
;
break;
}

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PostgreSQL Bugs List 2004-05-26 15:32:34 BUG #1156: Database is not initializing
Previous Message Tom Lane 2004-05-25 14:38:53 Re: Fwd: Bug#249083: postgresql: Postgres SIGSEGV if wins in nsswitch.conf