Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTXon-0003J0-E5 for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Mar 2014 14:31:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WTXom-0005Xc-Uw for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Mar 2014 14:31:36 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTXom-0005XW-6b for pgsql-bugs@postgresql.org; Fri, 28 Mar 2014 14:31:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTXoh-0000pl-Ax for pgsql-bugs@postgresql.org; Fri, 28 Mar 2014 14:31:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s2SEV6Op017138; Fri, 28 Mar 2014 10:31:06 -0400 From: Tom Lane To: Christoph Berg cc: Bruce Momjian , 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 In-reply-to: <20140328104153.GB15310@msgid.df7cb.de> 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> Comments: In-reply-to Christoph Berg message dated "Fri, 28 Mar 2014 11:41:54 +0100" Date: Fri, 28 Mar 2014 10:31:06 -0400 Message-ID: <17137.1396017066@sss.pgh.pa.us> 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 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! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs