/[smecontribs]/rpms/smeserver-kronolith/contribs7/smeserver-kronolith-1.1-ldap.patch
ViewVC logotype

Annotation of /rpms/smeserver-kronolith/contribs7/smeserver-kronolith-1.1-ldap.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Apr 1 16:52:18 2008 UTC (16 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-kronolith-1_1-11_el4_sme
* Tue Apr 1 2008 Shad L. Lords <slords@mail.com> 1.1-11
- Added obsoletes for the previous three pear modules required by kronolith.

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed