Re: usermap regexp support

From: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: usermap regexp support
Date: 2008-11-05 13:10:58
Message-ID: 20081105131058.GD10228@fune
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 28, 2008 at 08:59:53PM +0100, Magnus Hagander wrote:
> The attached patch tries to implement regexp support in the usermaps
> (pg_ident.conf).

Hi Magnus,

I am currently reviewing your patch.

I found out that the execution of

pfree(regexp_pgrole);

(there's only one such line in your patch) might raise on the current
HEAD the following message

WARNING: detected write past chunk end in Postmaster 0x9b13650

in the case of a regexp expansion.

Let me describe the conditions under which I obtain that warning.

To test it without having to create a new user I used the "identical"
substitution

review /(.*)nni \1nni

in my pg_ident.conf so that I can trigger regexps while connecting as
"gianni".

To avoid removing all the "standard" lines from pg_hba.conf, I edited
postgresql.conf in order to make it listen from a different IP address
(actually the other IP address of my machine 192.168...). Then I added
to pg_hba.conf one line enabling ident connections with map=review
from that IP address.

Finally I started the server, and as I connected with psql -h
192.168... the above warning showed.

Best regards,
Dr. Gianni Ciolli - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gianni(dot)ciolli(at)2ndquadrant(dot)it | www.2ndquadrant.it

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2008-11-05 13:14:28 Re: array_length()
Previous Message Peter Eisentraut 2008-11-05 13:00:43 Re: array_length()