From: Michael Rubinsky Date: Thu, 19 Nov 2009 17:14:54 +0000 (+0000) Subject: Changes to work with debian/ubuntu based php-pam auth libraries X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=58d5bf8d27d33133948ae2533393e7c689b74a98;p=horde.git Changes to work with debian/ubuntu based php-pam auth libraries --- diff --git a/framework/Auth/lib/Horde/Auth/Pam.php b/framework/Auth/lib/Horde/Auth/Pam.php index f1d7ae92a..0d16aaf3a 100644 --- a/framework/Auth/lib/Horde/Auth/Pam.php +++ b/framework/Auth/lib/Horde/Auth/Pam.php @@ -37,12 +37,13 @@ class Horde_Auth_Pam extends Horde_Auth_Base */ public function __construct($params = array()) { - if (!Horde_Util::extensionExists('pam')) { + if (!Horde_Util::extensionExists('pam_auth') && !Horde_Util::extensionExists('pam')) { throw new Horde_Auth_Exception(_("PAM authentication is not available.")); } if (!empty($params['service'])) { ini_set('pam.servicename', $params['service']); + ini_set('pam_auth.servicename', $params['service']); } parent::__construct($params); @@ -63,7 +64,7 @@ class Horde_Auth_Pam extends Horde_Auth_Base } $error = null; - if (!pam_auth($userId, $credentials['password'], $error)) { + if (!pam_auth($userId, $credentials['password'], &$error)) { throw new Horde_Auth_Exception($error); } }