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

Re: Solaris ident authentication using unix domain sockets

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Garick Hamlin <ghamlin(at)isc(dot)upenn(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: Solaris ident authentication using unix domain sockets
Date: 2008-07-03 18:01:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Garick Hamlin <ghamlin(at)isc(dot)upenn(dot)edu> writes:
> 	I have a patch that I have been using to support postgresql's
> notion of ident authentication when using unix domain sockets on
> Solaris.  This patch basically just adds support for using 
> getupeercred() on Solaris so unix sockets and ident auth works just
> like it does on Linux and elsewhere.


> + #if defined(HAVE_GETPEERUCRED) 
> + #include <ucred.h>
> + #endif

But this is not cool.  There might be systems out there that have
getpeerucred() but not <ucred.h>, and this coding would cause a compile
failure (even if they actually wouldn't be trying to use getpeerucred()
because they have some other way to do it).  You need an explicit
configure probe for the header file too, I think.

Also, what is the rationale for putting this before the
HAVE_STRUCT_CMSGCRED case instead of after?  Again, that seems like it
could cause unexpected behavioral changes on platforms that work fine
now (consider possibility that getpeerucred is there but broken).

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Dave PageDate: 2008-07-03 18:44:49
Subject: CommitFest rules
Previous:From: Alex HunsakerDate: 2008-07-03 17:53:59
Subject: Re: Auto-explain patch

pgsql-patches by date

Next:From: Garick HamlinDate: 2008-07-03 18:55:33
Subject: Re: Solaris ident authentication using unix domainsockets
Previous:From: Garick HamlinDate: 2008-07-03 17:36:28
Subject: Solaris ident authentication using unix domain sockets

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