mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix attribute deletion
This commit is contained in:
parent
eecd3d7fe1
commit
2bdc0819b4
@ -455,6 +455,7 @@ at_insert(
|
|||||||
/* replacing a deleted definition? */
|
/* replacing a deleted definition? */
|
||||||
if ( old_sat->sat_flags & SLAP_AT_DELETED ) {
|
if ( old_sat->sat_flags & SLAP_AT_DELETED ) {
|
||||||
AttributeType tmp;
|
AttributeType tmp;
|
||||||
|
AttributeDescription *ad;
|
||||||
|
|
||||||
/* Keep old oid, free new oid;
|
/* Keep old oid, free new oid;
|
||||||
* Keep old ads, free new ads;
|
* Keep old ads, free new ads;
|
||||||
@ -468,6 +469,14 @@ at_insert(
|
|||||||
tmp.sat_ad = sat->sat_ad;
|
tmp.sat_ad = sat->sat_ad;
|
||||||
*sat = tmp;
|
*sat = tmp;
|
||||||
|
|
||||||
|
/* Check for basic ad pointing at old cname */
|
||||||
|
for ( ad = old_sat->sat_ad; ad; ad=ad->ad_next ) {
|
||||||
|
if ( ad->ad_cname.bv_val == sat->sat_cname.bv_val ) {
|
||||||
|
ad->ad_cname = old_sat->sat_cname;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
at_clean( sat );
|
at_clean( sat );
|
||||||
at_destroy_one( air );
|
at_destroy_one( air );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user