steffen: server/perl-kolab/Kolab Kolab.pm,1.9,1.10

cvs at intevation.de cvs at intevation.de
Thu Aug 12 14:37:26 CEST 2004


Author: steffen

Update of /kolabrepository/server/perl-kolab/Kolab
In directory doto:/tmp/cvs-serv5395/perl-kolab/Kolab

Modified Files:
	Kolab.pm 
Log Message:
bugfixes

Index: Kolab.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab/Kolab.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Kolab.pm	12 Aug 2004 10:55:39 -0000	1.9
+++ Kolab.pm	12 Aug 2004 12:37:24 -0000	1.10
@@ -81,7 +81,6 @@
     if (!($tempval = (getpwnam('kolab'))[7])) {
         $config{'log_level'} = KOLAB_WARN;
         &log('C', 'Unable to determine the kolab root directory', KOLAB_ERROR);	
-#        exit(1);
 	$error = 1;
     } else {
         %config = readConfig(%config, "$tempval/etc/kolab/kolab.globals");
@@ -97,46 +96,38 @@
     # Get the UID/GID of the `kolab' user
     if (!($config{'kolab_uid'} = (getpwnam('kolab'))[2])) {
         &log('C', "Unable to determine the uid of user `kolab'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     }
     if (!($config{'kolab_gid'} = (getgrnam('kolab'))[2])) {
         &log('C', "Unable to determine the gid of user `kolab'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     }
     if (!($config{'kolab_n_uid'} = (getpwnam('kolab-n'))[2])) {
         &log('C', "Unable to determine the uid of user `kolab-n'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     }
     if (!($config{'kolab_n_gid'} = (getgrnam('kolab-n'))[2])) {
         &log('C', "Unable to determine the gid of user `kolab-n'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     }
     if (!($config{'kolab_r_uid'} = (getpwnam('kolab-r'))[2])) {
         &log('C', "Unable to determine the uid of user `kolab-r'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     }
     if (!($config{'kolab_r_gid'} = (getgrnam('kolab-r'))[2])) {
         &log('C', "Unable to determine the gid of user `kolab-r'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     }
 
     # Make sure the critical variables we need were defined in kolab.conf
     if (!exists $config{'bind_dn'} || !exists $config{'bind_pw'} || !exists $config{'ldap_uri'} || !exists $config{'base_dn'}) {
         &log('C', "One or more required configuration variables (`bind_dn', `bind_pw', `ldap_uri' and/or `base_dn') are missing in `kolab.conf'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     }
 
     # Retrieve the LDAP values of the main kolab object to complete our config hash
     if (!($tempval = URI->new($config{'ldap_uri'}))) {
         &log('C', "Unable to parse ldap_uri `" . $config{'ldap_uri'} . "'", KOLAB_ERROR);
-#        exit(1);
 	$error = 1;
     } else {
         $config{'ldap_ip'} = $tempval->host;
@@ -154,14 +145,12 @@
 
         if (!($ldap = Net::LDAP->new($config{'ldap_uri'}, verify => 'none' ))) {
             &log('C', "Unable to connect to LDAP server `" . $config{'ldap_ip'} . ":" . $config{'ldap_port'} . "'", KOLAB_ERROR);
-#            exit(1);
 	    $error = 1;
         }
 
         $mesg = $ldap->bind($config{'bind_dn'}, password => $config{'bind_pw'}) if $ldap;
         if ($ldap && $mesg->code) {
             &log('C', "Unable to bind to DN `" . $config{'bind_dn'} . "'", KOLAB_ERROR);
-#            exit(1);
 	    $error = 1;
         }
 
@@ -186,9 +175,9 @@
 		      # Not a ref at all???
 		      &log('C', "Attribute $tempval does not exist", KOLAB_WARN );
 		    } elsif( @{$vals} == 1 ) {
-		      $config{$tempval} = $vals->[0];
+		      $config{lc($tempval)} = $vals->[0];
 		    } else {
-		      $config{$tempval} = $vals;
+		      $config{lc($tempval)} = $vals;
 		    }
                 }
             } else {





More information about the commits mailing list