diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-1.1.sme/createlinks smeserver-kronolith-1.1/createlinks --- smeserver-kronolith-1.1.sme/createlinks 2008-04-01 10:33:47.000000000 -0600 +++ smeserver-kronolith-1.1/createlinks 2008-04-01 10:34:19.000000000 -0600 @@ -28,5 +28,3 @@ qw(post-upgrade)); } -event_link("adv-ldap-update", "user-create", "27"); -event_link("adv-ldap-update", "user-modify", "27"); diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-1.1.sme/root/etc/e-smith/events/actions/adv-ldap-update smeserver-kronolith-1.1/root/etc/e-smith/events/actions/adv-ldap-update --- smeserver-kronolith-1.1.sme/root/etc/e-smith/events/actions/adv-ldap-update 2006-09-14 21:13:05.000000000 -0600 +++ smeserver-kronolith-1.1/root/etc/e-smith/events/actions/adv-ldap-update 1969-12-31 17:00:00.000000000 -0700 @@ -1,142 +0,0 @@ -#!/usr/bin/perl -w - -#---------------------------------------------------------------------- -# copyright (C) 1999, 2000 e-smith, inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Technical support for this program is available from e-smith, inc. -# For details, please visit our web site at www.e-smith.com or -# call us on 1 888 ESMITH 1 (US/Canada toll free) or +1 613 564 8000 -#---------------------------------------------------------------------- - -package esmith; - -use strict; -use Errno; -use esmith::ConfigDB; -use esmith::AccountsDB; -use esmith::util; -use Net::LDAP; - -my $c = esmith::ConfigDB->open_ro; -my $a = esmith::AccountsDB->open_ro; - -my $l = $c->get('ldap'); -my $status = $l->prop('status') || "disabled"; -unless ($status eq "enabled" ) -{ - warn "Not running action script $0, LDAP service not enabled!\n"; - exit(0); -} - -my $domain = $c->get('DomainName') - || die("Couldn't determine domain name"); - $domain = $domain->value; - -my @accounts; -my $account; -my $event = shift || die "Event name must be specified"; -if ($event eq 'ldap-update') -{ - @accounts = ($a->users, $a->groups); -} -else -{ - my $userName = shift; - die "Username argument missing." unless defined ($userName); - - $account = $a->get($userName); - die "Account $userName not found.\n" unless defined $account; - my $type = $account->prop('type') || "unknown"; - - die "Account $userName is not a user or group account; " . - "update LDAP entry failed.\n" - unless (($type eq 'user') || ($type eq 'group')); - @accounts = ($account); -} - -#------------------------------------------------------------ -# Update LDAP directory entry. First read LDAP password -#------------------------------------------------------------ -my $pw = esmith::util::LdapPassword(); - -#------------------------------------------------------------ -# Update LDAP database entry. -#------------------------------------------------------------ -my $base = esmith::util::ldapBase ($domain); - -my $ldap = Net::LDAP->new('localhost') - or die "$@"; - -$ldap->bind( - dn => "cn=root,$base", - password => $pw -); - -my $phone = $l->prop('defaultTelephoneNumber') || ''; -my $company = $l->prop('defaultCompany') || ''; -my $dept = $l->prop('defaultDepartment') || ''; -my $city = $l->prop('defaultCity') || ''; -my $street = $l->prop('defaultStreet') || ''; -foreach my $acct (@accounts) -{ - my $key = $acct->key; - my $type = $acct->prop('type'); - next unless ($type eq 'user' || $type eq 'group'); - my @attrs = (); - if ($type eq 'user') - { - my $freebusy= $acct->prop('FreeBusy') || ''; - utf8::upgrade($freebusy); - - push @attrs, (calFBURL => $freebusy) unless $freebusy =~ /^\s*$/; - } -# elsif ($type eq 'group') -# { -# push @attrs, (objectClass => 'posixGroup'); -# push @attrs, (uid => $key); -# -# my $key = $acct->key; -# my $desc = $acct->prop('Description') || ''; -# utf8::upgrade($desc); -# push @attrs, (cn => $desc) unless $desc =~ /^\s*$/; -# push @attrs, (mail => "$key\@$domain"); -# push @attrs, (telephoneNumber => $phone) unless $phone =~ /^\s*$/; -# push @attrs, (o => $company) unless $company =~ /^\s*$/; -# push @attrs, (ou => $dept) unless $dept =~ /^\s*$/; -# push @attrs, (l => $city) unless $city =~ /^\s*$/; -# push @attrs, (street => $street) unless $street =~ /^\s*$/; -# } - my $dn = "uid=$key,$base"; -# if (($event eq 'user-create') || ($event eq 'group-create')) -# { -# my $result = $ldap->add ($dn, attr => \@attrs); -# -# $result->code && -# warn "failed to add entry for $dn: ", $result->error ; -# } -# else -# { - my %attrs = @attrs; - my $result = $ldap->modify ($dn, replace => \%attrs); - - $result->code && - warn "failed to modify entry for $dn: ", $result->error ; -# } -} -$ldap->unbind; - -exit (0); diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-1.1.sme/root/etc/e-smith/templates/etc/openldap/slapd.conf/11rfc2739schema smeserver-kronolith-1.1/root/etc/e-smith/templates/etc/openldap/slapd.conf/11rfc2739schema --- smeserver-kronolith-1.1.sme/root/etc/e-smith/templates/etc/openldap/slapd.conf/11rfc2739schema 2006-09-14 21:13:05.000000000 -0600 +++ smeserver-kronolith-1.1/root/etc/e-smith/templates/etc/openldap/slapd.conf/11rfc2739schema 1969-12-31 17:00:00.000000000 -0700 @@ -1 +0,0 @@ -include /etc/openldap/schema/rfc2739.schema diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-1.1.sme/root/etc/openldap/schema/rfc2739.schema smeserver-kronolith-1.1/root/etc/openldap/schema/rfc2739.schema --- smeserver-kronolith-1.1.sme/root/etc/openldap/schema/rfc2739.schema 2006-09-14 21:13:05.000000000 -0600 +++ smeserver-kronolith-1.1/root/etc/openldap/schema/rfc2739.schema 1969-12-31 17:00:00.000000000 -0700 @@ -1,98 +0,0 @@ -# -# http://www.faqs.org/rfcs/rfc2739.html -# -# From the RFC: -# The calCalURI contains the URI to a snapshot of the user's entire -# default calendar. The calFBURL contains the URI to the user's default -# busy time data. The calCAPURI represents contains a URI that can be -# used to communicate with the user's calendar. The calCalAdrURI -# contains a URI that points to the location to which event requests -# should be sent for that user. -# -# The calOtherCalURIs is a multi-valued property containing URIs to -# snapshots of other calendars that the user may have. The -# calOtherFBURLs is a multi-valued property containing URIs to other -# free/busy data that the user may have. The calOtherCAPURIs attribute -# is a multi-valued property containing URIs to other calendars that -# the user may have. The calOtherCalAdrURIs attribute is a multi-valued -# property containing URIs to other locations that a user may want -# event requests sent to. -# -# There is no predetermined order to the values in either multi-valued -# property. - -# EQUALITY caseIgnoreIA5Match - -attribute (1.2.840.113556.1.4.478 - NAME 'calCalURI' - DESC 'Snapshot of users entire default calendar' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -attribute (1.2.840.113556.1.4.479 - NAME 'calFBURL' - DESC 'URI of the uses free and busy information' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -attribute (1.2.840.113556.1.4.480 - NAME 'calCAPURI' - DESC 'URI used to communicate with the users calendar' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -attribute (1.2.840.113556.1.4.481 - NAME 'calCalAdrURI' - DESC 'URI to which event requests should be sent for the user' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -attribute (1.2.840.113556.1.4.482 - NAME 'calOtherCalURIs' - DESC 'URIs to non-default calendars belonging to the user' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -attribute (1.2.840.113556.1.4.483 - NAME 'calOtherFBURLs' - DESC 'URIs to non-default free and busy information files' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -attribute (1.2.840.113556.1.4.484 - NAME 'calOtherCAPURIs' - DESC 'URIs for communicating with non-default calendars' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -attribute (1.2.840.113556.1.4.485 - NAME 'calOtherCalAdrURIs' - DESC 'Destinations for event requests to non-default calendars' - EQUALITY caseIgnoreIA5Match - SUBSTR caseIgnoreIA5SubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 - ) - -objectclass (1.2.840.113556.1.5.87 - NAME 'calEntry' - DESC 'Calendering and Free Busy information' - SUP top AUXILIARY - MAY (calCalURI $ calFBURL $ calCAPURI $ calCalAdrURI $ - calOtherCalURIs $ calOtherFBURLs $ calOtherCAPURIs $ - calOtherCalAdrURIs - ) - )