From 58d5bf8d27d33133948ae2533393e7c689b74a98 Mon Sep 17 00:00:00 2001 From: Michael Rubinsky Date: Thu, 19 Nov 2009 17:14:54 +0000 Subject: [PATCH] Changes to work with debian/ubuntu based php-pam auth libraries --- framework/Auth/lib/Horde/Auth/Pam.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } } -- 2.11.0