summaryrefslogtreecommitdiffstats
path: root/ldap
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@jiji.sjc.redhat.com>2010-03-11 16:37:42 -0800
committerNoriko Hosoi <nhosoi@jiji.sjc.redhat.com>2010-03-11 16:37:42 -0800
commitdc2f7d061279089651fb56b57183496cf6926fc7 (patch)
tree7e602e3e752c9d876d1f12f722a2c836372a09cb /ldap
parentf11afee0ca0c4039cebc0efe4388b95776b6da4b (diff)
downloadds-dc2f7d061279089651fb56b57183496cf6926fc7.tar.gz
ds-dc2f7d061279089651fb56b57183496cf6926fc7.tar.xz
ds-dc2f7d061279089651fb56b57183496cf6926fc7.zip
570107 - The import of LDIFs with base-64 encoded DNs fails,
modrdn with non-ASCII new rdn incorrect https://bugzilla.redhat.com/show_bug.cgi?id=570107 Description: When getting the DN value from the raw ldif file, it was strictly checking "dn: ", which was incomplete. We should have checked "dn:: " for the Base64 encoded DN. This patch is adding the case.
Diffstat (limited to 'ldap')
-rw-r--r--ldap/servers/slapd/back-ldbm/import-threads.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c b/ldap/servers/slapd/back-ldbm/import-threads.c
index 37e1f4df..6cc1b66c 100644
--- a/ldap/servers/slapd/back-ldbm/import-threads.c
+++ b/ldap/servers/slapd/back-ldbm/import-threads.c
@@ -521,10 +521,12 @@ import_producer(void *param)
if (!(str2entry_flags & SLAPI_STR2ENTRY_INCLUDE_VERSION_STR) &&
entryrdn_get_switch()) { /* subtree-rename: on */
char *dn = NULL;
- int rc = 0; /* estr should start with "dn: " */
+ int rc = 0; /* estr should start with "dn: " or "dn:: " */
if (strncmp(estr, "dn: ", 4) &&
- NULL == strstr(estr, "\ndn: ")) { /* in case comments precedes
+ NULL == strstr(estr, "\ndn: ") && /* in case comments precedes
the entry */
+ strncmp(estr, "dn:: ", 5) &&
+ NULL == strstr(estr, "\ndn:: ")) { /* ditto */
import_log_notice(job, "WARNING: skipping bad LDIF entry (not "
"starting with \"dn: \") ending line %d of file \"%s\"",
curr_lineno, curr_filename);