Code Comments
Programming Forum and web based access to our favorite programming groups.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.
Post Follow-up to this messageI 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" <gbarr@pobox.com> wrote in message
news:DDA8844F-0EFA-428A-B458-57F54C7B1932@pobox.com...
> 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.
>
>
Post Follow-up to this messageBTW I use sasl to authenticate ( I tried both Authen-SASL-2.10 and 2.11)
Markus
"Markus Moeller" <huaraz@moeller.plus.com> wrote in message
news:fv1svl$5h4$1@ger.gmane.org...
>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" <gbarr@pobox.com> wrote in message
> news:DDA8844F-0EFA-428A-B458-57F54C7B1932@pobox.com...
>
>
>
Post Follow-up to this messageIt seems to be related with Cyrus SASL. If I select use Authen::SASL qw(Perl); it works but with use Authen::SASL; it fails with the mentioned error. Markus "Markus Moeller" <huaraz@moeller.plus.com> wrote in message news:fv20ko$fh0$1@ger.gmane.org... > BTW I use sasl to authenticate ( I tried both Authen-SASL-2.10 and 2.11) > > Markus > > "Markus Moeller" <huaraz@moeller.plus.com> wrote in message > news:fv1svl$5h4$1@ger.gmane.org... > > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.