/[smeserver]/rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-email-domain-change.patch
ViewVC logotype

Contents of /rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-email-domain-change.patch

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


Revision 1.1 - (show annotations) (download)
Wed Jun 9 08:48:08 2010 UTC (14 years, 4 months ago) by filippocarletti
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-27_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-70_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-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-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-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-54_el5_sme, e-smith-ldap-5_2_0-53_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-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-74_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-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, HEAD
* Mon Jun  7 2010 Federico Simoncelli <federico.simoncelli@gmail.com> 5.2.0-22.sme
- Update email addresses on domain change (thanks Daniel) [SME: 5984]
- Update admin information (thanks Daniel) [SME: 6014]

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-ldap-5.2.0/root/var/service/ldap/convert_ldif mezzanine_patched_e-smith-ldap-5.2.0/root/var/service/ldap/convert_ldif
2 --- e-smith-ldap-5.2.0/root/var/service/ldap/convert_ldif 2010-06-04 00:17:22.000000000 +0200
3 +++ mezzanine_patched_e-smith-ldap-5.2.0/root/var/service/ldap/convert_ldif 2010-06-04 00:17:20.000000000 +0200
4 @@ -7,14 +7,14 @@
5 use Net::LDAP::LDIF;
6 use esmith::util;
7
8 -my $old = shift;
9 -my $new = shift;
10 +my $olddomain = shift;
11 +my $newdomain = shift;
12
13 my $ldif = Net::LDAP::LDIF->new( "/dev/stdin", "r", onerror => 'undef' );
14 my $writer = Net::LDAP::LDIF->new("/dev/stdout", "w", onerror => 'undef' );
15
16 -$new = esmith::util::ldapBase($new);
17 -$old = esmith::util::ldapBase($old);
18 +my $new = esmith::util::ldapBase($newdomain);
19 +my $old = esmith::util::ldapBase($olddomain);
20
21 while( not $ldif->eof())
22 {
23 @@ -48,6 +48,16 @@
24 }
25 # do any other object transformations
26
27 + # Update the mail attributes
28 + if ($entry->exists('mail')){
29 + my @newmails = ();
30 + foreach ($entry->get_value('mail')){
31 + $_ =~ s/\@$olddomain$/\@$newdomain/;
32 + push (@newmails,$_);
33 + }
34 + $entry->replace(mail => [ @newmails ]);
35 + }
36 +
37 # Update basedb suffix
38 $dn =~ s/$old$/$new/;
39 $entry->dn($dn);

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