1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-2.2/createlinks mezzanine_patched_smeserver-kronolith-2.2/createlinks |
2 |
|
|
--- smeserver-kronolith-2.2/createlinks 2008-04-07 23:29:44.000000000 -0500 |
3 |
|
|
+++ mezzanine_patched_smeserver-kronolith-2.2/createlinks 2010-04-18 20:36:35.000000000 -0500 |
4 |
|
|
@@ -28,3 +28,19 @@ |
5 |
|
|
qw(post-upgrade)); |
6 |
|
|
} |
7 |
|
|
|
8 |
|
|
+#-------------------------------------------------- |
9 |
|
|
+# action for user-create event |
10 |
|
|
+#-------------------------------------------------- |
11 |
|
|
+ |
12 |
|
|
+$event = "user-create"; |
13 |
|
|
+ |
14 |
|
|
+event_link("ldap-add-fburl", $event, "30"); |
15 |
|
|
+ |
16 |
|
|
+#-------------------------------------------------- |
17 |
|
|
+# action for ldaup-update event |
18 |
|
|
+#-------------------------------------------------- |
19 |
|
|
+ |
20 |
|
|
+$event = "ldap-update"; |
21 |
|
|
+ |
22 |
|
|
+event_link("ldap-add-fburl", $event, "85"); |
23 |
|
|
+ |
24 |
|
|
diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-2.2/root/etc/e-smith/events/actions/ldap-add-fburl mezzanine_patched_smeserver-kronolith-2.2/root/etc/e-smith/events/actions/ldap-add-fburl |
25 |
|
|
--- smeserver-kronolith-2.2/root/etc/e-smith/events/actions/ldap-add-fburl 1969-12-31 18:00:00.000000000 -0600 |
26 |
|
|
+++ mezzanine_patched_smeserver-kronolith-2.2/root/etc/e-smith/events/actions/ldap-add-fburl 2010-04-18 20:27:53.000000000 -0500 |
27 |
|
|
@@ -0,0 +1,117 @@ |
28 |
|
|
+#!/usr/bin/perl -w |
29 |
|
|
+ |
30 |
|
|
+#---------------------------------------------------------------------- |
31 |
|
|
+# copyright (C) 1999, 2000 e-smith, inc. |
32 |
|
|
+# |
33 |
|
|
+# This program is free software; you can redistribute it and/or modify |
34 |
|
|
+# it under the terms of the GNU General Public License as published by |
35 |
|
|
+# the Free Software Foundation; either version 2 of the License, or |
36 |
|
|
+# (at your option) any later version. |
37 |
|
|
+# |
38 |
|
|
+# This program is distributed in the hope that it will be useful, |
39 |
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
40 |
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
41 |
|
|
+# GNU General Public License for more details. |
42 |
|
|
+# |
43 |
|
|
+# You should have received a copy of the GNU General Public License |
44 |
|
|
+# along with this program; if not, write to the Free Software |
45 |
|
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
46 |
|
|
+# |
47 |
|
|
+# Technical support for this program is available from e-smith, inc. |
48 |
|
|
+# For details, please visit our web site at www.e-smith.com or |
49 |
|
|
+# call us on 1 888 ESMITH 1 (US/Canada toll free) or +1 613 564 8000 |
50 |
|
|
+#---------------------------------------------------------------------- |
51 |
|
|
+ |
52 |
|
|
+package esmith; |
53 |
|
|
+ |
54 |
|
|
+use strict; |
55 |
|
|
+use Errno; |
56 |
|
|
+use esmith::ConfigDB; |
57 |
|
|
+use esmith::AccountsDB; |
58 |
|
|
+use esmith::util; |
59 |
|
|
+use Net::LDAP; |
60 |
|
|
+ |
61 |
|
|
+my $c = esmith::ConfigDB->open_ro; |
62 |
|
|
+my $a = esmith::AccountsDB->open_ro; |
63 |
|
|
+ |
64 |
|
|
+my $l = $c->get('ldap'); |
65 |
|
|
+my $status = $l->prop('status') || "disabled"; |
66 |
|
|
+unless ($status eq "enabled" ) |
67 |
|
|
+{ |
68 |
|
|
+ warn "Not running action script $0, LDAP service not enabled!\n"; |
69 |
|
|
+ exit(0); |
70 |
|
|
+} |
71 |
|
|
+ |
72 |
|
|
+my $hostname = $c->get('SystemName') |
73 |
|
|
+ || die("Couldn't determine system name"); |
74 |
|
|
+ $hostname = $hostname->value; |
75 |
|
|
+ |
76 |
|
|
+my $domain = $c->get('DomainName') |
77 |
|
|
+ || die("Couldn't determine domain name"); |
78 |
|
|
+ $domain = $domain->value; |
79 |
|
|
+ |
80 |
|
|
+my @accounts; |
81 |
|
|
+my $account; |
82 |
|
|
+my $event = shift || die "Event name must be specified"; |
83 |
|
|
+if ($event eq 'ldap-update') |
84 |
|
|
+{ |
85 |
|
|
+ @accounts = ($a->users); |
86 |
|
|
+} |
87 |
|
|
+else |
88 |
|
|
+{ |
89 |
|
|
+ my $userName = shift; |
90 |
|
|
+ die "Username argument missing." unless defined ($userName); |
91 |
|
|
+ |
92 |
|
|
+ $account = $a->get($userName); |
93 |
|
|
+ die "Account $userName not found.\n" unless defined $account; |
94 |
|
|
+ my $type = $account->prop('type') || "unknown"; |
95 |
|
|
+ |
96 |
|
|
+ die "Account $userName is not a user or group account; " . |
97 |
|
|
+ "update LDAP entry failed.\n" |
98 |
|
|
+ unless ($type eq 'user'); |
99 |
|
|
+ @accounts = ($account); |
100 |
|
|
+} |
101 |
|
|
+ |
102 |
|
|
+#------------------------------------------------------------ |
103 |
|
|
+# Update LDAP directory entry. First read LDAP password |
104 |
|
|
+#------------------------------------------------------------ |
105 |
|
|
+my $pw = esmith::util::LdapPassword(); |
106 |
|
|
+ |
107 |
|
|
+#------------------------------------------------------------ |
108 |
|
|
+# Update LDAP database entry. |
109 |
|
|
+#------------------------------------------------------------ |
110 |
|
|
+my $base = esmith::util::ldapBase ($domain); |
111 |
|
|
+ |
112 |
|
|
+my $ldap = Net::LDAP->new('localhost') |
113 |
|
|
+ or die "$@"; |
114 |
|
|
+ |
115 |
|
|
+$ldap->bind( |
116 |
|
|
+ dn => "cn=root,$base", |
117 |
|
|
+ password => $pw |
118 |
|
|
+); |
119 |
|
|
+ |
120 |
|
|
+foreach my $acct (@accounts) |
121 |
|
|
+{ |
122 |
|
|
+ my $key = $acct->key; |
123 |
|
|
+ my $type = $acct->prop('type'); |
124 |
|
|
+ next unless ($type eq 'user'); |
125 |
|
|
+ my @attrs = (); |
126 |
|
|
+ |
127 |
|
|
+ my $fb = 'https://'.$hostname.'.'.$domain.'/horde/kronolith/fb.php?u='.$key.'@'.$domain; |
128 |
|
|
+ utf8::upgrade($fb); |
129 |
|
|
+ push @attrs, (calFBURL => $fb) unless $fb =~ /^\s*$/; |
130 |
|
|
+ |
131 |
|
|
+ my $dn = "uid=$key,ou=Users,$base"; |
132 |
|
|
+ my %attrs = @attrs; |
133 |
|
|
+ |
134 |
|
|
+ $ldap->modify ($dn, add => {objectClass => 'calEntry'}); |
135 |
|
|
+ my $result = $ldap->modify ($dn, replace => \%attrs); |
136 |
|
|
+ |
137 |
|
|
+ $result->code && |
138 |
|
|
+ warn "failed to modify entry for $dn: ", $result->error ; |
139 |
|
|
+ |
140 |
|
|
+} |
141 |
|
|
+$ldap->unbind; |
142 |
|
|
+ |
143 |
|
|
+exit (0); |
144 |
|
|
+ |
145 |
|
|
diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-2.2/root/etc/e-smith/templates/etc/openldap/slapd.conf/12kronolithschema mezzanine_patched_smeserver-kronolith-2.2/root/etc/e-smith/templates/etc/openldap/slapd.conf/12kronolithschema |
146 |
|
|
--- smeserver-kronolith-2.2/root/etc/e-smith/templates/etc/openldap/slapd.conf/12kronolithschema 1969-12-31 18:00:00.000000000 -0600 |
147 |
|
|
+++ mezzanine_patched_smeserver-kronolith-2.2/root/etc/e-smith/templates/etc/openldap/slapd.conf/12kronolithschema 2010-04-18 21:06:42.000000000 -0500 |
148 |
|
|
@@ -0,0 +1,3 @@ |
149 |
|
|
+include /etc/openldap/schema/rfc2739.schema |
150 |
|
|
+include /etc/openldap/schema/horde.schema |
151 |
|
|
+ |
152 |
|
|
diff -Nur -x '*.orig' -x '*.rej' smeserver-kronolith-2.2/root/etc/openldap/schema/rfc2739.schema mezzanine_patched_smeserver-kronolith-2.2/root/etc/openldap/schema/rfc2739.schema |
153 |
|
|
--- smeserver-kronolith-2.2/root/etc/openldap/schema/rfc2739.schema 1969-12-31 18:00:00.000000000 -0600 |
154 |
|
|
+++ mezzanine_patched_smeserver-kronolith-2.2/root/etc/openldap/schema/rfc2739.schema 2010-04-18 21:07:53.000000000 -0500 |
155 |
|
|
@@ -0,0 +1,98 @@ |
156 |
|
|
+# |
157 |
|
|
+# http://www.faqs.org/rfcs/rfc2739.html |
158 |
|
|
+# |
159 |
|
|
+# From the RFC: |
160 |
|
|
+# The calCalURI contains the URI to a snapshot of the user's entire |
161 |
|
|
+# default calendar. The calFBURL contains the URI to the user's default |
162 |
|
|
+# busy time data. The calCAPURI represents contains a URI that can be |
163 |
|
|
+# used to communicate with the user's calendar. The calCalAdrURI |
164 |
|
|
+# contains a URI that points to the location to which event requests |
165 |
|
|
+# should be sent for that user. |
166 |
|
|
+# |
167 |
|
|
+# The calOtherCalURIs is a multi-valued property containing URIs to |
168 |
|
|
+# snapshots of other calendars that the user may have. The |
169 |
|
|
+# calOtherFBURLs is a multi-valued property containing URIs to other |
170 |
|
|
+# free/busy data that the user may have. The calOtherCAPURIs attribute |
171 |
|
|
+# is a multi-valued property containing URIs to other calendars that |
172 |
|
|
+# the user may have. The calOtherCalAdrURIs attribute is a multi-valued |
173 |
|
|
+# property containing URIs to other locations that a user may want |
174 |
|
|
+# event requests sent to. |
175 |
|
|
+# |
176 |
|
|
+# There is no predetermined order to the values in either multi-valued |
177 |
|
|
+# property. |
178 |
|
|
+ |
179 |
|
|
+# EQUALITY caseIgnoreIA5Match |
180 |
|
|
+ |
181 |
|
|
+attribute (1.2.840.113556.1.4.478 |
182 |
|
|
+ NAME 'calCalURI' |
183 |
|
|
+ DESC 'Snapshot of users entire default calendar' |
184 |
|
|
+ EQUALITY caseIgnoreIA5Match |
185 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
186 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
187 |
|
|
+ ) |
188 |
|
|
+ |
189 |
|
|
+attribute (1.2.840.113556.1.4.479 |
190 |
|
|
+ NAME 'calFBURL' |
191 |
|
|
+ DESC 'URI of the uses free and busy information' |
192 |
|
|
+ EQUALITY caseIgnoreIA5Match |
193 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
194 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
195 |
|
|
+ ) |
196 |
|
|
+ |
197 |
|
|
+attribute (1.2.840.113556.1.4.480 |
198 |
|
|
+ NAME 'calCAPURI' |
199 |
|
|
+ DESC 'URI used to communicate with the users calendar' |
200 |
|
|
+ EQUALITY caseIgnoreIA5Match |
201 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
202 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
203 |
|
|
+ ) |
204 |
|
|
+ |
205 |
|
|
+attribute (1.2.840.113556.1.4.481 |
206 |
|
|
+ NAME 'calCalAdrURI' |
207 |
|
|
+ DESC 'URI to which event requests should be sent for the user' |
208 |
|
|
+ EQUALITY caseIgnoreIA5Match |
209 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
210 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
211 |
|
|
+ ) |
212 |
|
|
+ |
213 |
|
|
+attribute (1.2.840.113556.1.4.482 |
214 |
|
|
+ NAME 'calOtherCalURIs' |
215 |
|
|
+ DESC 'URIs to non-default calendars belonging to the user' |
216 |
|
|
+ EQUALITY caseIgnoreIA5Match |
217 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
218 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
219 |
|
|
+ ) |
220 |
|
|
+ |
221 |
|
|
+attribute (1.2.840.113556.1.4.483 |
222 |
|
|
+ NAME 'calOtherFBURLs' |
223 |
|
|
+ DESC 'URIs to non-default free and busy information files' |
224 |
|
|
+ EQUALITY caseIgnoreIA5Match |
225 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
226 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
227 |
|
|
+ ) |
228 |
|
|
+ |
229 |
|
|
+attribute (1.2.840.113556.1.4.484 |
230 |
|
|
+ NAME 'calOtherCAPURIs' |
231 |
|
|
+ DESC 'URIs for communicating with non-default calendars' |
232 |
|
|
+ EQUALITY caseIgnoreIA5Match |
233 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
234 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
235 |
|
|
+ ) |
236 |
|
|
+ |
237 |
|
|
+attribute (1.2.840.113556.1.4.485 |
238 |
|
|
+ NAME 'calOtherCalAdrURIs' |
239 |
|
|
+ DESC 'Destinations for event requests to non-default calendars' |
240 |
|
|
+ EQUALITY caseIgnoreIA5Match |
241 |
|
|
+ SUBSTR caseIgnoreIA5SubstringsMatch |
242 |
|
|
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 |
243 |
|
|
+ ) |
244 |
|
|
+ |
245 |
|
|
+objectclass (1.2.840.113556.1.5.87 |
246 |
|
|
+ NAME 'calEntry' |
247 |
|
|
+ DESC 'Calendering and Free Busy information' |
248 |
|
|
+ SUP top AUXILIARY |
249 |
|
|
+ MAY (calCalURI $ calFBURL $ calCAPURI $ calCalAdrURI $ |
250 |
|
|
+ calOtherCalURIs $ calOtherFBURLs $ calOtherCAPURIs $ |
251 |
|
|
+ calOtherCalAdrURIs |
252 |
|
|
+ ) |
253 |
|
|
+ ) |