Re: Ticket 298: bug on pg_hba.conf editor

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Ticket 298: bug on pg_hba.conf editor
Date: 2011-07-16 20:11:15
Message-ID: CA+OCxozcvSnv+tM=-aE9ceOf76k=XKLE-yuqFurJ91rj8Ngh_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Sat, Jul 16, 2011 at 1:12 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
> Hi,
>
> I worked a bit this morning on this bug. The editor was made in a way
> that invalid configuration lines are not displayed which is wrong
> because you can't fix a line if you stored it wrong once.
>
> So I did the change to allow the change of an invalid configuration
> line, and that works well.
>
> But I now have many other lines that aren't supposed to appear:
>
> # local      DATABASE  USER  METHOD  [OPTIONS]
> # host       DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
> # hostssl    DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
> # hostnossl  DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
> # host name, or it is
>
> All are considered comments, and all have a valid first column, so all
> are displayed. Which is a bit disturbing because they are part of the
> comments in pg_hba.conf, they are not supposed to be "actual" lines.
>
> So, they match our process of identifiying lines, and so they are
> displayed. Do you have any idea how we could not display these? I mean,
> I can simply add a check on the line string to see if they are equal to
> the one of the five strings above, but it seems quite a ugly hack.

Why don't we just ignore anything that starts with a # ?

> Or do we simply choose to not care? we prefer to have the bugfix even if
> it means to show some not "actual" config lines?

Not those.

> Another related question: peer, radius are not available in the method.
> As we are in beta, I won't add them to 1.14 branch, will I?

I would consider their omission to be a bug.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Jasmin Dizdarevic 2011-07-16 20:53:42 Website
Previous Message pgAdmin Trac 2011-07-16 14:06:12 Re: [pgAdmin III] #279: Comments on column from multi-inheriting tables are buggy