/[smeserver]/rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0.backend
ViewVC logotype

Contents of /rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0.backend

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


Revision 1.1 - (show annotations) (download)
Wed Jan 28 04:04:18 2009 UTC (15 years, 4 months ago) by charliebrady
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-27_el5_sme, e-smith-ldap-5_2_0-19_el5_sme, e-smith-ldap-5_2_0-29_el5_sme, e-smith-ldap-5_2_0-31_el5_sme, e-smith-ldap-5_2_0-49_el5_sme, e-smith-ldap-5_2_0-76_el5_sme, e-smith-ldap-5_2_0-71_el5_sme, e-smith-ldap-5_2_0-39_el5_sme, e-smith-ldap-5_2_0-77_el5_sme, e-smith-ldap-5_2_0-50_el5_sme, e-smith-ldap-5_2_0-78_el5_sme, e-smith-ldap-5_2_0-37_el5_sme, e-smith-ldap-5_2_0-61_el5_sme, e-smith-ldap-5_2_0-66_el5_sme, e-smith-ldap-5_2_0-14_el5_sme, e-smith-ldap-5_2_0-70_el5_sme, e-smith-ldap-5_2_0-21_el5_sme, e-smith-ldap-5_2_0-8_el5_sme, e-smith-ldap-5_2_0-18_el5_sme, e-smith-ldap-5_2_0-79_el5_sme, e-smith-ldap-5_2_0-81_el5_sme, e-smith-ldap-5_2_0-36_el5_sme, e-smith-ldap-5_2_0-59_el5_sme, e-smith-ldap-5_2_0-45_el5_sme, e-smith-ldap-5_2_0-7_el5_sme, e-smith-ldap-5_2_0-10_el5_sme, e-smith-ldap-5_2_0-75_el5_sme, e-smith-ldap-5_2_0-46_el5_sme, e-smith-ldap-5_2_0-56_el5_sme, e-smith-ldap-5_2_0-55_el5_sme, e-smith-ldap-5_2_0-4_el5_sme, e-smith-ldap-5_2_0-57_el5_sme, e-smith-ldap-5_2_0-73_el5_sme, e-smith-ldap-5_2_0-69_el5_sme, e-smith-ldap-5_2_0-48_el5_sme, e-smith-ldap-5_2_0-44_el5_sme, e-smith-ldap-5_2_0-11_el5_sme, e-smith-ldap-5_2_0-6_el5_sme, e-smith-ldap-5_2_0-52_el5_sme, e-smith-ldap-5_2_0-51_el5_sme, e-smith-ldap-5_2_0-35_el5_sme, e-smith-ldap-5_2_0-24_el5_sme, e-smith-ldap-5_2_0-72_el5_sme, e-smith-ldap-5_2_0-34_el5_sme, e-smith-ldap-5_2_0-28_el5_sme, e-smith-ldap-5_2_0-65_el5_sme, e-smith-ldap-5_2_0-23_el5_sme, e-smith-ldap-5_2_0-20_el5_sme, e-smith-ldap-5_2_0-54_el5_sme, e-smith-ldap-5_2_0-53_el5_sme, e-smith-ldap-5_2_0-9_el5_sme, e-smith-ldap-5_2_0-15_el5_sme, e-smith-ldap-5_2_0-17_el5_sme, e-smith-ldap-5_2_0-43_el5_sme, e-smith-ldap-5_2_0-47_el5_sme, e-smith-ldap-5_2_0-5_el5_sme, e-smith-ldap-5_2_0-25_el5_sme, e-smith-ldap-5_2_0-22_el5_sme, e-smith-ldap-5_2_0-40_el5_sme, e-smith-ldap-5_2_0-80_el5_sme, e-smith-ldap-5_2_0-12_el5_sme, e-smith-ldap-5_2_0-74_el5_sme, e-smith-ldap-5_2_0-3_el5_sme, e-smith-ldap-5_2_0-41_el5_sme, e-smith-ldap-5_2_0-63_el5_sme, e-smith-ldap-5_2_0-60_el5_sme, e-smith-ldap-5_2_0-2_el5_sme, e-smith-ldap-5_2_0-62_el5_sme, e-smith-ldap-5_2_0-42_el5_sme, e-smith-ldap-5_2_0-30_el5_sme, e-smith-ldap-5_2_0-38_el5_sme, e-smith-ldap-5_2_0-68_el5_sme, e-smith-ldap-5_2_0-67_el5_sme, e-smith-ldap-5_2_0-64_el5_sme, e-smith-ldap-5_2_0-16_el5_sme, HEAD
See changelog.

1 diff -ruN e-smith-ldap-5.2.0/createlinks e-smith-ldap-5.2.0.xx/createlinks
2 --- e-smith-ldap-5.2.0/createlinks 2006-03-15 16:17:43.000000000 -0500
3 +++ e-smith-ldap-5.2.0.xx/createlinks 2009-01-27 19:20:42.000000000 -0500
4 @@ -13,8 +13,6 @@
5 ));
6 }
7
8 -templates2events("/home/e-smith/db/ldap/ldif", "bootstrap-console-save");
9 -
10 event_link("ldap-update", "group-create", "25");
11 event_link("ldap-delete", "group-delete", "25");
12 event_link("ldap-update", "user-create", "25");
13 diff -ruN e-smith-ldap-5.2.0/root/etc/e-smith/templates/etc/openldap/slapd.conf/50database e-smith-ldap-5.2.0.xx/root/etc/e-smith/templates/etc/openldap/slapd.conf/50database
14 --- e-smith-ldap-5.2.0/root/etc/e-smith/templates/etc/openldap/slapd.conf/50database 2002-03-25 14:17:42.000000000 -0500
15 +++ e-smith-ldap-5.2.0.xx/root/etc/e-smith/templates/etc/openldap/slapd.conf/50database 2009-01-27 19:20:42.000000000 -0500
16 @@ -1 +1 @@
17 -database ldbm
18 +database bdb
19 diff -ruN e-smith-ldap-5.2.0/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/10memory e-smith-ldap-5.2.0.xx/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/10memory
20 --- e-smith-ldap-5.2.0/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/10memory 1969-12-31 19:00:00.000000000 -0500
21 +++ e-smith-ldap-5.2.0.xx/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/10memory 2009-01-27 19:20:42.000000000 -0500
22 @@ -0,0 +1,4 @@
23 +#
24 +# Set the database in memory cache size.
25 +#
26 +set_cachesize 0 2097152 0
27 diff -ruN e-smith-ldap-5.2.0/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs e-smith-ldap-5.2.0.xx/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs
28 --- e-smith-ldap-5.2.0/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs 1969-12-31 19:00:00.000000000 -0500
29 +++ e-smith-ldap-5.2.0.xx/root/etc/e-smith/templates/var/lib/ldap/DB_CONFIG/30logs 2009-01-27 19:20:42.000000000 -0500
30 @@ -0,0 +1,8 @@
31 +#
32 +# Set log values.
33 +#
34 +set_lg_regionmax 1048576
35 +set_lg_max 10485760
36 +set_lg_bsize 2097152
37 +set_lg_dir /var/log/bdb
38 +
39 diff -ruN e-smith-ldap-5.2.0/root/var/service/ldap/convert_ldif e-smith-ldap-5.2.0.xx/root/var/service/ldap/convert_ldif
40 --- e-smith-ldap-5.2.0/root/var/service/ldap/convert_ldif 1969-12-31 19:00:00.000000000 -0500
41 +++ e-smith-ldap-5.2.0.xx/root/var/service/ldap/convert_ldif 2009-01-27 19:20:42.000000000 -0500
42 @@ -0,0 +1,57 @@
43 +#! /usr/bin/perl
44 +
45 +use strict;
46 +use warnings;
47 +
48 +
49 +use Net::LDAP::LDIF;
50 +use esmith::util;
51 +
52 +my $old = shift;
53 +my $new = shift;
54 +
55 +my $ldif = Net::LDAP::LDIF->new( "/dev/stdin", "r", onerror => 'undef' );
56 +my $writer = Net::LDAP::LDIF->new("/dev/stdout", "w", onerror => 'undef' );
57 +
58 +$new = esmith::util::ldapBase($new);
59 +$old = esmith::util::ldapBase($old);
60 +
61 +while( not $ldif->eof())
62 +{
63 + my $entry = $ldif->read_entry();
64 + if ($ldif->error())
65 + {
66 + print "Error msg: ", $ldif->error(), "\n";
67 + print "Error lines:\n", $ldif->error_lines(), "\n";
68 + next;
69 + }
70 + next unless $entry;
71 + my $dn = $entry->dn;
72 + my @object_classes = $entry->get_value('objectClass');
73 + my %object_classes = map { $_ => 1 } @object_classes;
74 + if ($dn eq $old)
75 + {
76 + # this is the domain container object - objectClasses will be
77 + # 'top' and 'domain'
78 + my $dc = $new;
79 + $dc =~ s/,.*//g;
80 + $dc =~ s/^dc=//;
81 + $entry->replace(dc => $dc);
82 + }
83 + if ($object_classes{group})
84 + {
85 + # We used to create group entries with invalid objectClass group
86 + # - fix these if we find them
87 + # possibly not required any more, but harmless
88 + @object_classes = grep { $_ ne 'group' } @object_classes;
89 + $entry->replace(objectClass => [ @object_classes, 'posixGroup' ] );
90 + }
91 + # do any other object transformations
92 +
93 + # Update basedb suffix
94 + $dn =~ s/$old$/$new/;
95 + $entry->dn($dn);
96 + $writer->write($entry);
97 +}
98 +$ldif->done( );
99 +
100 diff -ruN e-smith-ldap-5.2.0/root/var/service/ldap/run e-smith-ldap-5.2.0.xx/root/var/service/ldap/run
101 --- e-smith-ldap-5.2.0/root/var/service/ldap/run 2008-08-20 17:26:21.000000000 -0400
102 +++ e-smith-ldap-5.2.0.xx/root/var/service/ldap/run 2009-01-27 19:20:42.000000000 -0500
103 @@ -1,28 +1,52 @@
104 #! /bin/sh
105
106 domain=$(/sbin/e-smith/config get DomainName)
107 +old_domain=$(readlink ldif)
108 +
109 +if [ -n "$old_domain" ]
110 +then
111 + old_domain=$(basename $old_domain | sed s/.ldif//)
112 + old_ldif="/home/e-smith/db/ldap/$old_domain.ldif"
113 +fi
114 +
115 ldif="/home/e-smith/db/ldap/$domain.ldif"
116
117 -if [ -e ldif ]
118 +if [ "$old_domain" != "$domain" ]
119 then
120 - old_ldif=$(readlink ldif)
121 - if [ "$old_ldif" != "$ldif" ]
122 - then
123 - # The domain name has changed, so we need to delete
124 - # the old directory contents. We still have the old
125 - # dump.
126 - find /var/lib/ldap -type f | xargs rm -f
127 - fi
128 + # The domain name has changed, so we need to delete
129 + # the old directory contents. We still have the old
130 + # dump.
131 + find /var/lib/ldap -type f | xargs rm -f
132 +fi
133 +
134 +if [ -f /var/lib/ldap/nextid.dbb ]
135 +then
136 + # We are upgrading from an earlier version which used
137 + # ldbm backend format. Delete the backend files, and
138 + # restore from ldif
139 + find /var/lib/ldap -type f | xargs rm -f
140 fi
141
142 # Set up symlink for ldap dump at shutdown
143 ln -sf $ldif ./ldif
144
145 +/sbin/e-smith/expand-template /var/lib/ldap/DB_CONFIG
146 +
147 # Prime directory if required
148 -if [ \! -f /var/lib/ldap/nextid.dbb -a -f $ldif ]
149 +if [ \! -f /var/lib/ldap/id2entry.bdb ]
150 then
151 - sed 's/objectClass: group/objectClass: posixGroup/' < $ldif | \
152 - setuidgid ldap slapadd -c
153 + if [ -e "$old_ldif" ]
154 + then
155 + perl ./convert_ldif $old_domain $domain < $old_ldif | \
156 + setuidgid ldap slapadd -c
157 + else
158 + if [ \! -e "$ldif" ]
159 + then
160 + /sbin/e-smith/expand-template /home/e-smith/db/ldap/ldif
161 + ldif="/home/e-smith/db/ldap/ldif"
162 + fi
163 + setuidgid ldap slapadd -c < $ldif
164 + fi
165 fi
166
167 # Now run daemon

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