Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTXr3-0003Md-19 for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Mar 2014 14:33:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WTXr2-0006NX-I1 for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Mar 2014 14:33:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTXr1-0006NR-Sk for pgsql-bugs@postgresql.org; Fri, 28 Mar 2014 14:33:55 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTXqz-0008Uj-9H for pgsql-bugs@postgresql.org; Fri, 28 Mar 2014 14:33:55 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WTXqu-0003v6-HR; Fri, 28 Mar 2014 10:33:48 -0400 Date: Fri, 28 Mar 2014 10:33:48 -0400 From: Bruce Momjian To: Tom Lane Cc: Christoph Berg , Alvaro Herrera , nicolas@marchildon.net, Bugs for PostgreSQL , David Fetter Subject: Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd Message-ID: <20140328143348.GB18523@momjian.us> References: <296.1367950228@sss.pgh.pa.us> <20130507181904.GA26800@eldon.alvh.no-ip.org> <20131204155257.GD17114@momjian.us> <20131204190338.GP5158@eldon.alvh.no-ip.org> <20131209210532.GA2119@momjian.us> <20131209214539.GL6777@eldon.alvh.no-ip.org> <20131210004734.GE2119@momjian.us> <20131218171628.GA1690@momjian.us> <20140328104153.GB15310@msgid.df7cb.de> <17137.1396017066@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17137.1396017066@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Fri, Mar 28, 2014 at 10:31:06AM -0400, Tom Lane wrote: > Christoph Berg writes: > > the quoted code bit above in src/backend/libpq/auth.c is utterly > > broken: for peer authentication, it uses get_user_name(), which yields > > the *server* user name, not the client's. For that reason, peer > > authentication in 9.4devel is broken - you can't log in with your user > > name, but you can just say -U postgres (or what the initdb user was), > > and it will let you in. > > > The attached patch reverts the src/backend/libpq/auth.c portion of > > 613c6d26bd42dd8c2dd0664315be9551475b8864 and fixes peer auth. > > Applied, thanks! I guess I should have said I was working on an updated patch. I will merge my changes in. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs