getpeereid() for local ident

From: Alex Cichowski <e12(at)tfz(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Subject: getpeereid() for local ident
Date: 2003-01-28 07:37:04
Message-ID: Pine.LNX.4.44.0301281755220.3431-200000@lucent.epathology.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Regarding the following "openbsd getpeereid(), local ident:" thread on the
pgsql-patches list, Nov 2002:

Bruce Momjian wrote:
> Please send over the patch and I will see if I can get it in. I had
> meant to add getpeereid() for OpenBSD myself but never go the time.
> ...
> William Ahern wrote:
> > there's a patch for getpeereid() dated Dec 3, 2001. a follow-up post
> > said that something like it was already in, but "not using
> > getpeereid". however, openbsd only supports getpeereid(). will this
> > patch be implemented?

I needed the local ident authentication feature on OpenBSD and it seemed
simple enough, so I implemented it myself. I have attached my patch, which
was made for the 7.3.1 source tree. (The patch referenced above seems to
add a new authentication method rather than extending the current local
ident support.)

From the Dec 2001 pgsql-patches thread "Add another AUTHTYPE for
UNIX-domain connections":

Bruce Momjian wrote:
> OpenBSD implements only getpeereid(). I have added this to the TODO
> list. We already have the other BSD's covered, and Linux. I am
> concerned about moving to getpeereid() on the other BSD's because we
> have working code already for them and I am not sure how new the OS has
> to be to have getpeereid() support, i.e. is it in FreeBSD 4.4?

I have put the getpeereid() code last in the #elif chain in this patch, so
getpeereid() will only be used if there is no other alternative.

If you wish to use this patch, please verify that I have added the
autoconf check for getpeereid() correctly, as I am not very familiar with
autoconf.

Sincerely,
Alex

Attachment Content-Type Size
getpeereid.patch text/plain 2.5 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2003-01-28 19:44:28 fix regression in .pgpass handling
Previous Message Tom Lane 2003-01-28 04:27:20 Re: 7.3.1 - python pgdb getdesc bug