summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-03-15 18:08:48 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-03-15 18:08:48 +0000
commit504732783bc030d1158c92415b56f1eec8fe14d9 (patch)
treed66f7a14556ba6070efbaa3de6fbee1c21bb989c /sys-auth/pam-pgsql
parentVersion bump (diff)
downloadhistorical-504732783bc030d1158c92415b56f1eec8fe14d9.tar.gz
historical-504732783bc030d1158c92415b56f1eec8fe14d9.tar.bz2
historical-504732783bc030d1158c92415b56f1eec8fe14d9.zip
Add a patch to fix bug #309311, thanks to Giampaolo Tomassoni for reporting.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-auth/pam-pgsql')
-rw-r--r--sys-auth/pam-pgsql/ChangeLog10
-rw-r--r--sys-auth/pam-pgsql/Manifest11
-rw-r--r--sys-auth/pam-pgsql/files/pam-pgsql-0.7_p20100311-bug309311.patch41
-rw-r--r--sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311-r1.ebuild (renamed from sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311.ebuild)13
4 files changed, 67 insertions, 8 deletions
diff --git a/sys-auth/pam-pgsql/ChangeLog b/sys-auth/pam-pgsql/ChangeLog
index 0c2b525829b5..b3f939109efd 100644
--- a/sys-auth/pam-pgsql/ChangeLog
+++ b/sys-auth/pam-pgsql/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-auth/pam-pgsql
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam-pgsql/ChangeLog,v 1.1 2010/03/11 13:53:10 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam-pgsql/ChangeLog,v 1.2 2010/03/15 18:08:47 flameeyes Exp $
+
+*pam-pgsql-0.7_p20100311-r1 (15 Mar 2010)
+
+ 15 Mar 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ -pam-pgsql-0.7_p20100311.ebuild, +pam-pgsql-0.7_p20100311-r1.ebuild,
+ +files/pam-pgsql-0.7_p20100311-bug309311.patch:
+ Add a patch to fix bug #309311, thanks to Giampaolo Tomassoni for
+ reporting.
*pam-pgsql-0.7_p20100311 (11 Mar 2010)
diff --git a/sys-auth/pam-pgsql/Manifest b/sys-auth/pam-pgsql/Manifest
index 340cc8dc0001..6b1c52ac8585 100644
--- a/sys-auth/pam-pgsql/Manifest
+++ b/sys-auth/pam-pgsql/Manifest
@@ -1,14 +1,15 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX pam-pgsql-0.7_p20100311-bug309311.patch 1661 RMD160 0abea63024293233f7e765c2e37228b1710c061a SHA1 c78d70ff863507f21e12de30d3de9262b1fe68e4 SHA256 25e2b42aae4ba9acb5f06f5eab7f3cb94337750a3cccc87c724f3b55b28a5fe8
DIST pam-pgsql-0.7_p20100311.tar.gz 304786 RMD160 4b3af2ffc11e9e54790aecfce0726c43b9c750a1 SHA1 6d642277ec0c512e8c1fd3f2ddbcf208816e7c37 SHA256 71594c1af07c8e37f65c15410c5ad8b97a96ae672828ef44b95c7b607401af1d
-EBUILD pam-pgsql-0.7_p20100311.ebuild 1326 RMD160 7da100bdaa82e3f79b56bcfff92110ea8f980442 SHA1 bd7e8a04b36a7367cde5e8fb656077b5ac0608ac SHA256 bff832c690dec713e3602010cca7f55882631928ac574b731931db52a6f697e1
-MISC ChangeLog 523 RMD160 9d15bf8b7314530aa62ec87f7834bc8893f29b7a SHA1 eb09bbfdcd7dcf2393f979fb7eea86c730d1a9c3 SHA256 3b05661d918efd5fdc6157f87e2fa8ac932a10c589ac870e1b956daf3b543d46
+EBUILD pam-pgsql-0.7_p20100311-r1.ebuild 1420 RMD160 3e704b4c0a48e19f42eaf0428b76d9f80d6cec01 SHA1 4e53f957ab6bb738736483f41ac80327a9d4318c SHA256 1f48eeb6bafd7fa3e242a2008238681e687258faf67893650561681af050d504
+MISC ChangeLog 825 RMD160 d76d582041233edd5339d32ab5921e180f4c6e1f SHA1 e186f84eb15b82db1e5cca7832a31be536e87810 SHA256 f7b324445892b8aa8d2e76c9d82e0b520a92b9ac3509bfbf84d4666b93a6a4ee
MISC metadata.xml 218 RMD160 1955c7446d4ceb77506ba7b58ee35913c576a72c SHA1 02dacc356a39905402083cb54ae4f6dd0ac59fad SHA256 e0bb49cab71cc84d8bdad26876197164073722b378d27a5bf55bbfd2afdbd19c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
-iEYEARECAAYFAkuY9cYACgkQAiZjviIA2XjACwCfeG0PQGuOBedhiPfLAvPEJrLr
-XlcAn3WCtgJdf4PBWzbgCe9vyTXxjSoo
-=hXmB
+iEYEARECAAYFAkued6YACgkQAiZjviIA2XiyEwCgkXrIcge3b02LJmYfcHuvG+he
+RUAAn3/TPXJZ3b99ramPKZc2UCRvEFvB
+=DkPD
-----END PGP SIGNATURE-----
diff --git a/sys-auth/pam-pgsql/files/pam-pgsql-0.7_p20100311-bug309311.patch b/sys-auth/pam-pgsql/files/pam-pgsql-0.7_p20100311-bug309311.patch
new file mode 100644
index 000000000000..07b5f5626414
--- /dev/null
+++ b/sys-auth/pam-pgsql/files/pam-pgsql-0.7_p20100311-bug309311.patch
@@ -0,0 +1,41 @@
+From 0ced2f84ec8fcf961a1d89df1194634d5f83d4fd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Mon, 15 Mar 2010 18:51:50 +0100
+Subject: [PATCH] Correct the check for expected values returned by the acct query.
+
+The current code checked for at least two rows and at most three columns,
+while the correct check was to be one row, and between two and three
+columns.
+
+This was reported by Gianpaolo Tomassoni in Gentoo bug #309311
+http://bugs.gentoo.org/show_bug.cgi?id=309311
+---
+ src/pam_pgsql.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/pam_pgsql.c b/src/pam_pgsql.c
+index 5a31ac1..8126b79 100644
+--- a/src/pam_pgsql.c
++++ b/src/pam_pgsql.c
+@@ -129,7 +129,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc,
+ DBGLOG("query: %s", options->query_acct);
+ rc = PAM_AUTH_ERR;
+ if(pg_execParam(conn, &res, options->query_acct, pam_get_service(pamh), user, NULL, rhost) == PAM_SUCCESS) {
+- if (PQntuples(res) >= 2 && PQnfields(res) <= 3) {
++ if (PQntuples(res) == 1 &&
++ PQnfields(res) >= 2 && PQnfields(res) <= 3) {
+ char *expired_db = PQgetvalue(res, 0, 0);
+ char *newtok_db = PQgetvalue(res, 0, 1);
+ rc = PAM_SUCCESS;
+@@ -143,7 +144,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc,
+ if (!strcmp(expired_db, "t"))
+ rc = PAM_ACCT_EXPIRED;
+ } else {
+- DBGLOG("query_acct should return two or three columns");
++ DBGLOG("query_acct should return one row and two or three columns");
+ rc = PAM_PERM_DENIED;
+ }
+ PQclear(res);
+--
+1.7.0.2
+
diff --git a/sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311.ebuild b/sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311-r1.ebuild
index 1143ff09ae97..c4f65e4d184b 100644
--- a/sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311.ebuild
+++ b/sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311-r1.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311.ebuild,v 1.1 2010/03/11 13:53:10 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam-pgsql/pam-pgsql-0.7_p20100311-r1.ebuild,v 1.1 2010/03/15 18:08:47 flameeyes Exp $
+
+EAPI=2
inherit eutils pam
@@ -23,11 +25,18 @@ IUSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
-src_compile() {
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-bug309311.patch
+}
+
+src_configure() {
econf \
--sysconfdir=/etc/security \
--libdir=/$(get_libdir) \
--docdir=/usr/share/doc/${PF} || die "econf failed"
+}
+
+src_compile() {
emake pammoddir="$(getpam_mod_dir)" || die "emake failed"
}