From 9d265058e7693c830f80be173ab09d3ee850ec00 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 28 Dec 2007 00:46:26 +0000 Subject: [PATCH] * Hide search base * Use correct variable name Work sponsored-by: Centipede Networks --- etc/inc/auth.inc | 2 +- usr/local/www/system_usermanager_settings.php | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index 9f3dcb5654..0245a1c2ab 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -587,7 +587,7 @@ function ldap_backed($username, $passwd) { return $status; } - if (!($res = @ldap_bind($ldap, $ldapsearchbase, $passwd))) { + if (!($res = @ldap_bind($ldap, $username, $passwd))) { log_error("ERROR! LDAP could not bind to {$ldapserver} - {$dn}. Defaulting to built-in htpasswd_backed()"); $status = htpasswd_backed($username, $passwd); return $status; diff --git a/usr/local/www/system_usermanager_settings.php b/usr/local/www/system_usermanager_settings.php index e5087ecfa4..76ef0d10bf 100755 --- a/usr/local/www/system_usermanager_settings.php +++ b/usr/local/www/system_usermanager_settings.php @@ -35,7 +35,7 @@ $pconfig['backend'] = &$config['system']['webgui']['backend']; $pconfig['ldapbindun'] = &$config['system']['webgui']['ldapbindun']; $pconfig['ldapbindpw'] = &$config['system']['webgui']['ldapbindpw']; -$pconfig['ldapfilter'] = &$config['system']['webgui']['ldapfilter']; +//$pconfig['ldapfilter'] = &$config['system']['webgui']['ldapfilter']; $pconfig['ldapsearchbase'] = &$config['system']['webgui']['ldapsearchbase']; // Page title for main admin @@ -94,10 +94,12 @@ if ($_POST) { else unset($pconfig['ldapbindpw']); +/* if($_POST['ldapfilter']) $pconfig['ldapfilter'] = $_POST['ldapfilter']; else unset($pconfig['ldapfilter']); +*/ if($_POST['ldapsearchbase']) $pconfig['ldapsearchbase'] = $_POST['ldapsearchbase']; @@ -150,11 +152,11 @@ if(!$pconfig['backend']) - Authentication backend + Authentication primary backend @@ -177,12 +179,16 @@ if(!$pconfig['backend']) + LDAP Filter +*/ +?> LDAP Search base