summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a4176a)
raw | patch | inline | side by side (parent: 9a4176a)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Jan 2008 13:19:26 +0000 (13:19 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Jan 2008 13:19:26 +0000 (13:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8354 594d385d-05f5-0310-b6e9-bd551577e9d8
24 files changed:
index 625d052cd48603c2b7c9dd737ebe3cd268818a5b..489f3954e1adbd2ebe3c9d45f75087d2c53905ad 100644 (file)
}
+ /* Function to fix problematic characters in DN's that are used for search
+ requests. I.e. member=.... */
+ static function prepare4filter($dn)
+ {
+ return normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($dn)));
+ }
+
+
function connect()
{
$this->hascon=false;
index a0ba97bbed9b76ab0b58ae04c9b45a2a4c8f717c..ec6e578432d193c8e33814cd2ce8a0466be21367 100644 (file)
"divListUsers" => "plugins/admin/users/class_divListUsers.inc",
"userManagement" => "plugins/admin/users/class_userManagement.inc",
"usertabs" => "plugins/admin/users/tabs_user.inc",
+ "fai_func" => "plugins/admin/fai/functions_FAI.inc",
"faiTemplateEntry" => "plugins/admin/fai/class_faiTemplateEntry.inc",
- "fai_func" => "plugins/admin/fai/functions_FAI.inc",
"faiTemplate" => "plugins/admin/fai/class_faiTemplate.inc",
"tabsTemplate" => "plugins/admin/fai/tabsTemplate.inc",
"faiProfileEntry" => "plugins/admin/fai/class_faiProfileEntry.inc",
"setup" => "setup/class_setup.inc",
"Step_Migrate" => "setup/class_setupStep_Migrate.inc",
);
-?>
+?>
\ No newline at end of file
index 9e5d706d37f14aa2622d94672bf50fc09d62adf6..29e8840407e5939715e251d16936ae9336ba17c0 100644 (file)
{
/* Rename dn in possible object groups */
$ldap= $this->config->get_ldap_link();
- $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::fix($src_dn).'))',
+ $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::preapre4filter($src_dn).'))',
array('cn'));
while ($attrs= $ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc
index 9c72d0ab5269af16f55e89ebf34349dabed69eed..01581ab9bb67b4ed5619f3c9b15bcd99ed31b9f6 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/applications/class_applicationGeneric.inc b/gosa-core/plugins/admin/applications/class_applicationGeneric.inc
index daa97d63720ecbe65d002c0ea504e4778265e169..247acf97278aac3f39452d5eadd6ca5fef353b35 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index c8577edb2b2d6a6e52a4dbf9028fb9c109e7e50b..adb1bed530fb846dea6441e253cf96e7c5eab90f 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc
index 2de3144046e58de37e3e1374624300987e83fdba..24c16c7bcf35bac7355bc8979153e3038f31e5c8 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-core/plugins/admin/mimetypes/class_mimetypeGeneric.inc
index 1895e163a6b78d380b01f037f96759cb5914b8f5..03867ebab5497458f99500b8ca130b91de98329f 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_componentGeneric.inc b/gosa-core/plugins/admin/systems/class_componentGeneric.inc
index 2772f3501cdd81e2d487476417b394e57c845b85..583625188ab6e8c2063b5ba4f5025d699feb759d 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_phoneGeneric.inc b/gosa-core/plugins/admin/systems/class_phoneGeneric.inc
index 3357e5c0bad1fd74da0ae1daea3d31e65335c92e..444e3f6f349679a386d350408c51c11b6ef09529 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_printGeneric.inc b/gosa-core/plugins/admin/systems/class_printGeneric.inc
index b2954dc04644e80be21f9e982c6c8fc96bf9c63c..8940a9356a0b0b0000745793a159796802162943 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_servGeneric.inc b/gosa-core/plugins/admin/systems/class_servGeneric.inc
index c0f1d595cb04bfe6a87209ee0c2f957c56b5911d..91eec6805b528ff08c3c65a9e65bd668df8c91f8 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_terminalGeneric.inc b/gosa-core/plugins/admin/systems/class_terminalGeneric.inc
index 6782d8fab197a69e0be69c1f4594c01fc089f3ea..cdd9b8d685dcab0233915f91c9d88393e23977d0 100644 (file)
if(!isset($this->parent->by_object['ogroup'])){
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn"));
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn"));
$this->member_of_ogroup = $ldap->count() >= 1;
}
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_terminalService.inc b/gosa-core/plugins/admin/systems/class_terminalService.inc
index e73acf2298eaf27c313134233c3ff2f12d972c0b..54e1d865d2f43f4c0aa2e2998d0512bc5ea2e006 100644 (file)
/* Load hardware list */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))");
if ($ldap->count() == 1){
$map= array("gotoXResolution", "gotoXColordepth", "gotoXKbModel", "gotoXKbLayout",
"gotoXKbVariant", "gotoXMouseType", "gotoXMouseport");
diff --git a/gosa-core/plugins/admin/systems/class_terminalStartup.inc b/gosa-core/plugins/admin/systems/class_terminalStartup.inc
index b03aa140bb2794e7c1b94dd24a0b90a7d3db60e2..362bc7d8c10b920a8b66b5d08819e1c22178852a 100644 (file)
/* Load hardware list */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))");
if ($ldap->count() == 1){
$map= array("gotoLdapServer");
$attrs= $ldap->fetch();
diff --git a/gosa-core/plugins/admin/systems/class_winGeneric.inc b/gosa-core/plugins/admin/systems/class_winGeneric.inc
index 8e21266117cf158dfb1e08887031dc2bb10f90ef..559446548bf584490ec6bf4e689fa04686e1bae2 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_workstationGeneric.inc b/gosa-core/plugins/admin/systems/class_workstationGeneric.inc
index 505397535399a159a24db014905eff4196065ce5..0f0f97a982b59974afb99bca93f5e1a5c7220e31 100644 (file)
if(!isset($this->parent->by_object['ogroup'])){
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($this->dn)))."))",array("cn"));
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn"));
$this->member_of_ogroup = $ldap->count() >= 1;
}
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/admin/systems/class_workstationService.inc b/gosa-core/plugins/admin/systems/class_workstationService.inc
index 5b1a43e1abd56d7be362451e23caef5e01dc6b5c..815b52c0cfb3f1a6fdf04468b6abda308e8101e5 100644 (file)
/* Load hardware list */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))");
if ($ldap->count() == 1){
$map= array("gotoXResolution", "gotoXColordepth", "gotoXKbModel", "gotoXKbLayout",
"gotoXKbVariant", "gotoXMouseType", "gotoXMouseport");
diff --git a/gosa-core/plugins/admin/systems/class_workstationStartup.inc b/gosa-core/plugins/admin/systems/class_workstationStartup.inc
index 97410c8dcf2afad83314ea30f618481ec3f38d0c..a63fdd3278576cddad550b17715a6f7e62bee0fc 100644 (file)
if(!isset($this->parent->by_object['ogroup'])){
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn","dn"));
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))",array("cn","dn"));
if($ldap->count()){
$this->member_of_ogroup = TRUE;
$attrs = $ldap->fetch();
diff --git a/gosa-core/plugins/generic/references/class_reference.inc b/gosa-core/plugins/generic/references/class_reference.inc
index ed33bec45ca01f97cdd3fae9cf4103ae80016b9a..faac2d0d5f89dde9f72a5e99ce404f1db9e0e333 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $ldap->search("(|(member=".normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($this->dn))).")(memberUid=".$this->uid."))",array("memberUid","member","cn","description","objectClass"));
+ $ldap->search("(|(member=".LDAP::prepare4filter($this->dn).")(memberUid=".$this->uid."))",array("memberUid","member","cn","description","objectClass"));
$cycle= array("F5F5F5", "ECECEC");
$id= 0;
diff --git a/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc b/gosa-core/plugins/gofon/conference/class_phoneConferenceManagment.inc
index 65fccd9b99001380315869f562eee0bc036d5154..50b4b241b32bbd3f7e4a0fb1cb832a752f6b9733 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new conftab($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/gofon/macro/class_gofonMacro.inc b/gosa-core/plugins/gofon/macro/class_gofonMacro.inc
index f4ed4a8bae2c9074b178e52f2355397680da6e83..07e10f0aa3f8110a559b87359a49b168bc8b8f80 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc
index 035b557148090fffab8105c6e5ec02a4067b35d9..ee7da75d697bcadf7fedbdbb6a9a3611bcf25959 100644 (file)
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::preapre4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
diff --git a/gosa-core/setup/class_setupStep_Migrate.inc b/gosa-core/setup/class_setupStep_Migrate.inc
index 16dbf8a276157e022832ad8d7632131a2d506e95..f60281976eb0db009790ca3cbdc069d6f07a90a9 100644 (file)
/* Check if there are references to this object */
- $ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
+ $ldap->search("(&(member=".LDAP::prepare4filter($dn).")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
$refs = "";
while($attrs = $ldap->fetch()){
$ref_dn = $attrs['dn'];
$this->outside_groups[$b_dn]['ldif'] = _("Group will be moved from").":<br>\t".($ldap->fix($dn))."<br>"._("to").":<br>\t".($ldap->fix($d_dn));
/* Check if there are references to this object */
- $ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
+ $ldap->search("(&(member=".LDAP::prepare4filter($dn).")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
$refs = "";
while($attrs = $ldap->fetch()){
$ref_dn = $attrs['dn'];
$this->outside_users[$b_dn]['ldif'] = _("User will be moved from").":<br>\t".($ldap->fix($dn))."<br>"._("to").":<br>\t".($ldap->fix($d_dn));
/* Check if there are references to this object */
- $ldap->search("(&(member=".$dn.")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
+ $ldap->search("(&(member=".LDAP::prepare4filter($dn).")(|(objectClass=gosaGroupOfNames)(objectClass=groupOfNames)))",array('dn'));
$refs = "";
while($attrs = $ldap->fetch()){
$ref_dn = $attrs['dn'];
/* Update object references in gosaGroupOfNames */
$ogs_to_fix = array();
$ldap->cd($cv['base']);
- $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::fix($source).'))', array('cn','member'));
+ $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::prepare4filter($source).'))', array('cn','member'));
while ($attrs= $ldap->fetch()){
$dn = $attrs['dn'];
$attrs = $this->cleanup_array($attrs);