ldap/servers/slapd/back-ldbm/import-threads.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit dc2f7d061279089651fb56b57183496cf6926fc7
Author: Noriko Hosoi <nhosoi(a)jiji.sjc.redhat.com>
Date: Thu Mar 11 16:37:42 2010 -0800
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.
diff --git a/ldap/servers/slapd/back-ldbm/import-threads.c
b/ldap/servers/slapd/back-ldbm/import-threads.c
index 37e1f4d..6cc1b66 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);