From bc8b12964fab66e89c610dc4508a555e21408047 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 9 May 2008 08:13:42 +0000 Subject: [PATCH] Improved setup performance from 380 seconds to 6secs. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@10853 594d385d-05f5-0310-b6e9-bd551577e9d8 --- setup/class_setupStep_Migrate.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/class_setupStep_Migrate.inc b/setup/class_setupStep_Migrate.inc index 310d79100..af29328f5 100644 --- a/setup/class_setupStep_Migrate.inc +++ b/setup/class_setupStep_Migrate.inc @@ -184,7 +184,7 @@ class Step_Migrate extends setup_step $cv['tls']); $ldap->cd($cv['base']); - $res = $ldap->search("uidNumber=*",array("dn","uidNumber")); + $res = $ldap->search("(&(objectClass=posixAccount)(uidNumber=*))",array("dn","uidNumber")); if(!$res){ $this->checks['uidNumber_usage']['STATUS'] = FALSE; $this->checks['uidNumber_usage']['STATUS_MSG']= _("LDAP query failed"); @@ -1586,7 +1586,9 @@ class Step_Migrate extends setup_step /* Check if root object exists */ $ldap->cd($cv['base']); + $ldap->set_size_limit(1); $res = $ldap->search("(objectClass=*)"); + $ldap->set_size_limit(0); $err = ldap_errno($ldap->cid); if( !$res || -- 2.30.2