summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2hg <hg@kolab.org>2005-06-19 15:25:32 (GMT)
committercvs2hg <hg@kolab.org>2005-06-19 15:25:32 (GMT)
commita125cb08207616ca1219d365d3e9aadde4caeae5 (patch)
tree2ab2edcd19cff25fed1e1ed96586250707ff0429
parent1a20da2d55a246e138d48b4db39492c53657f9bc (diff)
parent4608af383711e041ca706fd22c4fe80cab6e7969 (diff)
downloadperl-Kolab-2.0-proko2_m3.tar.gz
fixup commit for tag '2.0-proko2_m3'2.0-proko2_m3
-rw-r--r--Kolab-Conf/Conf.pm41
-rw-r--r--Kolab-DirServ/DirServ.pm2
-rw-r--r--Kolab-LDAP-Backend-slurpd/slurpd.pm19
-rw-r--r--Kolab-LDAP/LDAP.pm65
-rw-r--r--Kolab/Kolab.pm48
-rw-r--r--perl-kolab.spec8
6 files changed, 122 insertions, 61 deletions
diff --git a/Kolab-Conf/Conf.pm b/Kolab-Conf/Conf.pm
index e52c373..b981ed2 100644
--- a/Kolab-Conf/Conf.pm
+++ b/Kolab-Conf/Conf.pm
@@ -67,10 +67,12 @@ sub fixup {
(my $owner, my $group) = split(/:/, $ownership, 2);
my $uid = (getpwnam($owner))[2];
my $gid = (getgrnam($group))[2];
+ Kolab::log('T', sprintf("Changing permissions of %s to 0%o", $file, $perm ), KOLAB_DEBUG );
if( chmod($perm, $file) != 1 ) {
- Kolab::log('T', "Unable to change permissions of `$file' to $perm", KOLAB_ERROR);
+ Kolab::log('T', "Unable to change permissions of `$file' to ".sprintf("0%o",$perm), KOLAB_ERROR);
exit(1);
}
+ Kolab::log('T', "Changing owner of $file to $owner:$group ($uid:$gid)", KOLAB_DEBUG );
if( chown($uid,$gid,$file) != 1 ) {
Kolab::log('T', "Unable to change ownership of `$file' to $uid:$gid", KOLAB_ERROR);
exit(1);
@@ -84,9 +86,11 @@ sub build {
my $perm = shift;
my $oldcfg = $cfg . '.old';
my $prefix = $Kolab::config{'prefix'};
-
+
+ my $oldmask = umask 077;
copy($cfg, $oldcfg);
chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $oldcfg);
+ umask $oldmask;
#chmod(0600, $oldcfg) if ($oldcfg =~ /openldap/);
Kolab::log('T', "Creating new configuration file `$cfg' from template `$tmpl'", KOLAB_DEBUG );
@@ -107,7 +111,7 @@ sub build {
exit(1);
}
- Kolab::log('T', "Using temporary file '".$config->filename."'", KOLAB_DEBUG );
+ #Kolab::log('T', "Using temporary file '".$config->filename."'", KOLAB_DEBUG );
my $skip = 0;
while (<$template>) {
@@ -118,10 +122,10 @@ sub build {
# Skip text
$skip++;
}
- s/\@{3}if (\S+?)\@{3}//;
+ s/\@{3}if (\S+?)\@{3}\n?//;
} elsif (/\@{3}endif\@{3}/) {
( $skip > 0 ) && $skip--;
- s/\@{3}endif\@{3}//;
+ s/\@{3}endif\@{3}\n?//;
} elsif (/\@{3}(\S+?)(\|.+?)?\@{3}/) {
my $attr = $1;
my $opt = $2;
@@ -190,8 +194,11 @@ sub buildPostfixTransportMap
my $prefix = $Kolab::config{'prefix'};
my $cfg = "$prefix/etc/postfix/transport";
my $oldcfg = $cfg . '.old';
+
+ my $oldmask = umask 077;
copy($cfg, $oldcfg);
chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $oldcfg);
+ umask $oldmask;
copy("$prefix/etc/kolab/templates/transport.template", $cfg);
my $transport;
@@ -234,11 +241,11 @@ sub buildPostfixTransportMap
# Build transport rules for groups
$mesg = $ldap->search( base => 'cn=groups,'.$Kolab::config{'base_dn'},
scope => 'sub',
- filter => '(objectClass=kInetOrgPerson)' );
+ filter => '(objectClass=kolabinetorgperson)' );
if ($mesg->code) {
Kolab::log('T', 'Unable to locate groups transport map entries in LDAP', KOLAB_ERROR);
exit(1);
- }
+ }
if ($mesg->code <= 0) {
foreach $ldapobject ($mesg->entries) {
my $mail = $ldapobject->get_value('mail');
@@ -251,11 +258,11 @@ sub buildPostfixTransportMap
# Build transport rules for resources
$mesg = $ldap->search( base => 'cn=resources,'.$Kolab::config{'base_dn'},
scope => 'sub',
- filter => '(objectClass=kInetOrgPerson)' );
+ filter => '(objectClass=kolabinetorgperson)' );
if ($mesg->code) {
Kolab::log('T', 'Unable to locate resources transport map entries in LDAP', KOLAB_ERROR);
exit(1);
- }
+ }
if ($mesg->code <= 0) {
foreach $ldapobject ($mesg->entries) {
my $mail = $ldapobject->get_value('mail');
@@ -270,7 +277,7 @@ sub buildPostfixTransportMap
$transport->close;
# FIXME: bad way of doing things...
- system("chown root:root $prefix/etc/postfix/*");
+ #system("chown root:root $prefix/etc/postfix/*");
system("$prefix/sbin/postmap $prefix/etc/postfix/transport");
if (-f $oldcfg) {
@@ -300,8 +307,10 @@ sub buildCyrusConfig
my $cfg = "$prefix/etc/imapd/cyrus.conf";
my $oldcfg = $cfg . '.old';
+ my $oldmask = umask 077;
copy($cfg, $oldcfg);
chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $oldcfg);
+ umask $oldmask;
my $cyrusconf;
if (!($cyrusconf = IO::File->new($cfg, 'w'))) {
@@ -355,8 +364,11 @@ sub buildCyrusGroups
my $prefix = $Kolab::config{'prefix'};
my $cfg = "$prefix/etc/imapd/imapd.group";
my $oldcfg = $cfg . '.old';
+
+ my $oldmask = umask 077;
copy($cfg, $oldcfg);
chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $oldcfg);
+ umask $oldmask;
copy("$prefix/etc/kolab/templates/imapd.group.template", $cfg);
my $groupconf;
if (!($groupconf = IO::File->new($cfg, 'a'))) {
@@ -374,7 +386,7 @@ sub buildCyrusGroups
my $mesg = $ldap->search(
base => $Kolab::config{'base_dn'},
scope => 'sub',
- filter => '(objectclass=groupOfNames)'
+ filter => '(objectclass=kolabgroupofnames)'
);
if ($mesg->code) {
Kolab::log('T', 'Unable to locate Cyrus groups in LDAP', KOLAB_ERROR);
@@ -436,8 +448,11 @@ sub buildLDAPReplicas
my $prefix = $Kolab::config{'prefix'};
my $cfg = "$prefix/etc/openldap/slapd.replicas";
my $oldcfg = $cfg . '.old';
+
+ my $oldmask = umask 077;
copy($cfg, $oldcfg);
chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $oldcfg);
+ umask $oldmask;
copy("$prefix/etc/kolab/templates/slapd.replicas.template", $cfg);
my $repl;
if (!($repl = IO::File->new($cfg, 'a'))) {
@@ -454,7 +469,7 @@ sub buildLDAPReplicas
@kh = ( $Kolab::config{'kolabhost'} );
}
for my $h ( @kh ) {
- next if $h eq $Kolab::config{'fqhostname'};
+ next if lc($h) eq lc($Kolab::config{'fqdnhostname'});
print $repl "replica uri=ldaps://$h\n"
." binddn=\"".$Kolab::config{'bind_dn'}."\"\n"
." bindmethod=simple credentials=".$Kolab::config{'bind_pw'}."\n\n";
@@ -543,7 +558,7 @@ sub rebuildTemplates
"$prefix/etc/postfix/main.cf" => "kolab:kolab-r",
"$prefix/etc/postfix/master.cf" => "kolab:kolab-r",
"$prefix/etc/clamav/clamav.conf" => "kolab:kolab-r",
- "$prefix/etc/clamav/freshclam.conf" => "root:kolab",
+ "$prefix/etc/clamav/freshclam.conf" => "kolab:kolab-r",
"$prefix/etc/amavisd/amavisd.conf" => "kolab:kolab-r",
"$prefix/etc/sasl/saslauthd.conf" => "kolab:kolab",
"$prefix/etc/imapd/imapd.conf" => "kolab:kolab-r",
diff --git a/Kolab-DirServ/DirServ.pm b/Kolab-DirServ/DirServ.pm
index 6eedab9..ce5037a 100644
--- a/Kolab-DirServ/DirServ.pm
+++ b/Kolab-DirServ/DirServ.pm
@@ -87,7 +87,7 @@ sub genericRequest
$entry->add(
'objectClass' => 'kolabPerson',
- 'homeServer' => $Kolab::config{'dirserv_home_server'},
+ 'kolabhomeserver' => $Kolab::config{'dirserv_home_server'},
);
Kolab::log('DS', "About to send $request", KOLAB_DEBUG);
diff --git a/Kolab-LDAP-Backend-slurpd/slurpd.pm b/Kolab-LDAP-Backend-slurpd/slurpd.pm
index 25cce63..01010cb 100644
--- a/Kolab-LDAP-Backend-slurpd/slurpd.pm
+++ b/Kolab-LDAP-Backend-slurpd/slurpd.pm
@@ -273,9 +273,15 @@ sub run
Kolab::log('SD', 'Waiting for LDAP updates');
- for ($ready = 1; $ready; $ready = $select->can_read(1)) {
+ for ($ready = 1; $conn && $ready; $ready = $select->can_read(1)) {
Kolab::log('SD', 'Reading ASN', KOLAB_DEBUG);
- $offset = asn_read($conn, $pdu, $offset);
+ my $newoffset = asn_read($conn, $pdu, $offset);
+ if( !$conn->connected() or $offset == $newoffset ) {
+ Kolab::log('SD', 'Connection closed', KOLAB_DEBUG);
+ $conn->close;
+ undef $conn;
+ }
+ $offset = $newoffset;
defined($offset) or $offset = 0;
sleep 1;
}
@@ -291,14 +297,17 @@ sub run
undef $pdu;
SWITCH: {
- if (/bindRequest/) { $pdu = responseBind($request); last SWITCH; }
+ if (/^bindRequest/) { $pdu = responseBind($request); last SWITCH; }
if (/addRequest/) { $pdu = responseAdd($request); $changes = 1; last SWITCH; }
if (/delRequest/) { $pdu = responseDel($request); $changes = 1; last SWITCH; }
if (/modifyRequest/) { $pdu = responseMod($request); $changes = 1; last SWITCH; }
if (/modDNRequest/) { $pdu = responseModDN($request); $changes = 1; last SWITCH; }
- $conn->close;
- undef $conn;
+ if( $conn ) {
+ Kolab::log('SD', 'Unknown request, connection closed', KOLAB_DEBUG);
+ $conn->close;
+ undef $conn;
+ }
}
}
diff --git a/Kolab-LDAP/LDAP.pm b/Kolab-LDAP/LDAP.pm
index 31ad465..3350c90 100644
--- a/Kolab-LDAP/LDAP.pm
+++ b/Kolab-LDAP/LDAP.pm
@@ -22,7 +22,7 @@ package Kolab::LDAP;
use 5.008;
use strict;
use warnings;
-use Net::LDAP;
+use Net::LDAP qw( LDAP_SUCCESS LDAP_PROTOCOL_ERROR LDAP_REFERRAL);
use Net::LDAPS;
use DB_File;
use Kolab;
@@ -182,7 +182,7 @@ sub isDeleted
my $p = shift || 'user';
my $del = $object->get_value($Kolab::config{$p . '_field_deleted'}, asref => 1 );
#foreach (@$del) {
- # return 1 if lc($_) eq lc($Kolab::config{'fqhostname'});
+ # return 1 if lc($_) eq lc($Kolab::config{'fqdnhostname'});
#}
#return 0;
return $#$del > 0;
@@ -221,7 +221,7 @@ sub createObject
Kolab::log('L', "Kolab::LDAP::createObject() called with obj uid field `$objuidfield' for obj type `$p'", KOLAB_DEBUG);
- my $homeserver = $object->get_value('homeServer');
+ my $kolabhomeserver = lc($object->get_value('kolabhomeserver'));
my $islocal = 1;
my $del = $object->get_value($Kolab::config{$p . '_field_deleted'}, asref => 1);
if( ref($del) eq 'ARRAY' && @$del > 0 ) {
@@ -229,12 +229,12 @@ sub createObject
." because it is deleted");
return;
}
- if( $homeserver && $homeserver ne $Kolab::config{'fqhostname'} ) {
+ if( $kolabhomeserver && $kolabhomeserver ne lc($Kolab::config{'fqdnhostname'}) ) {
if( $p eq 'sf' ) {
- # Dont create shared folders on other hosts than it's homeserver
+ # Dont create shared folders on other hosts than it's kolabhomeserver
return;
}
- Kolab::log('L', "Kolab::LDAP::createObject() for other server $homeserver. TODO: Create referral or something, for now we just create ", KOLAB_DEBUG);
+ Kolab::log('L', "Kolab::LDAP::createObject() for other server $kolabhomeserver. TODO: Create referral or something, for now we just create ", KOLAB_DEBUG);
$islocal = 0;
}
@@ -308,7 +308,25 @@ sub createObject
}
my $quota = $object->get_value($Kolab::config{$p . '_field_quota'});
- Kolab::Cyrus::setQuota($cyrus, $uid, $quota, ($p eq 'sf' ? 1 : 0));
+ Kolab::Cyrus::setQuota($cyrus, $uid, $quota*1024, ($p eq 'sf' ? 1 : 0));
+}
+
+sub createMasterLDAP {
+ my $uri = $Kolab::config{'ldap_master_uri'};
+
+ my $masterldap = Net::LDAP->new(
+ $uri,
+ version => 3,
+ timeout => 5,
+ verify => 'none');
+ my $mesg = $masterldap->bind(
+ $Kolab::config{'bind_dn'},
+ password => $Kolab::config{'bind_pw'});
+ if ($mesg->code) {
+ Kolab::log('L', "Unable to bind to `$uri', LDAP Error = `"
+ .$mesg->error."'", KOLAB_ERROR);
+ }
+ return $masterldap;
}
sub deleteObject
@@ -327,24 +345,35 @@ sub deleteObject
if ($remfromldap) {
my $dn = $object->dn;
my $del = $object->get_value($Kolab::config{$p . '_field_deleted'}, asref => 1);
+ my $masterldap;
+ if( lc($Kolab::config{'is_master'}) eq 'true' ) {
+ # We are the master, just go ahead
+ $masterldap = $ldap;
+ } else {
+ $masterldap = createMasterLDAP;
+ }
if( ref($del) eq 'ARRAY' && scalar(@$del) == 1 ) {
# Ok we are the last one...
Kolab::log('L', "Removing DN `$dn'");
- my $mesg = $ldap->delete($dn);
- if ($mesg->code) {
- Kolab::log('L', "Unable to remove DN `$dn': ".$mesg->error, KOLAB_WARN);
+ my $mesg = $masterldap->delete($dn);
+ if ($mesg->code ) {
+ Kolab::log('L', "Unable to remove DN `$dn': ".$mesg->error, KOLAB_WARN);
}
} else {
- # Just remove us from the deleteflag
- Kolab::log('L', "Removing ".$Kolab::config{'fqhostname'}." from deleteflag in `$dn'");
- my $mesg = $ldap->modify( $dn, delete =>
- { $Kolab::config{$p . '_field_deleted'} =>
- $Kolab::config{'fqhostname'} } );
+ # Just remove us from the kolabdeleteflag
+ Kolab::log('L', "Removing ".$Kolab::config{'fqdnhostname'}." from kolabdeleteflag in `$dn'");
+ my $mesg = $masterldap->modify( $dn, delete =>
+ { $Kolab::config{$p . '_field_deleted'} =>
+ $Kolab::config{'fqdnhostname'} } );
if ($mesg->code) {
- Kolab::log('L', "Unable to remove ".$Kolab::config{'fqhostname'}
- ." from deleteflag in `$dn': ".$mesg->error, KOLAB_WARN);
+ Kolab::log('L', "Unable to remove ".$Kolab::config{'fqdnhostname'}
+ ." from kolabdeleteflag in `$dn': ".$mesg->error, KOLAB_WARN);
}
}
+ if( $ldap != $masterldap ) {
+ # Disconnect from master if we are the slave
+ $masterldap->disconnect;
+ }
}
my $guid = $object->get_value($Kolab::config{$p . '_field_guid'});
@@ -450,7 +479,7 @@ sub syncBasic
$ldapmesg = $ldap->search(
base => $dn,
scope => 'sub',
- filter => '(&(objectClass=' . $Kolab::config{$p . '_object_class'} . ")$add(" . $Kolab::config{$p . '_field_deleted'} . '='.$Kolab::config{'fqhostname'}.'))',
+ filter => '(&(objectClass=' . $Kolab::config{$p . '_object_class'} . ")$add(" . $Kolab::config{$p . '_field_deleted'} . '='.$Kolab::config{'fqdnhostname'}.'))',
attrs => [
'*',
$Kolab::config{$p . '_field_guid'},
diff --git a/Kolab/Kolab.pm b/Kolab/Kolab.pm
index f7d7907..b4e6c48 100644
--- a/Kolab/Kolab.pm
+++ b/Kolab/Kolab.pm
@@ -27,7 +27,7 @@ use URI;
use Net::LDAP;
use Kolab::Util;
#use Kolab::LDAP;
-use vars qw(%config %haschanged);
+use vars qw(%config %haschanged $reloadOk);
require Exporter;
@@ -36,6 +36,7 @@ our @ISA = qw(Exporter);
our %EXPORT_TAGS = (
'all' => [ qw(
%config
+ $reloadOk
&reloadConfig
&reload
&log
@@ -66,6 +67,8 @@ sub reloadConfig
my $tempval;
my $ldap;
+ my $error = 0;
+
# `log_level' specifies what severity of messages we want to see in the logs.
# Possible values are:
# 0 - Silent
@@ -77,8 +80,8 @@ sub reloadConfig
# Determine the root of the kolab installation, and read `kolab.globals'
if (!($tempval = (getpwnam('kolab'))[7])) {
$config{'log_level'} = KOLAB_WARN;
- &log('C', 'Unable to determine the kolab root directory', KOLAB_ERROR);
-# exit(1);
+ &log('C', 'Unable to determine the kolab root directory', KOLAB_ERROR);
+ $error = 1;
} else {
%config = readConfig(%config, "$tempval/etc/kolab/kolab.globals");
$config{'prefix'} = $tempval;
@@ -93,39 +96,39 @@ sub reloadConfig
# 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;
$config{'ldap_port'} = $tempval->port;
@@ -142,13 +145,13 @@ sub reloadConfig
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;
}
#$ldap = Kolab::LDAP::create(
@@ -172,14 +175,15 @@ sub reloadConfig
# 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 {
&log('C', "Unable to find kolab object `" . $config{'kolab_dn'} . "'", KOLAB_ERROR);
# exit(1);
+ $error = 1;
}
} else {
&log('C', "Unable to read configuration data from LDAP", KOLAB_WARN);
@@ -252,6 +256,7 @@ sub reloadConfig
if (!($tempval = URI->new($config{'user_ldap_uri'}))) {
&log('C', "Unable to parse user_ldap_uri `" . $config{'user_ldap_uri'} . "'", KOLAB_ERROR);
# exit(1);
+ $error = 1;
} else {
$config{'user_ldap_ip'} = $tempval->host;
$config{'user_ldap_port'} = $tempval->port;
@@ -281,10 +286,10 @@ sub reloadConfig
$config{'user_field_quota'} = 'userquota' if (!exists $config{'user_field_quota'});
} else {
# slurd/default
- $config{'user_field_deleted'} = 'deleteflag' if (!exists $config{'user_field_deleted'});
+ $config{'user_field_deleted'} = 'kolabdeleteflag' if (!exists $config{'user_field_deleted'});
$config{'user_field_modified'} = 'modifytimestamp' if (!exists $config{'user_field_modified'});
$config{'user_field_guid'} = 'entryUUID' if (!exists $config{'user_field_guid'});
- $config{'user_field_quota'} = 'userquota' if (!exists $config{'user_field_quota'});
+ $config{'user_field_quota'} = 'cyrus-userquota' if (!exists $config{'user_field_quota'});
}
# The `sf_XXX' variables are the shared folder equivalents of the `user_XXX' variables
@@ -293,6 +298,7 @@ sub reloadConfig
if (!($tempval = URI->new($config{'sf_ldap_uri'}))) {
&log('C', "Unable to parse sf_ldap_uri `" . $config{'sf_ldap_uri'} . "'", KOLAB_ERROR);
# exit(1);
+ $error = 1;
} else {
$config{'sf_ldap_ip'} = $tempval->host;
$config{'sf_ldap_port'} = $tempval->port;
@@ -303,7 +309,7 @@ sub reloadConfig
$config{'sf_dn_list'} = $config{'base_dn'} if (!exists $config{'sf_dn_list'});
$config{'sf_directory_mode'} = $config{'directory_mode'} if (!exists $config{'sf_directory_mode'});
- $config{'sf_object_class'} = 'sharedfolder' if (!exists $config{'sf_object_class'});
+ $config{'sf_object_class'} = 'kolabsharedfolder' if (!exists $config{'sf_object_class'});
if ($config{'sf_directory_mode'} eq 'ad') {
# AD
@@ -313,10 +319,10 @@ sub reloadConfig
$config{'sf_field_quota'} = 'userquota' if (!exists $config{'sf_field_quota'});
} else {
# slurd/default
- $config{'sf_field_deleted'} = 'deleteflag' if (!exists $config{'sf_field_deleted'});
+ $config{'sf_field_deleted'} = 'kolabdeleteflag' if (!exists $config{'sf_field_deleted'});
$config{'sf_field_modified'} = 'modifytimestamp' if (!exists $config{'sf_field_modified'});
$config{'sf_field_guid'} = 'entryUUID' if (!exists $config{'sf_field_guid'});
- $config{'sf_field_quota'} = 'userquota' if (!exists $config{'sf_field_quota'});
+ $config{'sf_field_quota'} = 'cyrus-userquota' if (!exists $config{'sf_field_quota'});
}
# `gyard_deletion_period' specifies how many minutes to leave lost users in
@@ -334,6 +340,7 @@ sub reloadConfig
}
&log('C', 'Finished reloading configuration');
+ $reloadOk = !$error;
}
sub reload
@@ -407,6 +414,7 @@ sub log
sub superLog
{
my $text = shift;
+ #print STDERR "$text\n";
syslog('info', "$text");
}
diff --git a/perl-kolab.spec b/perl-kolab.spec
index 5a16e67..28f366f 100644
--- a/perl-kolab.spec
+++ b/perl-kolab.spec
@@ -24,7 +24,7 @@
##
# versions of individual parts
-%define V_perl 5.8.3
+%define V_perl 5.8.4
%define V_kolab 0.9.2
%define V_kolab_util 0.9.2
%define V_kolab_ldap 0.9.2
@@ -48,7 +48,7 @@ Class: PLUS
Group: Language
License: GPL/Artistic
Version: %{V_perl}
-Release: 20040720
+Release: 20040817
# list of sources
Source0: http://www.cpan.org/authors/id/S/ST/STEPHANB/Kolab-%{V_kolab}.tar.gz
@@ -66,8 +66,8 @@ Source10: http://www.cpan.org/authors/id/S/ST/STEPHANB/Kolab-Mailer-%{V_kola
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
-PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, perl-db, perl-mail, perl-ldap
+BuildPreReq: OpenPKG, openpkg >= 2.0, perl >= %{V_perl}, perl-openpkg >= %{V_perl}
+PreReq: OpenPKG, openpkg >= 2.1.0, perl >= %{V_perl}, perl-openpkg >= %{V_perl}, perl-db, perl-mail, perl-ldap
AutoReq: no
AutoReqProv: no