mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 08:39:37 -05:00
ITS#5571 prevent Adds from displacing {0}config
This commit is contained in:
parent
b716280345
commit
a5d0e36798
1 changed files with 5 additions and 0 deletions
|
|
@ -3992,6 +3992,11 @@ cfAddDatabase( CfEntryInfo *p, Entry *e, struct config_args_s *ca )
|
|||
if ( p->ce_type != Cft_Global ) {
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
/* config must be {0}, nothing else allowed */
|
||||
if ( !strncmp( e->e_nname.bv_val, "olcDatabase={0}", STRLENOF("olcDatabase={0}")) &&
|
||||
strcmp( e->e_nname.bv_val + STRLENOF("olcDatabase={0}"), "config" )) {
|
||||
return LDAP_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
ca->be = frontendDB; /* just to get past check_vals */
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue