Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/pecl-pam/, dev-php/pecl-pam/files/
Date: Tue, 23 Nov 2021 16:15:43
Message-Id: 1637684135.953d60646be3ce87060e8b18e127d432876ae226.grknight@gentoo
1 commit: 953d60646be3ce87060e8b18e127d432876ae226
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 23 15:28:05 2021 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 23 16:15:35 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=953d6064
7
8 dev-php/pecl-pam: Drop old
9
10 Signed-off-by: Brian Evans <grknight <AT> gentoo.org>
11
12 dev-php/pecl-pam/Manifest | 1 -
13 dev-php/pecl-pam/files/1.0.3-php7.patch | 118 ------------------------------
14 dev-php/pecl-pam/pecl-pam-1.0.3-r3.ebuild | 41 -----------
15 3 files changed, 160 deletions(-)
16
17 diff --git a/dev-php/pecl-pam/Manifest b/dev-php/pecl-pam/Manifest
18 index 7da8caaeff39..2c4833e6bb65 100644
19 --- a/dev-php/pecl-pam/Manifest
20 +++ b/dev-php/pecl-pam/Manifest
21 @@ -1,2 +1 @@
22 -DIST pam-1.0.3.tgz 6671 BLAKE2B f416fd0e47d3fda6a1d86e44a7ca17fc9a0428f976f18e2b663a2fd1e09b790cd069ca16d930d6dca6554762ca59bda987929e52365ed813949c1a93291c1dcc SHA512 3580582f1456b31be30a713cadaaca106527f2d4f3f12032b5d3617cc361aaf49539a9db3dd27221ce40320187abaac0f6ad4e23cdfe5eaa94436e3eaef3fb9c
23 DIST pam-2.2.3.tgz 9422 BLAKE2B 4d10ad40bdfbaa54225723a46a78dbe1609d89cf75d0ca73345e3346fb437a5500e451357b3b0bbcce88c13f8a54dec5b39e9c0741a6e89c0b3936cbb05da91a SHA512 1adc72b1517e224f36f960134d3444d36e6fa5a6868ce4bc1b87edbbfb09406910774061988300094ebf637ee54c5f5a43e0c42c8e2ab78c81a0910063d48c51
24
25 diff --git a/dev-php/pecl-pam/files/1.0.3-php7.patch b/dev-php/pecl-pam/files/1.0.3-php7.patch
26 deleted file mode 100644
27 index d56fffb08d38..000000000000
28 --- a/dev-php/pecl-pam/files/1.0.3-php7.patch
29 +++ /dev/null
30 @@ -1,118 +0,0 @@
31 ---- a/pam.c 2016-12-01 14:29:27.453904230 -0500
32 -+++ b/pam.c 2016-12-01 14:27:26.496109755 -0500
33 -@@ -227,8 +227,13 @@
34 - PHP_FUNCTION(pam_auth)
35 - {
36 - char *username, *password;
37 -+#if PHP_MAJOR_VERSION >= 7
38 -+ size_t username_len, password_len;
39 -+ zval *status = NULL, *server, *remote_addr;
40 -+#else
41 - int username_len, password_len;
42 - zval *status = NULL, **server, **remote_addr;
43 -+#endif
44 - zend_bool checkacctmgmt = 1;
45 -
46 - pam_auth_t userinfo = {NULL, NULL};
47 -@@ -248,22 +253,37 @@
48 - if (status) {
49 - spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_start");
50 - zval_dtor(status);
51 -+#if PHP_MAJOR_VERSION >= 7
52 -+ ZVAL_STRING(status, error_msg);
53 -+ efree(error_msg);
54 -+#else
55 - ZVAL_STRING(status, error_msg, 0);
56 -+#endif
57 - }
58 - RETURN_FALSE;
59 - }
60 -
61 -+#if PHP_MAJOR_VERSION >= 7
62 -+ if ((remote_addr = zend_hash_str_find(Z_ARR(PG(http_globals)[TRACK_VARS_SERVER]), "REMOTE_ADDR", sizeof("REMOTE_ADDR")-1)) != NULL && Z_TYPE_P(remote_addr) == IS_STRING) {
63 -+ pam_set_item(pamh, PAM_RHOST, Z_STRVAL_P(remote_addr));
64 -+#else
65 - if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **)&server) == SUCCESS && Z_TYPE_PP(server) == IS_ARRAY) {
66 - if (zend_hash_find(Z_ARRVAL_PP(server), "REMOTE_ADDR", sizeof("REMOTE_ADDR"), (void **)&remote_addr) == SUCCESS && Z_TYPE_PP(remote_addr) == IS_STRING) {
67 - pam_set_item(pamh, PAM_RHOST, Z_STRVAL_PP(remote_addr));
68 - }
69 -+#endif
70 - }
71 -
72 - if ((result = pam_authenticate(pamh, PAM_DISALLOW_NULL_AUTHTOK)) != PAM_SUCCESS) {
73 - if (status) {
74 - spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_authenticate");
75 - zval_dtor(status);
76 -+#if PHP_MAJOR_VERSION >= 7
77 -+ ZVAL_STRING(status, error_msg);
78 -+ efree(error_msg);
79 -+#else
80 - ZVAL_STRING(status, error_msg, 0);
81 -+#endif
82 - }
83 - pam_end(pamh, PAM_SUCCESS);
84 - RETURN_FALSE;
85 -@@ -274,7 +294,12 @@
86 - if (status) {
87 - spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_acct_mgmt");
88 - zval_dtor(status);
89 -+#if PHP_MAJOR_VERSION >= 7
90 -+ ZVAL_STRING(status, error_msg);
91 -+ efree(error_msg);
92 -+#else
93 - ZVAL_STRING(status, error_msg, 0);
94 -+#endif
95 - }
96 - pam_end(pamh, PAM_SUCCESS);
97 - RETURN_FALSE;
98 -@@ -291,7 +316,11 @@
99 - PHP_FUNCTION(pam_chpass)
100 - {
101 - char *username, *oldpass, *newpass;
102 -+#if PHP_MAJOR_VERSION >= 7
103 -+ size_t username_len, oldpass_len, newpass_len;
104 -+#else
105 - int username_len, oldpass_len, newpass_len;
106 -+#endif
107 - zval *status = NULL;
108 -
109 - pam_chpass_t userinfo = {NULL, NULL, NULL, 0};
110 -@@ -312,7 +341,12 @@
111 - if (status) {
112 - spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_start");
113 - zval_dtor(status);
114 -+#if PHP_MAJOR_VERSION >= 7
115 -+ ZVAL_STRING(status, error_msg);
116 -+ efree(error_msg);
117 -+#else
118 - ZVAL_STRING(status, error_msg, 0);
119 -+#endif
120 - }
121 - RETURN_FALSE;
122 - }
123 -@@ -321,7 +355,12 @@
124 - if (status) {
125 - spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_authenticate");
126 - zval_dtor(status);
127 -+#if PHP_MAJOR_VERSION >= 7
128 -+ ZVAL_STRING(status, error_msg);
129 -+ efree(error_msg);
130 -+#else
131 - ZVAL_STRING(status, error_msg, 0);
132 -+#endif
133 - }
134 - pam_end(pamh, PAM_SUCCESS);
135 - RETURN_FALSE;
136 -@@ -331,7 +370,12 @@
137 - if (status) {
138 - spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_chauthtok");
139 - zval_dtor(status);
140 -+#if PHP_MAJOR_VERSION >= 7
141 -+ ZVAL_STRING(status, error_msg);
142 -+ efree(error_msg);
143 -+#else
144 - ZVAL_STRING(status, error_msg, 0);
145 -+#endif
146 - }
147 - pam_end(pamh, PAM_SUCCESS);
148 - RETURN_FALSE;
149
150 diff --git a/dev-php/pecl-pam/pecl-pam-1.0.3-r3.ebuild b/dev-php/pecl-pam/pecl-pam-1.0.3-r3.ebuild
151 deleted file mode 100644
152 index 5827d6ef1d27..000000000000
153 --- a/dev-php/pecl-pam/pecl-pam-1.0.3-r3.ebuild
154 +++ /dev/null
155 @@ -1,41 +0,0 @@
156 -# Copyright 1999-2021 Gentoo Authors
157 -# Distributed under the terms of the GNU General Public License v2
158 -
159 -EAPI="7"
160 -
161 -PHP_EXT_NAME="pam"
162 -PHP_EXT_INI="yes"
163 -PHP_EXT_ZENDEXT="no"
164 -DOCS=( README )
165 -
166 -USE_PHP="php7-2 php7-3 php7-4"
167 -
168 -inherit php-ext-pecl-r3 pam
169 -
170 -KEYWORDS="~amd64 ~x86"
171 -
172 -DESCRIPTION="This extension provides PAM (Pluggable Authentication Modules) integration"
173 -LICENSE="PHP-2.02"
174 -SLOT="0"
175 -IUSE="debug"
176 -
177 -DEPEND="sys-libs/pam"
178 -RDEPEND="${DEPEND}"
179 -
180 -PATCHES=( "${FILESDIR}/${PV}-php7.patch" )
181 -
182 -src_prepare() {
183 - #Fix DOS line endings
184 - sed -i 's/\r$//' -- pam.c || die
185 - php-ext-source-r3_src_prepare
186 -}
187 -
188 -src_configure() {
189 - local PHP_EXT_ECONF_ARGS=( --with-pam=/usr $(use_enable debug) )
190 - php-ext-source-r3_src_configure
191 -}
192 -
193 -src_install() {
194 - pamd_mimic_system php auth account password
195 - php-ext-pecl-r3_src_install
196 -}