Hi Graham, thanks for your response.
Graham Barr <[EMAIL PROTECTED]> writes:
> Chris has been staring into his crystal ball again, 0.17 is the latest.
Ah ... OK. :-)
>> It's not Red Hat but SunOS 5.9 (but this is probably not important in
>> this case) and in my initial mail I have said that I *must*
>> convert/mangle (some, but some not) utf8 strings to ascii, and that
>> tr/// is not working without "use encoding 'utf8'". But _with_ utf8 I
>> get "Bad ASN PDU" from
>>
>> /usr/local/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm
>>
>> So I'm stuck here.
>>
>> Question: is it safe to just comment out this sanity check in IO.pm?
>>
>> elsif (!$len && !$tch) {
>> die "Bad ASN PDU" unless $depth;
>> unless (--$depth) {
>> last;
>> }
>> }
>>
>> ... or somebody must fix bug in $ldap->search in Net::LDAP?
> That looks like it is in the code reading a packet from the network,
> which is a different problem to the one Chris is refering to.
> Can you turn on debug with Net::LDAP by passing debug=>15 and post
> what it reports that it read just before the error
Nothing - absolutly nothing. I tried with my main program and example
script which I posted in my initial mail on list.
(mvz){lav}[o2l]$ perl -w bug.pl
Use of uninitialized value in ord at
/usr/local/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm line 161, <RAZLIKA> line 1.
Bad ASN PDU at /usr/local/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm line 178,
<RAZLIKA> line 1.
# This is test with commented out "use encoding 'utf8'"
(mvz){lav}[o2l]$ perl -w bug.pl
Ä?Ä?Ĺ˝Ĺ?Ä?Ä?Ä?ŞťÄ?
Ä?Ä?Ĺ˝Ĺ?Ä?Ä?Ä?ŞťÄ?
... as you see, I don't get an error, but utf8 strings ar *not* tr///'ed
into cczsd like it should be when I use utf8 encoding.
(bug.pl is an example script from my first post).
I have put debug like this:
$mesg = ($ldap->search
(base => $search_base, debug => 15, scope => 'sub', filter => "$filt"));
Am I doing something stupid? Did you mean to put "debug => 15" exactly
where I put it? Please be patient - I'm a perl newbee. :-\
truss -t open perl -w bug.pl
Last file open()ed by perl is Filter.pm according to truss(1).
open64("/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/Net/LDAP/Filter.pm",
O_RDONLY) Err#2 ENOENT
open64("/usr/local/lib/perl5/site_perl/5.8.0/Net/LDAP/Filter.pm", O_RDONLY) = 8
Use of uninitialized value in ord at
/usr/local/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm line 161, <RAZLIKA> line 1.
Bad ASN PDU at /usr/local/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm line 178,
<RAZLIKA> line 1.
Last thing that perl see is this:
read(4, " 0\f", 2) = 2
read(4, "020101 a07\n01\004\004\0", 12) = 12
write(4, " 0 i020102 c d0418 o u =".., 107) = 107
read(4, " 082", 2) = 2
llseek(4, 0, SEEK_CUR) Err#29 ESPIPE
close(4)
For some reason $len and $tch in Convert/ASN1/IO.pm are 0 (tried with
print($len $tch\n)) if I not put attrs => ['<some_valid_existent_attribute>'] in
$ldap->search.
Hope this helps, I don't know what else to try and how to debug, but I
will be happy if you or anybody can help me.
--
The Network is the Filesystem