Your message dated Thu, 03 Mar 2005 01:31:42 +0100 with message-id <[EMAIL PROTECTED]> has caused the Debian Bug report #295264, regarding php4-auth-pam: completely broken, crashes apache on start to be marked as having been forwarded to the upstream software author(s) [EMAIL PROTECTED]
(NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) --------------------------------------- Received: (at 295264-forwarded) by bugs.debian.org; 3 Mar 2005 00:31:48 +0000 >From [EMAIL PROTECTED] Wed Mar 02 16:31:47 2005 Return-path: <[EMAIL PROTECTED]> Received: from lemuria.unit.liu.se [130.236.230.146] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1D6eFn-0002yo-00; Wed, 02 Mar 2005 16:31:47 -0800 Received: by lemuria.unit.liu.se (Postfix, from userid 104) id 45035F436; Thu, 3 Mar 2005 01:31:46 +0100 (MET) Received: from [130.236.234.95] (c95.ryd.student.liu.se [130.236.234.95]) by lemuria.unit.liu.se (Postfix) with ESMTP id 96CAFF424; Thu, 3 Mar 2005 01:31:43 +0100 (MET) Message-ID: <[EMAIL PROTECTED]> Date: Thu, 03 Mar 2005 01:31:42 +0100 From: Magnus Holmgren <[EMAIL PROTECTED]> Organization: Lysator ACS User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], Andrew Suffield <[EMAIL PROTECTED]> Subject: pam_auth for PHP4 broken when compiled with ZTS X-Enigmail-Version: 0.90.1.1 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: Hello! A bug has been located in your pam_auth code, which is distributed with Debian GNU/Linux. After comparing it to other PHP modules (see for example ext/iconv/iconv.c in the PHP source), I've found out that the problem is that the module initialization function lacks a call to ZEND_INIT_MODULE_GLOBALS. That doesn't matter when compiling without thread security, but is crucial when compiling with it. :-) I added ZEND_INIT_MODULE_GLOBALS(pam_auth, NULL, NULL); before REGISTER_INI_ENTRIES(); tested it, and it works allright, so that seems to be the only thing missing. However, since the definition of ZEND_INIT_MODULE_GLOBALS, when ZTS is not defined, is #define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \ globals_ctor(&module_name##_globals); you need a dummy constructor function, or make the line conditional, like so: diff -urNad php4-auth-pam-0.4/pam_auth.c /tmp/dpep.K1hAXd/php4-auth-pam-0.4/pam_auth.c --- php4-auth-pam-0.4/pam_auth.c 2005-03-03 01:24:24.000000000 +0100 +++ /tmp/dpep.K1hAXd/php4-auth-pam-0.4/pam_auth.c 2005-03-03 01:28:40.000000000 +0100 @@ -78,6 +78,9 @@ PHP_INI_END() PHP_MINIT_FUNCTION(pam_auth) { +#ifdef ZTS + ZEND_INIT_MODULE_GLOBALS(pam_auth, NULL, NULL); +#endif REGISTER_INI_ENTRIES(); return SUCCESS; } Regards, Magnus Holmgren [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]