From ada28a179275f1687d1f700444e3cf19d2868449 Mon Sep 17 00:00:00 2001
From: Quanah Gibson-Mount <quanah@openldap.org>
Date: Mon, 14 Apr 2008 23:43:13 +0000
Subject: [PATCH] Should accept regular LDIF input

---
 tests/progs/slapd-addel.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/progs/slapd-addel.c b/tests/progs/slapd-addel.c
index 87e4fdbe99..f186f670b3 100644
--- a/tests/progs/slapd-addel.c
+++ b/tests/progs/slapd-addel.c
@@ -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 );
 
 		}
 
-- 
GitLab