Hi all,
I use the ldapsearch command as a workaround AD bug. i parse the output of
ldapsearch with Net::LDAP::LDIF.
so i discovered strange LDAP entries.
% perl -e 'open X,q(ldapsearch blah |); print while <X>' > A
% grep search A
# search result
search: 2
those lines doesn't appears when i ldapsearch blah > A
the problem is that it make LDIF.pm failed . so i've hacked LDIF.pm to be sure :
168 if (@ldif <= 1) {
169 $self->_error("LDIF entry is not valid", @ldif);
170 return;
171 } else {
172 warn 'hard debug : >' , $ldif[0] , "<\n";
173 if (not ( $ldif[0] =~ s/^dn:(:?) *//) ) {
174 $self->_error("First line of LDIF entry does not begin with
'dn:'", @ldif);
175 return;
176 }
177 }
when i run my perl script :
hard debug : >search: 2<
First line of LDIF entry does not begin with 'dn:' at liste_etudiants_univr.pl
line 20
can those lines brake Net::LDAP too ?
regards
mc