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

Annotation of /rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-rename_old_record_fix2.patch

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


Revision 1.1 - (hide annotations) (download)
Sat Sep 25 21:23:55 2010 UTC (13 years, 8 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-36_el5_sme
* Sat Sep 25 2010 Shad L. Lords <slords@mail.com> 5.2.0-36.sme
- Ensure requires attributes are present for rename [SME: 6235]

1 slords 1.1 diff -up e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.rename_old_record_fix2 e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update
2     --- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.rename_old_record_fix2 2010-09-25 15:17:08.000000000 -0600
3     +++ e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-09-25 15:18:23.000000000 -0600
4     @@ -325,8 +325,16 @@ foreach my $dn (keys %$updates)
5     if ($code == 32)
6     {
7     my ($newdn, $newbase) = split /,/, $dn, 2;
8     +
9     + # Ensure key entry exist in old record before renaming
10     + $result = $ldap->modify( "$oldfilter,$oldsearchbase", replace => { split('=', $newdn) } );
11     + warn "failed to rename old entry $oldfilter,$oldsearchbase: ", $result->error if $result->code;
12     +
13     + # Move old record to new location
14     $result = $ldap->moddn( "$oldfilter,$oldsearchbase", newrdn => $newdn, newsuperior => $newbase, deleteoldrdn => 1 );
15     warn "failed to rename old entry $oldfilter,$oldsearchbase: ", $result->error if $result->code;
16     +
17     + # Set things up as if we had found the new entry
18     $code = $oldresult->code;
19     @objectClass = $oldresult->entry(0)->get_value('objectClass');
20     }

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