aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/pam.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/engine/lib/pam.php b/engine/lib/pam.php
index 4bc9b1cc2..35812f7d8 100644
--- a/engine/lib/pam.php
+++ b/engine/lib/pam.php
@@ -60,7 +60,7 @@
{
$handler = $v->handler;
$importance = $v->importance;
-
+
try {
// Execute the handler
if ($handler($credentials))
@@ -73,18 +73,22 @@
else
{
$_PAM_HANDLERS_MSG[$k] = "Not Authenticated.";
-
+
// If this is required then abort.
if ($importance == 'required')
return false;
}
}
catch (Exception $e)
- {
+ {
$_PAM_HANDLERS_MSG[$k] = "$e";
+
+ // If this is required then abort.
+ if ($importance == 'required')
+ return false;
}
}
-
+
return $authenticated;
}