Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

release of perl-ldap-0.36 and Authen-SASL-2.11
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.


Report this thread to moderator Post Follow-up to this message
Old Post
Graham Barr
04-22-08 01:47 AM


Re: release of perl-ldap-0.36 and Authen-SASL-2.11
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...
> 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.
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Markus Moeller
04-27-08 01:36 PM


Re: release of perl-ldap-0.36 and Authen-SASL-2.11
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...
>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... 
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Markus Moeller
04-28-08 01:01 AM


Re: release of perl-ldap-0.36 and Authen-SASL-2.11
It 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... 
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Markus Moeller
04-28-08 01:01 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

LDAP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:33 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.