From: hickert Date: Mon, 26 Apr 2010 12:47:48 +0000 (+0000) Subject: Updated Export X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1e99420f077c6595a6098da8b0685a852668852f;p=gosa.git Updated Export git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17842 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_SnapshotHandler.inc b/gosa-core/include/class_SnapshotHandler.inc index 6327555e8..ae04963fb 100644 --- a/gosa-core/include/class_SnapshotHandler.inc +++ b/gosa-core/include/class_SnapshotHandler.inc @@ -296,7 +296,7 @@ class SnapshotHandler { $new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base; /* Create object */ - $data = $ldap->generateLdif($dn, + $data = $ldap->generateLdif(LDAP::fix($dn), "(&(!(objectClass=gosaDepartment))(!(objectClass=FAIclass)))",array(),'base'); $newName = str_replace(".", "", $sec."-".$usec); diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index 1a991f1b6..5d815810e 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -863,7 +863,8 @@ class LDAP{ $attrs = (count($attributes))?implode($attributes,' '):''; $scope = (!empty($scope))?' -s '.$scope: ''; $limit = (!$limit)?'':' -z '.$limit; - $cmd = "ldapsearch -x -LLLL '{$filter}' {$limit} {$scope} -H '{$host}' -b '{$dn}' $attrs"; + $dn = escapeshellarg($dn); + $cmd = "ldapsearch -x -LLLL '{$filter}' {$limit} {$scope} -H '{$host}' -b {$dn} $attrs"; exec($cmd, $ret,$code); $res = implode($ret,"\n"); return($res);