From ae4e38bcb3ec4c08065d5c1692590fed39e91c31 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 29 Nov 2016 18:36:09 +0100 Subject: [PATCH] ldap: auth containers are not appended to base dn Still need to fix the help text in the server settings. --- .../mvc/app/library/OPNsense/Auth/LDAP.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php index d805eb090..d39a5a118 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php +++ b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php @@ -126,22 +126,9 @@ class LDAP implements IAuthConnector { $result = false; if ($this->ldapHandle != null) { - $searchpaths = array(); + $searchpaths = array($this->baseSearchDN); if (!empty($this->ldapAuthcontainers)) { - /* prepend each authentication container */ - foreach (explode(';', $this->ldapAuthcontainers) as $container) { - $searchpath = array(); - if (!empty($container)) { - $searchpath[] = $container; - } - if (!empty($this->baseSearchDN)) { - $searchpath[] = $this->baseSearchDN; - } - $searchpaths[] = implode(',', $searchpath); - } - } else { - /* use a single base DN */ - $searchpaths[] = $this->baseSearchDN; + $searchpaths = explode(';', $this->ldapAuthcontainers); } foreach ($searchpaths as $baseDN) { if ($this->ldapScope == 'one') {