From 4c8686d336f15c1f1bca1eaf9b4575110f52f761 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Thu, 10 Jan 2008 08:14:18 +0000 Subject: [PATCH] bugfix: catch ldap error git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8283 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/ServerPackages.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-si/modules/ServerPackages.pm b/gosa-si/modules/ServerPackages.pm index e3bee1793..a1432ad00 100644 --- a/gosa-si/modules/ServerPackages.pm +++ b/gosa-si/modules/ServerPackages.pm @@ -594,8 +594,12 @@ sub new_ldap_config { } # Build LDAP connection - my $ldap; - $ldap= Net::LDAP->new($ldap_uri); + my $ldap = Net::LDAP->new($ldap_uri); + if( not defined $ldap ) { + &main::daemon_log("ERROR: cannot connect to ldap: $ldap_uri", 1); + return; + } + # Bind to a directory with dn and password my $mesg= $ldap->bind($ldap_admin_dn, $ldap_admin_password); -- 2.30.2