Commit 3d908bcd authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Quanah Gibson-Mount
Browse files

ITS#9758 Make sure we don't end up with duplicates in entry

parent da73c184
...@@ -214,6 +214,10 @@ bs_cf_gen( ConfigArgs *c ) ...@@ -214,6 +214,10 @@ bs_cf_gen( ConfigArgs *c )
if ( verbs_to_mask( c->argc, c->argv, bs_exts, &adds ) ) { if ( verbs_to_mask( c->argc, c->argv, bs_exts, &adds ) ) {
return LDAP_INVALID_SYNTAX; return LDAP_INVALID_SYNTAX;
} }
/* Tolerate overlaps in slapd.conf */
if ( c->op != SLAP_CONFIG_ADD && adds & si->si_extensions ) {
return LDAP_TYPE_OR_VALUE_EXISTS;
}
si->si_extensions |= adds; si->si_extensions |= adds;
return 0; return 0;
} }
...@@ -222,6 +226,10 @@ bs_cf_gen( ConfigArgs *c ) ...@@ -222,6 +226,10 @@ bs_cf_gen( ConfigArgs *c )
if ( verbs_to_mask( c->argc, c->argv, ov_ops, &adds ) ) { if ( verbs_to_mask( c->argc, c->argv, ov_ops, &adds ) ) {
return LDAP_INVALID_SYNTAX; return LDAP_INVALID_SYNTAX;
} }
/* Tolerate overlaps in slapd.conf */
if ( c->op != SLAP_CONFIG_ADD && adds & si->si_ops ) {
return LDAP_TYPE_OR_VALUE_EXISTS;
}
si->si_ops |= adds; si->si_ops |= adds;
return 0; return 0;
} }
...@@ -230,6 +238,10 @@ bs_cf_gen( ConfigArgs *c ) ...@@ -230,6 +238,10 @@ bs_cf_gen( ConfigArgs *c )
if ( verbs_to_mask( c->argc, c->argv, ov_resps, &adds ) ) { if ( verbs_to_mask( c->argc, c->argv, ov_resps, &adds ) ) {
return LDAP_INVALID_SYNTAX; return LDAP_INVALID_SYNTAX;
} }
/* Tolerate overlaps in slapd.conf */
if ( c->op != SLAP_CONFIG_ADD && adds & si->si_resps ) {
return LDAP_TYPE_OR_VALUE_EXISTS;
}
si->si_resps |= adds; si->si_resps |= adds;
return 0; return 0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment