Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJHLl-0002nJ-3x for pgsql-pkg-yum@arkaria.postgresql.org; Fri, 09 Jun 2017 10:41:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dJHLk-0005Zn-JZ for pgsql-pkg-yum@arkaria.postgresql.org; Fri, 09 Jun 2017 10:41:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dJHLk-0005Zd-4s for pgsql-pkg-yum@postgresql.org; Fri, 09 Jun 2017 10:41:04 +0000 Received: from ns5.gunduz.org ([107.170.136.15] helo=ns1.gunduz.org) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dJHLg-0001zl-8R for pgsql-pkg-yum@postgresql.org; Fri, 09 Jun 2017 10:41:02 +0000 Received: from asus-laptop03.gunduz.org (unknown [88.98.213.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ns1.gunduz.org (Postfix) with ESMTPSA id 1D6673FDD6; Fri, 9 Jun 2017 10:41:00 +0000 (UTC) Message-ID: <1497004856.4355.8.camel@gunduz.org> Subject: Re: Possible bug for pam auth in at least 9.6 and 10 rpms on CentOS 7 From: Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= To: Jesper St John , pgsql-pkg-yum@postgresql.org Date: Fri, 09 Jun 2017 11:40:56 +0100 In-Reply-To: <4529a5e9d4d40abd2e0df7ab49c94118@zonezero.se> References: <4529a5e9d4d40abd2e0df7ab49c94118@zonezero.se> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-meh5ugNzo8Hc+2KOzTFC" X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) Mime-Version: 1.0 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-pkg-yum Precedence: bulk Sender: pgsql-pkg-yum-owner@postgresql.org --=-meh5ugNzo8Hc+2KOzTFC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jesper, Seems reasonable. I'll apply this patch early next week. Regards, Devrim On Thu, 2017-06-08 at 14:11 +0200, Jesper St John wrote: > When installing postgresql-server package, it puts a file in /etc/pam.d/= =C2=A0 > called postgresql%{majorversion}. >=20 > Postgres source says this (src/backend/libpq/auth.c): > #define PGSQL_PAM_SERVICE "postgresql"=C2=A0=C2=A0/* Service name passed = to PAM */ >=20 > That creates the need to create a new file named /etc/pam.d/postgresql=C2= =A0 > to make pam auth work for me. >=20 > I've tested this with both 9.6 and 10 beta on CentOS 7 latest. >=20 >=20 > Best regards, > Jesper St John > admin@zonezero.se >=20 >=20 >=20 > Suggested patch below: >=20 >=20 > diff --git a/rpm/redhat/10/postgresql/master/postgresql-10.spec=C2=A0 > b/rpm/redhat/10/postgresql/master/postgresql-10.spec > index d6e53b0c..32542462 100644 > --- a/rpm/redhat/10/postgresql/master/postgresql-10.spec > +++ b/rpm/redhat/10/postgresql/master/postgresql-10.spec > @@ -781,7 +781,7 @@ install -m 755 %{sname}.init=C2=A0 > %{buildroot}%{_initrddir}/%{sname}-%{pgmajorversion >=20 > =C2=A0 %if %pam > =C2=A0 install -d %{buildroot}/etc/pam.d > -install -m 644 %{SOURCE14}=C2=A0 > %{buildroot}/etc/pam.d/%{sname}%{pgmajorversion} > +install -m 644 %{SOURCE14} %{buildroot}/etc/pam.d/%{sname} > =C2=A0 %endif >=20 > =C2=A0 # Create the directory for sockets. > @@ -1231,7 +1231,7 @@ fi > =C2=A0 %config(noreplace) %{_initrddir}/%{sname}-%{pgmajorversion} > =C2=A0 %endif > =C2=A0 %if %pam > -%config(noreplace) /etc/pam.d/%{sname}%{pgmajorversion} > +%config(noreplace) /etc/pam.d/%{sname} > =C2=A0 %endif > =C2=A0 %attr (755,root,root) %dir /etc/sysconfig/pgsql > =C2=A0 %{pgbaseinstdir}/bin/initdb >=20 >=20 --=20 Devrim G=C3=BCnd=C3=BCz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Dan=C4=B1=C5=9Fman=C4=B1/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR --=-meh5ugNzo8Hc+2KOzTFC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZOns4AAoJENjDPf6Sz261j0QP/37MbgcDfdwcKumeQ2cVLFIi tqNpp38nKdy6moA6655NYmtF1+BS6qBuU3KoJYNNWmZi/OqZ53X520rGC45hXOm3 I5U3ca9LeiwcL25SpUsWCSa1EXE8vecs4BV+TqJe6htbPhoQ7UEYh2q4ng2cPmYs +yNiVCkeN83fKCSah5GLzJcgDvgrehiSqhfOx9EtbJSzt/5I1nTVDwMeDHXaKTNP Gsp6+e/7C122H0HTGSH16QPIKZ3upSFVf9551h22TTjiUWjByRQ6YDtEmADym357 N2AYKogXDs3wIrnP/YOcIS6lg/h3/OsAdU/6oScKZS5y0BR1hqZ3HI8Zj3HB1bJc bNwNeadG6pqkKTUgkHMFqMgS5T2l52f4lH1IhUDVkSccXTx9KRjjA4m4n5O152yw LrqDI+346TkG2RVksJb+aU3G4pNag8uvogMNTQFxVi9Ui8gj1fhw2m0T3DkmZTsa ZSPZtGmp9pjoLThpSLWy/KwKOv2AB2sulTuXVIY3l0A6g4ev+HHY1rJJauFGi/Uz DLgWkPlZvjKNUAVJTf81fAic2DzFGVtjfk6a4AhgoXM9bXwSiwl9CSZQGblJwR6G WVcml6LaEhwBlsUg61darayqjtHBKWOpB+PHKaodGqyIW+d+C80Fg0CpxCYIusnX UYSLQzyUOBOdkozNvZzh =0r4s -----END PGP SIGNATURE----- --=-meh5ugNzo8Hc+2KOzTFC--