diff options
author | Simon Rettberg | 2017-12-21 15:09:12 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-12-21 15:09:12 +0100 |
commit | d36088e73f67028818c4836496faf726fe256b9b (patch) | |
tree | 56b0d8339b010fa06926739b93f7e82e5f9ed749 /modules-available/sysconfig/addmodule_adauth.inc.php | |
parent | [statistics] Cleaner version for screen connection state handling by using ne... (diff) | |
download | slx-admin-d36088e73f67028818c4836496faf726fe256b9b.tar.gz slx-admin-d36088e73f67028818c4836496faf726fe256b9b.tar.xz slx-admin-d36088e73f67028818c4836496faf726fe256b9b.zip |
[sysconfig] Fix home directory attribute detection
Diffstat (limited to 'modules-available/sysconfig/addmodule_adauth.inc.php')
-rw-r--r-- | modules-available/sysconfig/addmodule_adauth.inc.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules-available/sysconfig/addmodule_adauth.inc.php b/modules-available/sysconfig/addmodule_adauth.inc.php index 2c32e4a8..df7f385d 100644 --- a/modules-available/sysconfig/addmodule_adauth.inc.php +++ b/modules-available/sysconfig/addmodule_adauth.inc.php @@ -31,7 +31,7 @@ class AdAuth_Start extends AddModule_Base if (isset($data['server']) && preg_match('/^(.*)\:(636|3269|389|3268)$/', $data['server'], $out)) { $data['server'] = $out[1]; } - if (isset($data['homeattr']) && !isset($data['mapping']['homemount'])) { + if (isset($data['homeattr']) && !isset($data['mapping']['homemount']) && strtolower($data['homeattr']) !== 'homedirectory') { $data['mapping']['homemount'] = $data['homeattr']; } $data['step'] = 'AdAuth_CheckConnection'; @@ -96,6 +96,7 @@ class AdAuth_CheckConnection extends AddModule_Base protected function renderInternal() { + $mapping = Request::post('mapping', false, 'array'); $data = array( 'edit' => Request::post('edit'), 'title' => Request::post('title'), @@ -104,17 +105,16 @@ class AdAuth_CheckConnection extends AddModule_Base 'binddn' => $this->bindDn, 'bindpw' => Request::post('bindpw'), 'home' => Request::post('home'), - 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl'), 'fixnumeric' => Request::post('fixnumeric'), 'certificate' => Request::post('certificate', ''), 'taskid' => $this->scanTask['id'], - 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')), + 'mapping' => ConfigModuleBaseLdap::getMapping($mapping), ); $data['prev'] = 'AdAuth_Start'; if ((preg_match(AD_BOTH_REGEX, $this->bindDn) > 0) || (strlen($this->searchBase) < 2)) { $data['next'] = 'AdAuth_SelfSearch'; - } elseif (empty($data['homeattr'])) { + } elseif (empty($mapping['homemount'])) { $data['next'] = 'AdAuth_HomeAttrCheck'; } else { $data['next'] = 'AdAuth_CheckCredentials'; @@ -196,6 +196,7 @@ class AdAuth_SelfSearch extends AddModule_Base protected function renderInternal() { + $mapping = Request::post('mapping', false, 'array'); $data = array( 'edit' => Request::post('edit'), 'title' => Request::post('title'), @@ -205,16 +206,15 @@ class AdAuth_SelfSearch extends AddModule_Base 'binddn' => Request::post('binddn'), 'bindpw' => Request::post('bindpw'), 'home' => Request::post('home'), - 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl') === 'on', 'fixnumeric' => Request::post('fixnumeric'), 'fingerprint' => Request::post('fingerprint'), 'certificate' => Request::post('certificate', ''), 'originalbinddn' => $this->originalBindDn, - 'mapping' => ConfigModuleBaseLdap::getMapping(Request::post('mapping', false, 'array')), + 'mapping' => ConfigModuleBaseLdap::getMapping($mapping), 'prev' => 'AdAuth_Start' ); - if (empty($data['homeattr'])) { + if (empty($mapping['homemount'])) { $data['next'] = 'AdAuth_HomeAttrCheck'; } else { $data['next'] = 'AdAuth_CheckCredentials'; @@ -283,7 +283,6 @@ class AdAuth_HomeAttrCheck extends AddModule_Base 'binddn' => Request::post('binddn'), 'bindpw' => Request::post('bindpw'), 'home' => Request::post('home'), - 'homeattr' => Request::post('homeattr'), 'ssl' => Request::post('ssl') === 'on', 'fixnumeric' => Request::post('fixnumeric'), 'fingerprint' => Request::post('fingerprint'), |