Re: pg_hba.conf: samehost and samenet - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_hba.conf: samehost and samenet
Date
Msg-id 8606.1250260167@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_hba.conf: samehost and samenet  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Fri, Aug 14, 2009 at 00:50, Stef Walter<stef-list@memberwebs.com> wrote:
>> It would be great if, in the cidr-address field of pg_hba.conf, we could
>> specify "samehost" and "samenet".

> Seems like a reasonable feature - especially the samehost part.

ISTM people have traditionally used 127.0.0.1 and ::1 for "samehost"
behavior.  What's being suggested here is a tad more flexible but
hardly a huge advance.  As for "samenet", personally I'd be scared to
death of something like that --- who knows how wide the OS will
think your "net" is?  (Think cable modem users on 10.x.x.x ...)
Using samenet in a conf file that's being handed out to random users
seems impossibly dangerous.

However, I wouldn't object too much if it weren't for this:

> * How portable is this? For starters is clearly doesn't do Windows,
> which would need to be investigated for similar functionality, but how
> many others support getifaddr()? From what I can tell it's not in
> POSIX, at least.

I don't see it on HPUX, for one.  Unless a portable solution can be
found I don't think we can consider this.  We're not in the habit
of exposing significant functionality that's only available on some
platforms.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: CommitFest 2009-07: Remaining Patches
Next
From: pascal Van Puymbroeck
Date:
Subject: psql password passing problem