steffen: server/kolab/kolab kolab_bootstrap, 1.36, 1.37 kolab_smtpdpolicy, 1.7, 1.8

cvs at intevation.de cvs at intevation.de
Mon Jun 21 05:20:38 CEST 2004


Author: steffen

Update of /kolabrepository/server/kolab/kolab
In directory doto:/tmp/cvs-serv23307/kolab/kolab

Modified Files:
	kolab_bootstrap kolab_smtpdpolicy 
Log Message:
fixes and cleanup

Index: kolab_bootstrap
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab_bootstrap,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- kolab_bootstrap	21 Jun 2004 01:46:39 -0000	1.36
+++ kolab_bootstrap	21 Jun 2004 03:20:36 -0000	1.37
@@ -228,7 +228,7 @@
 	."Please stop any running ldap server and bootstrap again\n";
       tryConnect( '127.0.0.1', 9999 ) && die "A process is already listening to port 9999 (kolabd)\n"
 	."Please stop any running kolabd and bootstrap again\n";
-      if( `ps aux|grep slurpd` ) {
+      if( `ps aux|grep slurpd|grep -v grep` ) {
 	print "WARNING: Detected running slurpd processes.\n";
 	print " Please make sure the OpenLDAP server is stopped properly!\n";
       }
@@ -246,6 +246,9 @@
       }
       undef $slpd;
       undef $tmpl;
+      
+      $confname = "$kolab_prefix/etc/openldap/slapd.replicas";
+      copy( "$kolab_prefix/etc/kolab/templates/slapd.replicas.template", $confname ) || die "Could not write $confname";
       # now we must startup slapd
       print "temporarily starting slapd\n";
       $ldap_uri = "ldap://127.0.0.1:389/";
@@ -434,7 +437,7 @@
     ."Please stop any running ldap server and bootstrap again\n";
   tryConnect( '127.0.0.1', 9999 ) && die "A process is already listening to port 9999 (kolabd)\n"
     ."Please stop any running kolabd and bootstrap again\n";
-  if( `ps aux|grep slurpd` ) {
+  if( `ps aux|grep slurpd|grep -v grep` ) {
     print "WARNING: Detected running slurpd processes.\n";
     print " Please make sure the OpenLDAP server is stopped properly!\n";
   }

Index: kolab_smtpdpolicy
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab_smtpdpolicy,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- kolab_smtpdpolicy	21 Jun 2004 01:46:39 -0000	1.7
+++ kolab_smtpdpolicy	21 Jun 2004 03:20:36 -0000	1.8
@@ -155,7 +155,7 @@
   my $reg = '.*@('.join('|', at conf_domain).')';
   if( $sender =~ /$reg/ ) {
     my $mesg = $ldap->search( base=> $conf_basedn,
-			      scope=> 'sub', filter=> "(&(mail=$sender)(objectclass=kInetOrgPerson))");
+			      scope=> 'sub', filter=> "(&(mail=$sender)(objectClass=kInetOrgPerson))");
     if( !$mesg->code ) {
       mylog($syslog_priority, "LDAP search returned ".$mesg->count()." objects") if $verbose;
       foreach $ldapobject ($mesg->entries) {
@@ -178,17 +178,19 @@
 
   # Check for valid access to restricted distribution lists
  CHECKDISTLIST:
-  if( !$username ) {
+  if( !$username or $username eq '' ) {
     $recip =~ /(.*)@(.*)/;
     my $cn = $1;
     my $domain = $2;
     if( contains($domain, at conf_domain ) ) {
-      $mesg = $ldap->search( base=> 'cn=internal,'.$conf_basedn,
-			     scope=> 'one', filter=> "(&(cn=$recip)(objectclass=groupOfNames)");
+      $mesg = $ldap->search( base=> "cn=$cn,cn=internal,".$conf_basedn,
+                             scope=> 'exact', filter=> "(objectClass=groupOfNames)");
       if( !$mesg->code && $mesg->count() > 0 ) {
 	# Ups, recipient is a restricted list, reject
 	mylog( $syslog_priority, "Attempt from $sender to access restricted list $recip" ) if $verbose;	
 	return "REJECT Access denied";
+      } elsif( $mesg->code ) {
+	mylog( $syslog_priority, "LDAP Error: ".$mesg->error );
       }
     }
   }
@@ -278,7 +280,7 @@
   # $ldap->bind($Kolab::config{'bind_dn'}, password=> $Kolab::config{'bind_pw'}) 
   #   || warn "could not bind to ldap";
   if( $conf_binddn ) {
-    $ldap->bind( $conf_binddn, $conf_bindpw ) || fatal_exit( "could not bind as $conf_binddn" );
+    $ldap->bind( $conf_binddn, password => $conf_bindpw ) || fatal_exit( "could not bind as $conf_binddn" );
   } else {
     $ldap->bind || fatal_exit("could not bind");
   }





More information about the commits mailing list