Skip site navigation (1) Skip section navigation (2)

Re: pg_hba.conf: samehost and samenet [REVIEW]

From: Abhijit Menon-Sen <ams(at)toroid(dot)org>
To: stef(at)memberwebs(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_hba.conf: samehost and samenet [REVIEW]
Date: 2009-09-30 17:56:33
Message-ID: 20090930175633.GA7979@toroid.org (view raw or flat)
Thread:
Lists: pgsql-hackers
At 2009-09-30 11:16:57 -0500, stef-list(at)memberwebs(dot)com wrote:
>
> I've now added tests for sys/ioctl.h and net/if.h even though these
> headers seemed to be common to all the unixes investigated.

Thanks. I've marked this ready for committer now.

> FWIW, there are checks for various bad netmasks. I incorporated these
> techniques after seeing them in the corresponding postfix code. [...]
>
> BTW, there's also fallback code. If none of the methods work on a
> given OS, then the ifaddrs code just lists 127.0.0.1/8 and ::1/128.

Both of these look good.

> + 		/*
> + 		 * Wrong address family.  We allow only one case: if the file
> + 		 * has IPv4 and the port is IPv6, promote the file address to
> + 		 * IPv6 and try to match that way.
> + 		 */

I still think this comment should be fixed in _both_ places it now
occurs, but oh well.

(Note: I have not tested under Windows, and I've not tested
test_ifaddrs.c. Also, there are a few lines which introduce
trailing whitespace.)

-- ams

In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2009-09-30 18:02:43
Subject: Re: Unicode UTF-8 table formatting for psql text output
Previous:From: Joe ConwayDate: 2009-09-30 17:33:05
Subject: Re: CommitFest 2009-09, two weeks on

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group