summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/back-ldbm/ldbm_modify.c
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-02-01 13:22:02 -0800
committerNoriko Hosoi <nhosoi@redhat.com>2010-02-01 13:22:02 -0800
commitc9c424c34c703082d7da3e4b2f3c366f81185a58 (patch)
tree3285736637bafebbaf28346b9978d8c0a9cb56cc /ldap/servers/slapd/back-ldbm/ldbm_modify.c
parent1378b056d9662a5667e86f3834e0d82c1610e6a6 (diff)
downloadds-c9c424c34c703082d7da3e4b2f3c366f81185a58.tar.gz
ds-c9c424c34c703082d7da3e4b2f3c366f81185a58.tar.xz
ds-c9c424c34c703082d7da3e4b2f3c366f81185a58.zip
555577 - Syntax validation fails for "ou=NetscapeRoot" tree
https://bugzilla.redhat.com/show_bug.cgi?id=555577 [See comment 7 of the bug] DistinguishName validation slapi_dn_syntax_check should be called only when nsslapd-dn-validate-strict is on.
Diffstat (limited to 'ldap/servers/slapd/back-ldbm/ldbm_modify.c')
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_modify.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 9a0bea07..165e6555 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -224,12 +224,15 @@ ldbm_back_modify( Slapi_PBlock *pb )
{
goto error_return;
}
- ldap_result_code = slapi_dn_syntax_check(pb, addr->dn, 1);
- if (ldap_result_code)
+ if (config_get_dn_validate_strict())
{
- ldap_result_code = LDAP_INVALID_DN_SYNTAX;
- slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
- goto error_return;
+ ldap_result_code = slapi_dn_syntax_check(pb, addr->dn, 1);
+ if (ldap_result_code)
+ {
+ ldap_result_code = LDAP_INVALID_DN_SYNTAX;
+ slapi_pblock_get(pb, SLAPI_PB_RESULT_TEXT, &ldap_result_message);
+ goto error_return;
+ }
}
dblayer_txn_init(li,&txn);