BTW I use sasl to authenticate ( I tried both Authen-SASL-2.10 and 2.11)
Markus
"Markus Moeller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I noticed a problem with perl-ldap-0.36 compared to perl-ldap-0.34. I have
the following simple code
....
$mesg = $ldap->search( # perform a search
base => $bind_path,
filter => "(userprincipalname=$user)",
timelimit => 2,
attrs => ['mail',
'useraccountcontrol',
'userprincipalname']
);
$mesg->code && die $mesg->error;
foreach $entry ($mesg->entries) {
$mail = $entry->get_value('mail');
$useraccountcontrol = $entry->get_value('useraccountcontrol');
$userprincipalname = $entry->get_value('userprincipalname');
}
$mesg = $ldap->unbind; # take down session
my $locked = ($useraccountcontrol & 0x0002)?"Yes":"No" if defined
$useraccountcontrol;
print("Retrieved LDAP Attributes:\n");
print("User-Mail = $mail\n");
print("User-Account-Control = $useraccountcontrol\n");
print("User-Account-Locked = $locked \n");
print("User-Principal-name = $userprincipalname\n");
....
When I use version 0.34 and a userprincipalname which does not exist I
get:
Retrieved LDAP Attributes:
User-Mail =
User-Account-Control =
User-Account-Locked =
User-Principal-name =
but with 0.3.6 I get an error:
Broken pipe at ./LDAP-AD-query.pl line 98.
which is line
$mesg->code && die $mesg->error;
I think that is a wrong behavious of version 0.36
Markus
"Graham Barr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
The release have been uploaded to PAUSE and should be on CPAN soon.
file: $CPAN/authors/id/G/GB/GBARR/perl-ldap-0.36.tar.gz
size: 250315 bytes
md5: 7bf59f7de52fc07cc8c1a7fd354e583f
file: $CPAN/authors/id/G/GB/GBARR/Authen-SASL-2.11.tar.gz
size: 47631 bytes
md5: 1b13b9305d8dfd2017300ac9401a74b3
Graham.