Re: Parsing of pg_hba.conf and authentication inconsistencies - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Parsing of pg_hba.conf and authentication inconsistencies
Date
Msg-id 87iqujh7wr.fsf@oxford.xeocode.com
Whole thread Raw
In response to Parsing of pg_hba.conf and authentication inconsistencies  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Parsing of pg_hba.conf and authentication inconsistencies  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
"Magnus Hagander" <magnus@hagander.net> writes:

> I've also noticed that authentication methods error out in different
> ways when they are not supported. For example, if I try to use Kerberos
> without having it compiled in, I get an error when a client tries to
> connect (because we compile in stub functions for the authentication
> that just throw an error). But if I use pam, I get an "missing or
> erroneous pg_hba.conf file" error (because we #ifdef out the entire
> option all over the place). I'd like to make these consistent -  but
> which one of them do people prefer?

Generally I prefer having stub functions which error out because it means
other code doesn't need lots of ifdef's around the call sites. 

However it would be nice to throw an error or at least a warning when parsing
the file instead of pretending everything's ok. Perhaps authentication methods
should have a function to check whether the method is supported which is
called when the file is parsed.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support!


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Parsing of pg_hba.conf and authentication inconsistencies
Next
From: "Radek Strnad"
Date:
Subject: Re: [WIP] patch - Collation at database level