]> git.sur5r.net Git - openldap/commitdiff
Should accept regular LDIF input
authorHoward Chu <hyc@openldap.org>
Thu, 3 Apr 2008 08:50:19 +0000 (08:50 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 3 Apr 2008 08:50:19 +0000 (08:50 +0000)
tests/progs/slapd-addel.c

index 87e4fdbe99d80a8af994b26b84ae9c435e52391f..f186f670b3380f25a39838613c893cb6a5e9110e 100644 (file)
@@ -278,7 +278,10 @@ get_add_entry( char *filename, LDAPMod ***mods )
 
                        if (( nl = strchr( line, '\r' )) || ( nl = strchr( line, '\n' )))
                                *nl = '\0';
-                       entry = strdup( line );
+                       nl = line;
+                       if ( !strncasecmp( nl, "dn: ", 4 ))
+                               nl += 4;
+                       entry = strdup( nl );
 
                }