Re: Fwd: Keywords in pg_hba.conf should be field-specific

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: Keywords in pg_hba.conf should be field-specific
Date: 2011-06-21 13:58:23
Message-ID: 1308664578-sup-6011@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Pavel Stehule's message of mar jun 21 00:59:44 -0400 2011:

> yes - it has a sense. Quoting changes sense from keyword to literal.
> But then I see a significant inconsistency - every know keywords
> should be only tokens.
>
> else if (strcmp(token, "pamservice") == 0)
> - {
> - REQUIRE_AUTH_OPTION(uaPAM, "pamservice", "pam");
> - parsedline->pamservice = pstrdup(c);
> - }
>
> because >>pamservice<< - is known keyword, but 'pamservice' is some
> literal without any mean. You should to use a makro token_is_keyword
> more often.

Yeah, I wondered about this too (same with auth types, i.e. do we accept
quoted "hostssl" and so on or should that by rejected?). I opted for
leaving it alone, but maybe this needs to be fixed. (Now that I think
about it, what we should do first is verify whether it works with quotes
in the unpatched code).

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2011-06-21 14:04:26 Re: Fwd: Keywords in pg_hba.conf should be field-specific
Previous Message Robert Haas 2011-06-21 13:40:16 Re: ALTER TABLE lock strength reduction patch is unsafe