Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C7077650E8F; Thu, 3 Jul 2008 15:55:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98838-04; Thu, 3 Jul 2008 15:55:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.exchange.upenn.edu (sesat.exchange.upenn.edu [128.91.3.3]) by postgresql.org (Postfix) with ESMTP id 99E74650E82; Thu, 3 Jul 2008 15:55:36 -0300 (ADT) Received: from isc.upenn.edu (128.91.197.64) by smtp2.exchange.upenn.edu (128.91.2.25) with Microsoft SMTP Server (TLS) id 8.1.278.0; Thu, 3 Jul 2008 14:55:34 -0400 Date: Thu, 3 Jul 2008 14:55:33 -0400 From: Garick Hamlin To: Tom Lane CC: "pgsql-hackers@postgresql.org" , "pgsql-patches@postgresql.org" Subject: Re: Solaris ident authentication using unix domain sockets Message-ID: <20080703185533.GA1927@isc.upenn.edu> References: <20080703165936.E80B312A5FFF@mx2.hub.org> <20080703173628.GA1697@isc.upenn.edu> <5091.1215108082@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <5091.1215108082@sss.pgh.pa.us> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.017 tagged_above=0 required=5 tests=AWL=0.017 X-Spam-Level: X-Archive-Number: 200807/177 X-Sequence-Number: 120437 On Thu, Jul 03, 2008 at 02:01:22PM -0400, Tom Lane wrote: > Garick Hamlin 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. > > Cool. > > > + #if defined(HAVE_GETPEERUCRED) > > + #include > > + #endif > > But this is not cool. There might be systems out there that have > getpeerucred() but not , 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. Ok, I can fix that. > > 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). Good Point, It should be the other way. > > regards, tom lane Thanks, Garick