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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(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-20 15:34:25
Message-ID: BANLkTin9NEkfLBNm=AbSyw2F64=1CFZDCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Brendan,

I checked your patch, it is applied cleanly and I don't see any mayor
problem. This patch does all what is expected.

I have two minor comments

a) you don't use macro "token_matches" consistently

func: parse_hba_line

<------>if (strcmp(token->string, "local") == 0)

should be
if (token_is_keyword(token, "local"))
...

I don't see any sense when somebody use a quotes there.

b) probably you can simplify a memory management using own two
persistent memory context - and you can swap it. Then functions like
free_hba_record, clean_hba_list, free_lines should be removed.

Regards

Pavel Stehule

2011/6/18 Brendan Jurd <direvus(at)gmail(dot)com>:
> On 18 June 2011 13:43, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
>> Is this really a WIP patch?  I'm playing a bit with it currently, seems
>> fairly sane.
>>
>
> In this case, the WIP designation is meant to convey "warning: only
> casual testing has beeen done".  I tried it out with various
> permutations of pg_hba.conf, and it worked as advertised in those
> tests, but I have not made any attempt to formulate a more rigorous
> testing regimen.
>
> In particular I haven't tested that the more exotic authentication
> methods still work properly, and I can't recall whether I tested
> recursive file inclusion and group membership.
>
> Is that a wrongful use of the WIP designation?
>
> Cheers,
> BJ
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2011-06-20 15:35:55 Re: Fwd: Keywords in pg_hba.conf should be field-specific
Previous Message Tom Lane 2011-06-20 15:33:06 Re: Range Types and extensions