summaryrefslogtreecommitdiffstats
path: root/modules-available/sysconfig/inc
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-21 15:09:12 +0100
committerSimon Rettberg2017-12-21 15:09:12 +0100
commitd36088e73f67028818c4836496faf726fe256b9b (patch)
tree56b0d8339b010fa06926739b93f7e82e5f9ed749 /modules-available/sysconfig/inc
parent[statistics] Cleaner version for screen connection state handling by using ne... (diff)
downloadslx-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/inc')
-rw-r--r--modules-available/sysconfig/inc/ldap.inc.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules-available/sysconfig/inc/ldap.inc.php b/modules-available/sysconfig/inc/ldap.inc.php
index 23b24885..349a662e 100644
--- a/modules-available/sysconfig/inc/ldap.inc.php
+++ b/modules-available/sysconfig/inc/ldap.inc.php
@@ -12,11 +12,7 @@ class Ldap
{
// To find ourselves we try to figure out the proper search base, since the given one
// might be just for users, not for functional or utility accounts
- if (preg_match('/,(OU=.*DC=.*)$/i', Ldap::normalizeDn($binddn), $out)) {
- // Get OU from binddn; works if not given short form of DOMAIN\user or user@domain.fqdn.com
- $searchbase = $out[1];
- } elseif (preg_match('/,(DC=.*)$/i', Ldap::normalizeDn($searchbase), $out)) {
- // Otherwise, shorten search base enough to only consider the DC=..,DC=.. part at the end
+ if (preg_match('/^\w+=[^=]+,(.*)$/i', Ldap::normalizeDn($binddn), $out)) {
$searchbase = $out[1];
}
return $searchbase;