From 8e8603a69220da40e2847dd6d1273fc6cf01f62e Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 27 Feb 2008 08:37:37 +0000 Subject: [PATCH] Don't send ldap config if disabled git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9147 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/SIPackages.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gosa-si/modules/SIPackages.pm b/gosa-si/modules/SIPackages.pm index 19a4dfcac..b038e3963 100644 --- a/gosa-si/modules/SIPackages.pm +++ b/gosa-si/modules/SIPackages.pm @@ -644,10 +644,11 @@ sub who_has_i_do { print "\ngot msg $header:\nserver $source has client with $search_param $search_value\n"; } + #=== FUNCTION ================================================================ # NAME: new_ldap_config # PARAMETERS: address - string - ip address and port of a host -# RETURNS: nothing +# RETURNS: gosa-si conform message # DESCRIPTION: send to address the ldap configuration found for dn gotoLdapServer #=============================================================================== sub new_ldap_config { @@ -682,7 +683,7 @@ sub new_ldap_config { $mesg = $main::ldap_handle->search( base => $ldap_base, scope => 'sub', attrs => ['dn', 'gotoLdapServer', 'gosaUnitTag', 'FAIclass'], - filter => "(&(objectClass=GOhard)(macaddress=$macaddress))"); + filter => "(&(objectClass=GOhard)(macaddress=$macaddress)(gotoMode=active))"); #$mesg->code && die $mesg->error; if($mesg->code) { &main::daemon_log($mesg->error, 1); @@ -691,7 +692,7 @@ sub new_ldap_config { # Sanity check if ($mesg->count != 1) { - &main::daemon_log("WARNING: client mac address $macaddress not found/not unique in ldap search", 1); + &main::daemon_log("WARNING: client with mac address $macaddress not found/unique/active - not sending ldap config", 1); &main::daemon_log("\tbase: $ldap_base", 1); &main::daemon_log("\tscope: sub", 1); &main::daemon_log("\tattrs: dn, gotoLdapServer", 1); -- 2.30.2