Loading...
 
Skip to main content

PAM authentication broken

Status
Closed
Subject
PAM authentication broken
Version
1.9.x
Category
  • Error
  • Patch
Feature
User Administration (Registration, Login & Banning)
External Authentication (LDAP, AD, PAM, CAS, etc)
Resolution status
Fix on the Way
Submitted by
johan_mx
Volunteered to solve
johan_mx
Lastmod by
mstef
Rating
(0)
Description

An attempt to log in using PAM (php-auth-pam) gives the following error message:

Notice: Undefined variable: error in /var/www/tikiwiki/tikiwiki-1.9.7/lib/userslib.php on line 554

Warning: Error variable must be passed by reference in /var/www/tikiwiki/tikiwiki-1.9.7/lib/userslib.php on line 554

Warning: Cannot modify header information - headers already sent by (output started at /var/www/tikiwiki/tikiwiki-1.9.7/lib/userslib.php:554) in /var/www/tikiwiki/tikiwiki-1.9.7/tiki-login.php on line 292


I'm using:
- php5-auth-pam-0.4-9.2 (Debian package)
- tikiwiki-1.9.7 (source)

Files
  1. Userlib.php Pam
Solution

Pass the error variable by reference:


tikiwiki-1.9.7.orig/lib/userslib.php 2007-03-26 18:48:10.000000000 +0200 +++ tikiwiki-1.9.7/lib/userslib.php 2007-03-26 19:13:01.000000000 +0200

@@ -551,7 +551,7 @@ class UsersLib extends TikiLib {
// Read page AuthPAM at tw.o, it says about a php module required.
// maybe and if extension line could be added here... module requires $error
// as reference.
- if (pam_auth($user, $pass, $error)) {

+ if (pam_auth($user, $pass, &$error)) {


return USER_VALID;
} else {
// Uncomment the following to see errors on that




fixed for 1.9.8
http://tikiwiki.cvs.sourceforge.net/tikiwiki/tiki/lib/userslib.php?r1=1.133.2.69&r2=1.133.2.70

Importance
9 high
Priority
45
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
1037
Created
Tuesday 27 March, 2007 11:21:32 UTC
by Unknown
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Show PHP error messages