/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2007 The OpenLDAP Foundation.
+ * Copyright 1999-2012 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
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 );
}
}
done:;
- fprintf( stderr, " PID=%ld - Add/Delete done (%d).\n", (long) pid, rc );
+ fprintf( stderr, " PID=%ld - Add/Delete done (%d).\n", (long) pid, rc );
ldap_unbind_ext( ld, NULL, NULL );
}