From b86d5aab88a7d79a3be30ef76edb57492ad4f2de Mon Sep 17 00:00:00 2001 From: rettenbe Date: Mon, 30 Jun 2008 13:37:42 +0000 Subject: [PATCH] extension to changeset [11480] git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11481 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/ClientPackages.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gosa-si/modules/ClientPackages.pm b/gosa-si/modules/ClientPackages.pm index 1a0c71e45..53aec2833 100644 --- a/gosa-si/modules/ClientPackages.pm +++ b/gosa-si/modules/ClientPackages.pm @@ -790,17 +790,18 @@ sub new_ldap_config { scope => 'sub', attrs => ['dn', 'gotoLdapServer', 'FAIclass'], filter => "(&(objectClass=gosaGroupOfNames)(member=$dn))"); - #$mesg->code && die $mesg->error; if($mesg->code) { &main::daemon_log("$session_id ERROR: unable to search for '(&(objectClass=gosaGroupOfNames)(member=$dn))': ".$mesg->error, 1); return; } # Sanity check - if ($mesg->count != 1) { - &main::daemon_log("$session_id WARNING: no or more via an object class inherited LDAP information found for client mac $macaddress", 1); + if ($mesg->count == 0) { + &main::daemon_log("$session_id WARNING: no LDAP informations found for client with filter '(&(objectClass=gosaGroupOfNames)(member=$dn))'", 3); return; - } + } elsif ($mesg->count >= 2) { + &main::daemon_log("$session_id ERROR: multiple LDAP informations found for client with filter '(&(objectClass=gosaGroupOfNames)(member=$dn))'", 1); + } $entry= $mesg->entry(0); $dn= $entry->dn; -- 2.30.2