浏览代码

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.

Noriko Hosoi 15 年之前
父节点
当前提交
dc2f7d0612
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      ldap/servers/slapd/back-ldbm/import-threads.c

+ 4 - 2
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);