mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-03 21:50:49 -05:00
Fix schema undo crash
This commit is contained in:
parent
2437abac38
commit
d316b89bc3
1 changed files with 16 additions and 8 deletions
|
|
@ -1149,10 +1149,14 @@ config_generic(ConfigArgs *c) {
|
|||
break;
|
||||
|
||||
case CFG_OC: {
|
||||
CfEntryInfo *ce = c->ca_entry->e_private;
|
||||
/* can't modify the hardcoded schema */
|
||||
if ( ce->ce_parent->ce_type == Cft_Global )
|
||||
return 1;
|
||||
CfEntryInfo *ce;
|
||||
/* Can be NULL when undoing a failed add */
|
||||
if ( c->ca_entry ) {
|
||||
ce = c->ca_entry->e_private;
|
||||
/* can't modify the hardcoded schema */
|
||||
if ( ce->ce_parent->ce_type == Cft_Global )
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
cfn = c->private;
|
||||
if ( c->valx < 0 ) {
|
||||
|
|
@ -1183,10 +1187,14 @@ config_generic(ConfigArgs *c) {
|
|||
break;
|
||||
|
||||
case CFG_ATTR: {
|
||||
CfEntryInfo *ce = c->ca_entry->e_private;
|
||||
/* can't modify the hardcoded schema */
|
||||
if ( ce->ce_parent->ce_type == Cft_Global )
|
||||
return 1;
|
||||
CfEntryInfo *ce;
|
||||
/* Can be NULL when undoing a failed add */
|
||||
if ( c->ca_entry ) {
|
||||
ce = c->ca_entry->e_private;
|
||||
/* can't modify the hardcoded schema */
|
||||
if ( ce->ce_parent->ce_type == Cft_Global )
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
cfn = c->private;
|
||||
if ( c->valx < 0 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue