perl.ldap http://www.nntp.perl.org/group/perl.ldap/ ... Copyright 1998-2008 perl.org Tue, 07 Oct 2008 21:29:02 +0000 ask@perl.org Re: managing AD users through Net::LDAP by Peter Karman Guillaume Rousse wrote on 10/07/2008 04:08 AM:<br/>&gt; Hello list.<br/>&gt; <br/>&gt; Thanks to archives of this ML, as well as source code from<br/>&gt; Net::LDAP::Class::User::AD package, I&#39;m able to create functional AD<br/>&gt; user entries from Net::LDAP. <br/><br/>Any particular reason you didn&#39;t just use Net::LDAP::Class::User::AD<br/>directly?<br/><br/><br/>&gt; Third, is there a recommended practice for organising user and group<br/>&gt; entries in AD ? In OpenLDAP world, the standard practice is to have a<br/>&gt; &#39;user&#39; and a &#39;group&#39; branch, whereas AD setup I saw sofar had a more<br/>&gt; subdivised organisation (one branch per group, for instance).<br/>&gt; <br/><br/>I don&#39;t know of recommended practices; I can, however, speak to how<br/>Net::LDAP::Class::User::AD does it and how we do it at $work, which are<br/>different (despite the fact that I wrote Net::LDAP::Class).<br/><br/>NLCUA assumes you are using the primaryGroupID attribute in AD, since<br/>that attribute is required for Unix compatability even though AD doesn&#39;t<br/>itself use it. In other words, the Net::LDAP::Class basic API assumes<br/>every user has a primary group and so the AD classes implement that API.<br/> AD has Security Groups which can be used like OpenLDAP groups, and that<br/>is what Net::LDAP::Class::Group::AD assumes.<br/><br/>However, at $work we use OrgUnits with AD in a way analogous to how<br/>OpenLDAP uses primary groups. We use Security Groups in AD to control<br/>which resources a a User has access to (e.g., we have just a few<br/>Security Groups, while we have 100s of OrgUnits). I actually have a<br/>Net::LDAP::Class-derived class for OrgUnit and each User class uses a<br/>OrgUnit class as its primary group.<br/><br/>I think the $work approach succeeds because of our particular security<br/>requirements. I hope that Net::LDAP::Class::*::AD can also work for<br/>folks implementing Unix-style organization for their AD server.<br/><br/>-- <br/>Peter Karman . peter@peknet.com . http://peknet.com/<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2978.html Tue, 07 Oct 2008 06:43:41 +0000 managing AD users through Net::LDAP by Guillaume Rousse Hello list.<br/><br/>Thanks to archives of this ML, as well as source code from <br/>Net::LDAP::Class::User::AD package, I&#39;m able to create functional AD <br/>user entries from Net::LDAP. However, I&#39;m a bit curious about some <br/>issues. I realise they are not strictly Net::LDAP issues, but as many <br/>people here have strong experience in the domain, that seems a good <br/>place to ask :)<br/><br/>First, unless there is dark magic behind, I imagine than just setting <br/>unicodePwd attribute only creates an LDAP passord for the user, not a <br/>kerberos principal as well. So, should users also run an external tool <br/>(smbpasswd, for instance) to fully initialise their account ?<br/><br/>Second, I&#39;m used with OpenLDAP to create simpleSecurityObject entries <br/>with dedicated ACLs, so as to manage sensible attributes finely. Is it <br/>possible with Windows AD to create a system user, with the only <br/>abitility to perform password changes ?<br/><br/>Third, is there a recommended practice for organising user and group <br/>entries in AD ? In OpenLDAP world, the standard practice is to have a <br/>&#39;user&#39; and a &#39;group&#39; branch, whereas AD setup I saw sofar had a more <br/>subdivised organisation (one branch per group, for instance).<br/><br/>Thanks for your input.<br/>-- <br/>Guillaume Rousse<br/>Moyens Informatiques - INRIA Futurs<br/>Tel: 01 69 35 69 62<br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2977.html Tue, 07 Oct 2008 02:08:36 +0000 Re: [PATCH] LDAP Content synchronisation fixes (cont.) by Graham Barr <br/>On Oct 5, 2008, at 2:02 PM, Mathieu Parent wrote:<br/><br/>&gt; Subject: [PATCH] LDAP Content synchronisation fixes<br/>&gt; - Fixed parsing of SyncState: avoid emptying the value<br/>&gt; - Fill in default values in Intermediate::SyncInfo<br/><br/>Thanks. This patch has been applied to the next branch<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2976.html Mon, 06 Oct 2008 07:47:00 +0000 [PATCH] LDAP Content synchronisation fixes (cont.) by Mathieu Parent Subject: [PATCH] LDAP Content synchronisation fixes<br/> - Fixed parsing of SyncState: avoid emptying the value<br/> - Fill in default values in Intermediate::SyncInfo<br/><br/>---<br/> lib/Net/LDAP/Control/SyncState.pm | 10 +++++-----<br/> lib/Net/LDAP/Intermediate/SyncInfo.pm | 21 +++++++++++++++++++++<br/> 2 files changed, 26 insertions(+), 5 deletions(-)<br/><br/>diff --git a/lib/Net/LDAP/Control/SyncState.pm<br/>b/lib/Net/LDAP/Control/SyncState.pm<br/>index e47c78a..569553b 100644<br/>--- a/lib/Net/LDAP/Control/SyncState.pm<br/>+++ b/lib/Net/LDAP/Control/SyncState.pm<br/>@@ -8,7 +8,7 @@ use vars qw(@ISA $VERSION);<br/> use Net::LDAP::Control;<br/><br/> @ISA = qw(Net::LDAP::Control);<br/>-$VERSION = &quot;0.01&quot;;<br/>+$VERSION = &quot;0.02&quot;;<br/><br/> use Net::LDAP::ASN qw(syncStateValue);<br/> use strict;<br/>@@ -16,13 +16,13 @@ use strict;<br/> sub init {<br/> my($self) = @_;<br/><br/>- delete $self-&gt;{asn};<br/>-<br/>- unless (exists $self-&gt;{value}) {<br/>+ if (exists $self-&gt;{value}) {<br/>+ $self-&gt;{asn} = $syncStateValue-&gt;decode(delete $self-&gt;{value});<br/>+ } else {<br/> $self-&gt;{asn} = {<br/> state =&gt; $self-&gt;{state} || &#39;&#39;,<br/> entryUUID =&gt; $self-&gt;{entryUUID} || &#39;&#39;,<br/>- cookie =&gt; $self-&gt;{cookie} || &#39;&#39;,<br/>+ cookie =&gt; defined($self-&gt;{cookie}) ? $self-&gt;{cookie} : &#39;&#39;,<br/> };<br/> }<br/><br/>diff --git a/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>b/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>index 73d1604..38e6109 100644<br/>--- a/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>+++ b/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>@@ -29,6 +29,27 @@ sub init {<br/> $self-&gt;{asn}{syncIdSet} =<br/> delete $self-&gt;{syncIdSet} if exists $self-&gt;{syncIdSet};<br/> }<br/>+ #$self-&gt;{asn}{refreshDelete}{refreshDone} defaults to TRUE<br/>+ if(defined($self-&gt;{asn}{refreshDelete})) {<br/>+ $self-&gt;{asn}{refreshDelete}{refreshDone} =<br/>+ defined($self-&gt;{asn}{refreshDelete}{refreshDone})<br/>+ ? $self-&gt;{asn}{refreshDelete}{refreshDone}<br/>+ : 1;<br/>+ }<br/>+ #$self-&gt;{asn}{refreshPresent}{refreshDone} defaults to TRUE<br/>+ if(defined($self-&gt;{asn}{refreshPresent})) {<br/>+ $self-&gt;{asn}{refreshPresent}{refreshDone} =<br/>+ defined($self-&gt;{asn}{refreshPresent}{refreshDone})<br/>+ ? $self-&gt;{asn}{refreshPresent}{refreshDone}<br/>+ : 1;<br/>+ }<br/>+ #$self-&gt;{asn}{syncIdSet}{refreshDeletes} defaults to FALSE<br/>+ if(defined($self-&gt;{asn}{syncIdSet})) {<br/>+ $self-&gt;{asn}{syncIdSet}{refreshDeletes} =<br/>+ defined($self-&gt;{asn}{syncIdSet}{refreshDeletes})<br/>+ ? $self-&gt;{asn}{syncIdSet}{refreshDeletes}<br/>+ : 0;<br/>+ }<br/><br/> $self;<br/> }<br/>-- <br/>1.5.6.5<br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2975.html Sun, 05 Oct 2008 12:02:32 +0000 Huge numbers of Constant Redefined errors by Bruce Johnson Version Perl 5.10<br/><br/>I installed Net::LDAP, Net::LDAPS and am now getting flooded with <br/>errors like this:<br/><br/>Constant subroutine <br/>ModPerl <br/>::ROOT <br/>::ModPerl <br/>::PerlRunPrefork <br/>::home_oraweb_perl_calendar2_calendar_2epl::LDAP_STRONG_AUTH_REQUIRED <br/>redefined at /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/ModPerl/ <br/>Util.pm line 69, &lt;DATA&gt; line 2845.<br/>Constant subroutine <br/>ModPerl <br/>::ROOT <br/>::ModPerl <br/>::PerlRunPrefork <br/>::home_oraweb_perl_calendar2_calendar_2epl::LDAP_RESULTS_TOO_LARGE <br/>redefined at /opt/lampp/lib/perl5/site_perl/5.10.0/i686-linux/ModPerl/ <br/>Util.pm line 69, &lt;DATA&gt; line 2845.<br/><br/>About 80-90 lines<br/><br/>Every time the ldap routine is created.<br/><br/>The program works, but it&#39;s hard finding real errors in this flood.<br/><br/><br/><br/>-- <br/>Bruce Johnson<br/>University of Arizona<br/>College of Pharmacy<br/>Information Technology Group<br/><br/>Institutions do not have opinions, merely customs<br/><br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2974.html Sat, 04 Oct 2008 08:33:18 +0000 Re: [PATCH] IntermediateMessage and LDAP Content synchronisation fixes by Graham Barr On Oct 4, 2008, at 8:30 AM, Mathieu Parent wrote:<br/>&gt; Subject: [PATCH] IntermediateMessage and LDAP Content <br/>&gt; synchronisation fixes:<br/>&gt; - Fix ASN parsing of syncRequestValue, syncDoneValue and syncInfoValue<br/>&gt; (attributes with default value are threated as optional values)<br/>&gt; - Renamed syncInfoValue ASN name to match RFC<br/>&gt; - Fixed parsing of SyncDone and SyncRequest: avoid emptying the value<br/>&gt; - Corrected Net::LDAP::Intermediate::SyncInfo parsing<br/>&gt; - Enable Net::LDAP::Intermediate::SyncInfo<br/>&gt; - Moved catching of IntermediateMessage from LDAP::Search to<br/>&gt; LDAP::Message (this is not specific to searches)<br/><br/>Thanks for the patch.<br/><br/>I have merged it onto the next branch at<br/><br/>http://git.goingon.net/?p=perl-ldap.git;a=shortlog;h=refs/heads/next<br/><br/>If others could test it that would be great.<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2973.html Sat, 04 Oct 2008 07:34:22 +0000 [PATCH] IntermediateMessage and LDAP Content synchronisation fixes by Mathieu Parent Subject: [PATCH] IntermediateMessage and LDAP Content synchronisation fixes:<br/> - Fix ASN parsing of syncRequestValue, syncDoneValue and syncInfoValue<br/> (attributes with default value are threated as optional values)<br/> - Renamed syncInfoValue ASN name to match RFC<br/> - Fixed parsing of SyncDone and SyncRequest: avoid emptying the value<br/> - Corrected Net::LDAP::Intermediate::SyncInfo parsing<br/> - Enable Net::LDAP::Intermediate::SyncInfo<br/> - Moved catching of IntermediateMessage from LDAP::Search to<br/> LDAP::Message (this is not specific to searches)<br/><br/>---<br/> lib/Net/LDAP/ASN.pm | 16 ++++++++--------<br/> lib/Net/LDAP/Control/SyncDone.pm | 15 ++++++---------<br/> lib/Net/LDAP/Control/SyncRequest.pm | 11 +++--------<br/> lib/Net/LDAP/Control/SyncState.pm | 3 ---<br/> lib/Net/LDAP/Intermediate.pm | 2 +-<br/> lib/Net/LDAP/Intermediate/SyncInfo.pm | 30 +++++++++++++++---------------<br/> lib/Net/LDAP/Message.pm | 20 ++++++++++++++++----<br/> lib/Net/LDAP/Search.pm | 15 +++------------<br/> 8 files changed, 52 insertions(+), 60 deletions(-)<br/><br/>diff --git a/lib/Net/LDAP/ASN.pm b/lib/Net/LDAP/ASN.pm<br/>index 82b7c17..9ba0913 100644<br/>--- a/lib/Net/LDAP/ASN.pm<br/>+++ b/lib/Net/LDAP/ASN.pm<br/>@@ -1,7 +1,7 @@<br/><br/> package Net::LDAP::ASN;<br/><br/>-$VERSION = &quot;0.07&quot;;<br/>+$VERSION = &quot;0.08&quot;;<br/><br/> use Convert::ASN1;<br/><br/>@@ -455,7 +455,7 @@ $asn-&gt;prepare(&lt;&lt;LDAP_ASN) or die $asn-&gt;error;<br/> refreshAndPersist (3)<br/> }<br/> cookie syncCookie OPTIONAL,<br/>- reloadHint BOOLEAN -- DEFAULT FALSE<br/>+ reloadHint BOOLEAN OPTIONAL -- DEFAULT FALSE<br/> }<br/><br/> syncStateValue ::= SEQUENCE {<br/>@@ -471,22 +471,22 @@ $asn-&gt;prepare(&lt;&lt;LDAP_ASN) or die $asn-&gt;error;<br/><br/> syncDoneValue ::= SEQUENCE {<br/> cookie syncCookie OPTIONAL,<br/>- refreshDeletes BOOLEAN -- DEFAULT FALSE<br/>+ refreshDeletes BOOLEAN OPTIONAL -- DEFAULT FALSE<br/> }<br/><br/> syncInfoValue ::= CHOICE {<br/> newcookie [0] syncCookie,<br/> refreshDelete [1] SEQUENCE {<br/>- refreshDeleteCookie syncCookie OPTIONAL,<br/>- refreshDeleteDone BOOLEAN -- DEFAULT TRUE<br/>+ cookie syncCookie OPTIONAL,<br/>+ refreshDone BOOLEAN OPTIONAL -- DEFAULT TRUE<br/> }<br/> refreshPresent [2] SEQUENCE {<br/>- refreshDeletecookie syncCookie OPTIONAL,<br/>- refreshDeleteDone BOOLEAN -- DEFAULT TRUE<br/>+ cookie syncCookie OPTIONAL,<br/>+ refreshDone BOOLEAN OPTIONAL -- DEFAULT TRUE<br/> }<br/> syncIdSet [3] SEQUENCE {<br/> cookie syncCookie OPTIONAL,<br/>- refreshDeletes BOOLEAN, -- DEFAULT FALSE<br/>+ refreshDeletes BOOLEAN OPTIONAL, -- DEFAULT FALSE<br/> syncUUIDs SET OF syncUUID<br/> }<br/> }<br/>diff --git a/lib/Net/LDAP/Control/SyncDone.pm b/lib/Net/LDAP/Control/SyncDone.pm<br/>index 7fcb0d9..e8bc2ae 100644<br/>--- a/lib/Net/LDAP/Control/SyncDone.pm<br/>+++ b/lib/Net/LDAP/Control/SyncDone.pm<br/>@@ -8,22 +8,19 @@ use vars qw(@ISA $VERSION);<br/> use Net::LDAP::Control;<br/><br/> @ISA = qw(Net::LDAP::Control);<br/>-$VERSION = &quot;0.01&quot;;<br/>+$VERSION = &quot;0.02&quot;;<br/><br/> use Net::LDAP::ASN qw(syncDoneValue);<br/> use strict;<br/><br/>-# use some kind of hack here:<br/>-# - calling the control without args means: response,<br/>-# - giving an argument: means: request<br/> sub init {<br/> my($self) = @_;<br/><br/>- delete $self-&gt;{asn};<br/>-<br/>- unless (exists $self-&gt;{value}) {<br/>+ if (exists $self-&gt;{value}) {<br/>+ $self-&gt;{asn} = $syncDoneValue-&gt;decode(delete $self-&gt;{value});<br/>+ } else {<br/> $self-&gt;{asn} = {<br/>- cookie =&gt; $self-&gt;{cookie} || &#39;&#39;,<br/>+ cookie =&gt; defined($self-&gt;{cookie}) ? $self-&gt;{cookie} : &#39;&#39;,<br/> refreshDeletes =&gt; $self-&gt;{refreshDeletes} || &#39;0&#39;,<br/> };<br/> }<br/>@@ -36,7 +33,7 @@ sub cookie {<br/> $self-&gt;{asn} ||= $syncDoneValue-&gt;decode($self-&gt;{value});<br/> if (@_) {<br/> delete $self-&gt;{value};<br/>- return $self-&gt;{asn}{cookie} = shift || 0;<br/>+ return $self-&gt;{asn}{cookie} = defined($_[0]) ? $_[0] : &#39;&#39;;<br/> }<br/> $self-&gt;{asn}{cookie};<br/> }<br/>diff --git a/lib/Net/LDAP/Control/SyncRequest.pm<br/>b/lib/Net/LDAP/Control/SyncRequest.pm<br/>index b33868d..95cd716 100644<br/>--- a/lib/Net/LDAP/Control/SyncRequest.pm<br/>+++ b/lib/Net/LDAP/Control/SyncRequest.pm<br/>@@ -8,14 +8,11 @@ use vars qw(@ISA $VERSION);<br/> use Net::LDAP::Control;<br/><br/> @ISA = qw(Net::LDAP::Control);<br/>-$VERSION = &quot;0.01&quot;;<br/>+$VERSION = &quot;0.02&quot;;<br/><br/> use Net::LDAP::ASN qw(syncRequestValue);<br/> use strict;<br/><br/>-# use some kind of hack here:<br/>-# - calling the control without args means: response,<br/>-# - giving an argument: means: request<br/> sub init {<br/> my($self) = @_;<br/><br/>@@ -64,10 +61,8 @@ sub reloadHint {<br/><br/> sub value {<br/> my $self = shift;<br/>-<br/>- exists $self-&gt;{value}<br/>- ? $self-&gt;{value}<br/>- : $self-&gt;{value} = $syncRequestValue-&gt;encode($self-&gt;{asn});<br/>+ return $self-&gt;{value} if exists $self-&gt;{value};<br/>+ $self-&gt;{value} = $syncRequestValue-&gt;encode($self-&gt;{asn});<br/> }<br/><br/> 1;<br/>diff --git a/lib/Net/LDAP/Control/SyncState.pm<br/>b/lib/Net/LDAP/Control/SyncState.pm<br/>index b069e42..e47c78a 100644<br/>--- a/lib/Net/LDAP/Control/SyncState.pm<br/>+++ b/lib/Net/LDAP/Control/SyncState.pm<br/>@@ -13,9 +13,6 @@ $VERSION = &quot;0.01&quot;;<br/> use Net::LDAP::ASN qw(syncStateValue);<br/> use strict;<br/><br/>-# use some kind of hack here:<br/>-# - calling the control without args means: response,<br/>-# - giving an argument: means: request<br/> sub init {<br/> my($self) = @_;<br/><br/>diff --git a/lib/Net/LDAP/Intermediate.pm b/lib/Net/LDAP/Intermediate.pm<br/>index b95b849..288d785 100644<br/>--- a/lib/Net/LDAP/Intermediate.pm<br/>+++ b/lib/Net/LDAP/Intermediate.pm<br/>@@ -15,7 +15,7 @@ $VERSION = &quot;0.01&quot;;<br/><br/> my %Class2ResponseName = (<br/><br/>- #&#39;Net::LDAP::Intermediate::SyncInfo&#39; =&gt; LDAP_SYNC_INFO, #disabled<br/>as decoding doesn&#39;t work<br/>+ &#39;Net::LDAP::Intermediate::SyncInfo&#39; =&gt; LDAP_SYNC_INFO,<br/> );<br/><br/> my %ResponseName2Class = reverse %Class2ResponseName;<br/>diff --git a/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>b/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>index ed8205a..8d1814c 100644<br/>--- a/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>+++ b/lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>@@ -8,23 +8,26 @@ use vars qw(@ISA $VERSION);<br/> use Net::LDAP::Intermediate;<br/><br/> @ISA = qw(Net::LDAP::Intermediate);<br/>-$VERSION = &quot;0.01&quot;;<br/>+$VERSION = &quot;0.02&quot;;<br/><br/> use Net::LDAP::ASN qw(syncInfoValue);<br/> use strict;<br/><br/>-# use some kind of hack here:<br/>-# - calling the control without args means: response,<br/>-# - giving an argument: means: request<br/> sub init {<br/> my($self) = @_;<br/><br/>- delete $self-&gt;{asn};<br/>-<br/>- unless (exists $self-&gt;{responseValue}) {<br/>- $self-&gt;{asn} = {<br/>- newcookie =&gt; $self-&gt;{newcookie} || &#39;&#39;,<br/>- };<br/>+ if (exists $self-&gt;{responseValue}) {<br/>+ $self-&gt;{asn} = $syncInfoValue-&gt;decode(delete $self-&gt;{responseValue});<br/>+ } else {<br/>+ $self-&gt;{asn} = {};<br/>+ $self-&gt;{asn}{newcookie} =<br/>+ delete $self-&gt;{newcookie} if exists $self-&gt;{newcookie};<br/>+ $self-&gt;{asn}{refreshDelete} =<br/>+ delete $self-&gt;{refreshDelete} if exists $self-&gt;{refreshDelete};<br/>+ $self-&gt;{asn}{refreshPresent} =<br/>+ delete $self-&gt;{refreshPresent} if exists $self-&gt;{refreshPresent};<br/>+ $self-&gt;{asn}{syncIdSet} =<br/>+ delete $self-&gt;{syncIdSet} if exists $self-&gt;{syncIdSet};<br/> }<br/><br/> $self;<br/>@@ -32,11 +35,8 @@ sub init {<br/><br/> sub newcookie {<br/> my $self = shift;<br/>- $self-&gt;{asn} ||= $syncInfoValue-&gt;decode($self-&gt;{responseValue});<br/>- if (@_) {<br/>- delete $self-&gt;{responseValue};<br/>- return $self-&gt;{asn}{newcookie} = shift || 0;<br/>- }<br/>+ @_ ? ($self-&gt;{asn}{newcookie}=shift)<br/>+ : $self-&gt;{asn}{newcookie};<br/> $self-&gt;{asn}{cookie};<br/> }<br/><br/>diff --git a/lib/Net/LDAP/Message.pm b/lib/Net/LDAP/Message.pm<br/>index 5007afb..26e5eeb 100644<br/>--- a/lib/Net/LDAP/Message.pm<br/>+++ b/lib/Net/LDAP/Message.pm<br/>@@ -9,7 +9,7 @@ use Net::LDAP::ASN qw(LDAPRequest);<br/> use strict;<br/> use vars qw($VERSION);<br/><br/>-$VERSION = &quot;1.10&quot;;<br/>+$VERSION = &quot;1.11&quot;;<br/><br/> my $MsgID = 0;<br/><br/>@@ -142,9 +142,21 @@ sub decode { # $self, $pdu, $control<br/> # free up memory as we have a result so we will not need to re-send it<br/> delete $self-&gt;{pdu};<br/><br/>- # tell our LDAP client to forget us as this message has now completed<br/>- # all communications with the server<br/>- $self-&gt;parent-&gt;_forgetmesg($self);<br/>+ if ($data = delete $result-&gt;{protocolOp}{intermediateResponse}) {<br/>+<br/>+ my $intermediate = Net::LDAP::Intermediate-&gt;from_asn($data);<br/>+<br/>+ push(@{$self-&gt;{&#39;intermediate&#39;} ||= []}, $intermediate);<br/>+<br/>+ $self-&gt;{callback}-&gt;($self, $intermediate)<br/>+ if (defined $self-&gt;{callback});<br/>+<br/>+ return $self;<br/>+ } else {<br/>+ # tell our LDAP client to forget us as this message has now completed<br/>+ # all communications with the server<br/>+ $self-&gt;parent-&gt;_forgetmesg($self);<br/>+ }<br/><br/> $self-&gt;{callback}-&gt;($self)<br/> if (defined $self-&gt;{callback});<br/>diff --git a/lib/Net/LDAP/Search.pm b/lib/Net/LDAP/Search.pm<br/>index d8c3568..3dd6575 100644<br/>--- a/lib/Net/LDAP/Search.pm<br/>+++ b/lib/Net/LDAP/Search.pm<br/>@@ -13,7 +13,7 @@ use Net::LDAP::Filter;<br/> use Net::LDAP::Constant qw(LDAP_SUCCESS LDAP_DECODING_ERROR);<br/><br/> @ISA = qw(Net::LDAP::Message);<br/>-$VERSION = &quot;0.12&quot;;<br/>+$VERSION = &quot;0.13&quot;;<br/><br/><br/> sub first_entry { # compat<br/>@@ -36,6 +36,8 @@ sub decode {<br/><br/> return $self-&gt;SUPER::decode($result)<br/> if exists $result-&gt;{protocolOp}{searchResDone};<br/>+ return $self-&gt;SUPER::decode($result)<br/>+ if exists $result-&gt;{protocolOp}{intermediateResponse};<br/><br/> my $data;<br/> @{$self}{qw(controls ctrl_hash)} = ($result-&gt;{controls}, undef);<br/>@@ -64,17 +66,6 @@ sub decode {<br/><br/> return $self;<br/> }<br/>- elsif ($data = delete $result-&gt;{protocolOp}{intermediateResponse}) {<br/>-<br/>- my $intermediate = Net::LDAP::Intermediate-&gt;from_asn($data);<br/>-<br/>- push(@{$self-&gt;{&#39;intermediate&#39;} ||= []}, [$intermediate]);<br/>-<br/>- $self-&gt;{callback}-&gt;($self, $intermediate)<br/>- if (defined $self-&gt;{callback});<br/>-<br/>- return $self;<br/>- }<br/><br/> $self-&gt;set_error(LDAP_DECODING_ERROR, &quot;LDAP decode error&quot;);<br/> return;<br/>-- <br/>1.5.6.5<br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2972.html Sat, 04 Oct 2008 06:30:14 +0000 Re: after upgrade: glibc detected *** /usr/bin/perl: double free or corruption by Graham Barr On Oct 3, 2008, at 10:05 AM, Peter Daum wrote:<br/>&gt;&gt; Anyway, I suspect the issue is todo with calling s/// on the <br/>&gt;&gt; element of a tied hash.<br/>&gt;&gt; See if this reproduces the issue.<br/>&gt;&gt; {<br/>&gt;&gt; package Foo;<br/>&gt;&gt; use Tie::Hash;<br/>&gt;&gt; use base qw(Tie::StdHash);<br/>&gt;&gt; sub new {<br/>&gt;&gt; my $proto = shift;<br/>&gt;&gt; my $inner = bless {};<br/>&gt;&gt; my %outer;<br/>&gt;&gt; tie %outer, __PACKAGE__, $inner;<br/>&gt;&gt; bless \%outer;<br/>&gt;&gt; }<br/>&gt;&gt; }<br/>&gt;&gt; $self = Foo-&gt;new;<br/>&gt;&gt; ($self-&gt;{prog_name} = $0) =~ s|^.*/([^/]+)$|$1|;<br/>&gt;<br/>&gt; That&#39;s it: Same thing - the program is aborted with a stack trace!<br/>&gt; (Btw: this is happening with glibc-2.7 on Debian &quot;lenny&quot;)<br/>&gt;<br/>&gt; So: what&#39;s the big difference between just assigning a value and <br/>&gt; calling s/// ?<br/>&gt; Is there anything else that shouldn&#39;t be done on a tied hash?<br/><br/>No it should work. Now that you can reproduce it, and using only <br/>modules that come with Perl, I would suggest you report the issue <br/>using perlbug. perlbug will attach info about the perl build you are <br/>using.<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2971.html Fri, 03 Oct 2008 09:41:39 +0000 Re: after upgrade: glibc detected *** /usr/bin/perl: double freeor corruption by Peter Daum <br/>Graham Barr wrote:<br/>[...]<br/>In your first statement<br/><br/> ($self-&gt;{prog_name}= $0) =~ s|^.*/([^/]+)$|$1|;<br/><br/>you are calling s/// on the hash element. In the second<br/><br/> $self-&gt;{prog_name}= (my $_p= $0) =~ s|^.*/([^/]+)$|$1|;<br/><br/>you are just setting the hash element, actually to the value &quot;1&quot; not the prog name.<br/><br/>oops ;)<br/><br/>&gt; Anyway, I suspect the issue is todo with calling s/// on the element of <br/>&gt; a tied hash.<br/>&gt; <br/>&gt; See if this reproduces the issue.<br/>&gt; <br/>&gt; {<br/>&gt; package Foo;<br/>&gt; use Tie::Hash;<br/>&gt; use base qw(Tie::StdHash);<br/>&gt; <br/>&gt; sub new {<br/>&gt; my $proto = shift;<br/>&gt; my $inner = bless {};<br/>&gt; my %outer;<br/>&gt; tie %outer, __PACKAGE__, $inner;<br/>&gt; bless \%outer;<br/>&gt; }<br/>&gt; }<br/>&gt; <br/>&gt; $self = Foo-&gt;new;<br/>&gt; ($self-&gt;{prog_name} = $0) =~ s|^.*/([^/]+)$|$1|;<br/><br/>That&#39;s it: Same thing - the program is aborted with a stack trace!<br/>(Btw: this is happening with glibc-2.7 on Debian &quot;lenny&quot;)<br/><br/>So: what&#39;s the big difference between just assigning a value and calling s/// ?<br/>Is there anything else that shouldn&#39;t be done on a tied hash?<br/><br/>Regards,<br/> Peter<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2970.html Fri, 03 Oct 2008 08:06:02 +0000 Re: after upgrade: glibc detected *** /usr/bin/perl: double free or corruption by Graham Barr <br/>On Oct 3, 2008, at 7:35 AM, Peter Daum wrote:<br/><br/>&gt; Peter Daum wrote:<br/>&gt;&gt; I recently upgraded a system (as far as perl is concerned from <br/>&gt;&gt; 5.8.8 to 5.10.0). Afterwards I ran into a mysterious problem. I <br/>&gt;&gt; could eventually<br/>&gt; &gt; find a workaround, but still don&#39;t really understand, what is <br/>&gt; going on.<br/>&gt;&gt; After the upgrade, a perl program wouldn&#39;t run anymore - it crashed <br/>&gt;&gt; with a message:&quot;*** glibc detected *** /usr/bin/perl: double free <br/>&gt;&gt; or corruption (fasttop): ...&quot; and a memory map suggesting some <br/>&gt;&gt; problem on the heap.<br/>&gt;&gt; The crash can be reproduced by the following code:<br/>&gt;&gt; use Net::LDAP;<br/>&gt;&gt; my $self=Net::LDAP-&gt;new(&quot;127.0.0.1&quot;);<br/>&gt;&gt; ($self-&gt;{prog_name}= $0) =~ s|^.*/([^/]+)$|$1|;<br/>&gt;&gt; # when I put an intermediate variable into the statement:<br/>&gt;&gt; $self-&gt;{prog_name}= (my $_p= $0) =~ s|^.*/([^/]+)$|$1|;<br/>&gt;&gt; the program works again.<br/>&gt;&gt; Technically, my problem is solved, but maybe somebody here can shed <br/>&gt;&gt; some light on some questions:<br/>&gt; &gt; - I tried to run the program under the debugger hoping to find, <br/>&gt; where<br/>&gt;&gt; exactly the error occurs - unfortunately the same program <br/>&gt;&gt; suddenly worked<br/>&gt; &gt; just fine, so I ended up putting print statements into the <br/>&gt; code until I<br/>&gt; &gt; eventually found the problematic line. Why can&#39;t the crash be <br/>&gt; reproduced<br/>&gt; &gt; under the debugger? Would there be an easier way to find the <br/>&gt; problem?<br/>&gt;&gt; - Generally, I still don&#39;t understand what&#39;s wrong with the <br/>&gt;&gt; original program code.I didn&#39;t try it but I don&#39;t think it is <br/>&gt;&gt; anything specific to Net::LDAP. However, when $self is just some <br/>&gt;&gt; hash reverence (&quot;my $self={}&quot;),<br/>&gt; &gt; the code also works without any problem.<br/>&gt;<br/>&gt; Actually, it seems like the problem is indeed specific to Net::LDAP; <br/>&gt; furthermore,<br/>&gt; the crash only occurs, if there is a LDAP server running at the <br/>&gt; specified address.<br/>&gt;<br/>&gt; I still would love to know where exactly the problem is.<br/>&gt; Is there a bug somewhere in Perl or in Net::LDAP?<br/>&gt; Am I doing something wrong? (well, some might argue that it&#39;s a bad to<br/>&gt; rely on Net::LDAP::new returning a hash reference and isn&#39;t using a <br/>&gt; key named<br/>&gt; &quot;prog_name&quot; ...)<br/><br/>Net::LDAP has reference loops internally. To ensure that memory is not <br/>leaked it plays tricks with tie so that the ref that the app holds is <br/>not part of the loop and the loop can manually be broken when needed.<br/><br/><br/>In your first statement<br/><br/> ($self-&gt;{prog_name}= $0) =~ s|^.*/([^/]+)$|$1|;<br/><br/>you are calling s/// on the hash element. In the second<br/><br/> $self-&gt;{prog_name}= (my $_p= $0) =~ s|^.*/([^/]+)$|$1|;<br/><br/>you are just setting the hash element, actually to the value &quot;1&quot; not <br/>the prog name. You probably want<br/><br/> ($self-&gt;{prog_name}) = $0 =~ m|([^/]+)$|;<br/><br/>Anyway, I suspect the issue is todo with calling s/// on the element <br/>of a tied hash.<br/><br/>See if this reproduces the issue.<br/><br/>{<br/> package Foo;<br/> use Tie::Hash;<br/> use base qw(Tie::StdHash);<br/><br/> sub new {<br/> my $proto = shift;<br/> my $inner = bless {};<br/> my %outer;<br/> tie %outer, __PACKAGE__, $inner;<br/> bless \%outer;<br/> }<br/>}<br/><br/>$self = Foo-&gt;new;<br/>($self-&gt;{prog_name} = $0) =~ s|^.*/([^/]+)$|$1|;<br/><br/><br/>Graham.<br/><br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2969.html Fri, 03 Oct 2008 06:32:53 +0000 Re: after upgrade: glibc detected *** /usr/bin/perl: double free or corruption by Graham Barr On Oct 3, 2008, at 8:03 AM, Peter Karman wrote:<br/>&gt; Peter Daum wrote on 10/03/2008 07:35 AM:<br/>&gt;&gt; Peter Daum wrote:<br/>&gt;&gt;&gt; I recently upgraded a system (as far as perl is concerned from 5.8.8<br/>&gt;&gt;&gt; to 5.10.0). Afterwards I ran into a mysterious problem. I could<br/>&gt;&gt;&gt; eventually<br/>&gt;&gt;&gt; find a workaround, but still don&#39;t really understand, what is <br/>&gt;&gt;&gt; going on.<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; After the upgrade, a perl program wouldn&#39;t run anymore - it crashed<br/>&gt;&gt;&gt; with a message:&quot;*** glibc detected *** /usr/bin/perl: double free or<br/>&gt;&gt;&gt; corruption (fasttop): ...&quot; and a memory map suggesting some <br/>&gt;&gt;&gt; problem on<br/>&gt;&gt;&gt; the heap.<br/>&gt;<br/>&gt; I&#39;ve seen that error message when the version of glibc changes. Have <br/>&gt; you<br/>&gt; tried re-installing Net::LDAP so that is is compiled against the same<br/>&gt; libs that your perl is?<br/><br/>Net::LDAP itself is pure perl, so that would not make a difference.<br/><br/>Also this is not due to the library any program is linked to. In newer <br/>versions of glibc they added a this warning for when free() is called <br/>multiple times. I forget the versions, but we saw this in a lot of <br/>apps at a previous employer when they upgraded RHEL, which introduced <br/>the new glibc<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2968.html Fri, 03 Oct 2008 06:16:37 +0000 Re: after upgrade: glibc detected *** /usr/bin/perl: double freeor corruption by Peter Karman Peter Daum wrote on 10/03/2008 07:35 AM:<br/>&gt; Peter Daum wrote:<br/>&gt;&gt; I recently upgraded a system (as far as perl is concerned from 5.8.8<br/>&gt;&gt; to 5.10.0). Afterwards I ran into a mysterious problem. I could<br/>&gt;&gt; eventually<br/>&gt;&gt; find a workaround, but still don&#39;t really understand, what is going on.<br/>&gt;&gt;<br/>&gt;&gt; After the upgrade, a perl program wouldn&#39;t run anymore - it crashed<br/>&gt;&gt; with a message:&quot;*** glibc detected *** /usr/bin/perl: double free or<br/>&gt;&gt; corruption (fasttop): ...&quot; and a memory map suggesting some problem on<br/>&gt;&gt; the heap.<br/><br/>I&#39;ve seen that error message when the version of glibc changes. Have you<br/>tried re-installing Net::LDAP so that is is compiled against the same<br/>libs that your perl is?<br/><br/>-- <br/>Peter Karman . peter@peknet.com . http://peknet.com/<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2967.html Fri, 03 Oct 2008 06:03:13 +0000 Re: after upgrade: glibc detected *** /usr/bin/perl: double freeor corruption by Peter Daum Peter Daum wrote:<br/>&gt; I recently upgraded a system (as far as perl is concerned from 5.8.8 to <br/>&gt; 5.10.0). Afterwards I ran into a mysterious problem. I could eventually<br/> &gt; find a workaround, but still don&#39;t really understand, what is going on.<br/>&gt; <br/>&gt; After the upgrade, a perl program wouldn&#39;t run anymore - it crashed with <br/>&gt; a message:&quot;*** glibc detected *** /usr/bin/perl: double free or corruption <br/>&gt; (fasttop): ...&quot; and a memory map suggesting some problem on the heap.<br/>&gt; The crash can be reproduced by the following code:<br/>&gt; <br/>&gt; <br/>&gt; use Net::LDAP;<br/>&gt; my $self=Net::LDAP-&gt;new(&quot;127.0.0.1&quot;);<br/>&gt; ($self-&gt;{prog_name}= $0) =~ s|^.*/([^/]+)$|$1|;<br/>&gt; <br/>&gt; # when I put an intermediate variable into the statement:<br/>&gt; <br/>&gt; $self-&gt;{prog_name}= (my $_p= $0) =~ s|^.*/([^/]+)$|$1|;<br/>&gt; <br/>&gt; the program works again.<br/>&gt; <br/>&gt; Technically, my problem is solved, but maybe somebody here can shed some <br/>&gt; light on some questions:<br/>&gt; <br/> &gt; - I tried to run the program under the debugger hoping to find, where<br/>&gt; exactly the error occurs - unfortunately the same program suddenly worked<br/> &gt; just fine, so I ended up putting print statements into the code until I<br/> &gt; eventually found the problematic line. Why can&#39;t the crash be reproduced<br/> &gt; under the debugger? Would there be an easier way to find the problem?<br/>&gt; <br/>&gt; - Generally, I still don&#39;t understand what&#39;s wrong with the original <br/>&gt; program code.I didn&#39;t try it but I don&#39;t think it is anything specific to <br/>&gt; Net::LDAP. However, when $self is just some hash reverence (&quot;my $self={}&quot;),<br/> &gt; the code also works without any problem.<br/><br/>Actually, it seems like the problem is indeed specific to Net::LDAP; furthermore,<br/>the crash only occurs, if there is a LDAP server running at the specified address.<br/><br/>I still would love to know where exactly the problem is.<br/>Is there a bug somewhere in Perl or in Net::LDAP?<br/>Am I doing something wrong? (well, some might argue that it&#39;s a bad to<br/>rely on Net::LDAP::new returning a hash reference and isn&#39;t using a key named<br/>&quot;prog_name&quot; ...)<br/><br/>Regards,<br/> Peter Daum<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/10/msg2966.html Fri, 03 Oct 2008 05:50:21 +0000 Re: Can't get LDAP::Message object with modify method by John W. Sopko Jr. <br/>Graham Barr wrote:<br/>&gt; On Sep 26, 2008, at 8:11 AM, John W. Sopko Jr. wrote:<br/>&gt;&gt;<br/>&gt;&gt; Here is the section of code that changes the password:<br/>&gt;&gt;<br/>&gt;&gt; # the unicodePwd attribute is write only<br/>&gt;&gt; $mesg = $AD-&gt;modify($dn, replace =&gt; { &quot;unicodePwd&quot; =&gt; $adpw });<br/>&gt;&gt; print &quot;mesg-&gt;code = $mesg-&gt;code() \n&quot;;<br/>&gt; <br/>&gt; That is not calling the method.<br/>&gt; <br/>&gt;&gt; print &quot;resultCode = $mesg-&gt;{&#39;resultCode&#39;} \n&quot;;<br/>&gt;&gt;<br/>&gt;&gt; if($mesg-&gt;{&#39;resultCode&#39;} != 0) {<br/>&gt;&gt; print STDERR &quot;\nFailed to change password for $cn exiting.\n&quot;;<br/>&gt;&gt; print STDERR &quot;error_text:&quot; . $mesg-&gt;error_text . &quot;\n&quot;;<br/>&gt;&gt; print STDERR &quot;server_error:&quot; . $mesg-&gt;server_error . &quot;\n&quot;;<br/>&gt;&gt; print STDERR &quot;error:&quot; . $mesg-&gt;error . &quot;\n&quot;;<br/>&gt;&gt; print<br/>&gt;&gt; exit 1;<br/>&gt;&gt; }<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; Output from above section:<br/>&gt;&gt;<br/>&gt;&gt; mesg-&gt;code = Net::LDAP::Modify=HASH(0x81d1f90)-&gt;code()<br/>&gt;&gt; resultCode = 53<br/>&gt; <br/>&gt; If you change the line above to<br/>&gt; <br/>&gt; print &quot;mesg-&gt;code = &quot;,$mesg-&gt;code(),&quot; \n&quot;;<br/><br/>I plead temporary insanity, improper print statement,<br/>that fixed.<br/><br/>I changed the test I was trying to figure out from this:<br/><br/>if($mesg-&gt;{&#39;resultCode&#39;} != 0) {<br/><br/>to this:<br/><br/>if($mesg-&gt;code() != 0) {<br/><br/>and it works fine.<br/><br/>&gt; <br/>&gt; you should also see 53, so I doubt this is you problem.<br/>&gt; <br/>&gt;&gt; Failed to change password for astroboy exiting.<br/>&gt;&gt; error_text:The server is unwilling to perform the requested operation<br/>&gt;&gt;<br/>&gt;&gt; server_error:0000052D: SvcErr: DSID-031A0FC0, problem 5003 <br/>&gt;&gt; (WILL_NOT_PERFORM), data 0<br/>&gt;&gt;<br/>&gt;&gt; error:0000052D: SvcErr: DSID-031A0FC0, problem 5003 <br/>&gt;&gt; (WILL_NOT_PERFORM), data 0<br/>&gt; <br/>&gt; Well it certainly looks like the server is refusing to change the <br/>&gt; password, so I would expect the return message to signal an error<br/><br/>Yes am testing for error conditions.<br/><br/>Thanks for your help!<br/><br/>&gt; <br/>&gt; Graham.<br/>&gt; <br/><br/>-- <br/>John W. Sopko Jr. University of North Carolina<br/>email: sopko AT cs.unc.edu Computer Science Dept., CB 3175<br/>Phone: 919-962-1844 Sitterson Hall; Room 044<br/>Fax: 919-962-1799 Chapel Hill, NC 27599-3175<br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2965.html Fri, 26 Sep 2008 11:13:48 +0000 Re: Can't get LDAP::Message object with modify method by Graham Barr On Sep 26, 2008, at 8:11 AM, John W. Sopko Jr. wrote:<br/>&gt;<br/>&gt; Here is the section of code that changes the password:<br/>&gt;<br/>&gt; # the unicodePwd attribute is write only<br/>&gt; $mesg = $AD-&gt;modify($dn, replace =&gt; { &quot;unicodePwd&quot; =&gt; $adpw });<br/>&gt; print &quot;mesg-&gt;code = $mesg-&gt;code() \n&quot;;<br/><br/>That is not calling the method.<br/><br/>&gt; print &quot;resultCode = $mesg-&gt;{&#39;resultCode&#39;} \n&quot;;<br/>&gt;<br/>&gt; if($mesg-&gt;{&#39;resultCode&#39;} != 0) {<br/>&gt; print STDERR &quot;\nFailed to change password for $cn exiting.\n&quot;;<br/>&gt; print STDERR &quot;error_text:&quot; . $mesg-&gt;error_text . &quot;\n&quot;;<br/>&gt; print STDERR &quot;server_error:&quot; . $mesg-&gt;server_error . &quot;\n&quot;;<br/>&gt; print STDERR &quot;error:&quot; . $mesg-&gt;error . &quot;\n&quot;;<br/>&gt; print<br/>&gt; exit 1;<br/>&gt; }<br/>&gt;<br/>&gt;<br/>&gt; Output from above section:<br/>&gt;<br/>&gt; mesg-&gt;code = Net::LDAP::Modify=HASH(0x81d1f90)-&gt;code()<br/>&gt; resultCode = 53<br/><br/>If you change the line above to<br/><br/>print &quot;mesg-&gt;code = &quot;,$mesg-&gt;code(),&quot; \n&quot;;<br/><br/>you should also see 53, so I doubt this is you problem.<br/><br/>&gt; Failed to change password for astroboy exiting.<br/>&gt; error_text:The server is unwilling to perform the requested operation<br/>&gt;<br/>&gt; server_error:0000052D: SvcErr: DSID-031A0FC0, problem 5003 <br/>&gt; (WILL_NOT_PERFORM), data 0<br/>&gt;<br/>&gt; error:0000052D: SvcErr: DSID-031A0FC0, problem 5003 <br/>&gt; (WILL_NOT_PERFORM), data 0<br/><br/>Well it certainly looks like the server is refusing to change the <br/>password, so I would expect the return message to signal an error<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2964.html Fri, 26 Sep 2008 08:59:21 +0000 Can't get LDAP::Message object with modify method by John W. Sopko Jr. I have a perl script to change a users Active Directory password.<br/>The script works fine. I can bind to AD and change the users password<br/>running the script on linux over an encrypted TLS session to Windows AD.<br/><br/>I can get valid return message objects from other methods but I cannot<br/>get a valid message object from the modify method that does the<br/>password changing. The Windows AD password is changed by<br/>using modify to the write only &quot;unicodePwd&quot; attribute.<br/><br/>I found some of the code on the web and wondered why the person<br/>used:<br/><br/>$mesg-&gt;{&#39;resultCode&#39;}<br/><br/>instead of:<br/><br/>$mesg-&gt;code()<br/><br/>And the reason must be that $mesg-&gt;code() does not work in this<br/>case.<br/><br/>Here is the part of the code with the output below when I run<br/>it and get a password change failure. I force a failure by<br/>passing a password that Windows AD does not like. Again this<br/>works if I pass a good password. I want to get a an error<br/>message from the server that describes why the password failed.<br/><br/><br/>Here is the section of code that changes the password:<br/><br/># the unicodePwd attribute is write only<br/>$mesg = $AD-&gt;modify($dn, replace =&gt; { &quot;unicodePwd&quot; =&gt; $adpw });<br/>print &quot;mesg-&gt;code = $mesg-&gt;code() \n&quot;;<br/>print &quot;resultCode = $mesg-&gt;{&#39;resultCode&#39;} \n&quot;;<br/><br/>if($mesg-&gt;{&#39;resultCode&#39;} != 0) {<br/> print STDERR &quot;\nFailed to change password for $cn exiting.\n&quot;;<br/> print STDERR &quot;error_text:&quot; . $mesg-&gt;error_text . &quot;\n&quot;;<br/> print STDERR &quot;server_error:&quot; . $mesg-&gt;server_error . &quot;\n&quot;;<br/> print STDERR &quot;error:&quot; . $mesg-&gt;error . &quot;\n&quot;;<br/> print<br/> exit 1;<br/>}<br/><br/><br/>Output from above section:<br/><br/>mesg-&gt;code = Net::LDAP::Modify=HASH(0x81d1f90)-&gt;code()<br/>resultCode = 53<br/><br/>Failed to change password for astroboy exiting.<br/>error_text:The server is unwilling to perform the requested operation<br/><br/>server_error:0000052D: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), <br/>data 0<br/><br/>error:0000052D: SvcErr: DSID-031A0FC0, problem 5003 (WILL_NOT_PERFORM), data 0<br/><br/><br/>Thanks for any help on this.<br/><br/>-- <br/>John W. Sopko Jr. University of North Carolina<br/>email: sopko AT cs.unc.edu Computer Science Dept., CB 3175<br/>Phone: 919-962-1844 Sitterson Hall; Room 044<br/>Fax: 919-962-1799 Chapel Hill, NC 27599-3175<br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2963.html Fri, 26 Sep 2008 08:06:02 +0000 perl-ldap-0.38 released by Graham Barr 0.38 has been released to CPAN http://search.cpan.org/~gbarr/perl-ldap/<br/><br/>You can download from<br/><br/>http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/perl-ldap-0.38.tar.gz<br/><br/><br/>perl-ldap 0.38 -- Sun Sep 21 09:17:25 CDT 2008<br/>==============================================<br/><br/>Bug Fixes<br/> * Fix bug in Net::LDAP::Extension using wrong field for resultCode<br/> * Fix Net::LDAP::Control::PasswordPolicy decoding bug.<br/><br/>Enhancements<br/> * Net::LDAP::Extension::SetPassword now supports controls<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2962.html Sun, 21 Sep 2008 16:59:43 +0000 Re: PasswordPolicy control and SetPassword extension by Graham Barr On Sep 19, 2008, at 12:03 PM, Peter Marschall wrote:<br/>&gt; On Friday, 19. September 2008, Graham Barr wrote:<br/>&gt;&gt; I will apply thins change, then cut a new release this weekend.<br/>&gt;<br/>&gt; Please find attached another fix which IMHO should go into the next <br/>&gt; release as<br/>&gt; well.<br/>&gt;<br/>&gt; Dunno if it isimportant: patch is against origin/next.<br/><br/>Thats great. I have applied.<br/><br/>Which patches made in this manner, and attached so mail systems do not <br/>mangle them, make it easy to apply with git-am and all the credits <br/>remain correct<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2961.html Fri, 19 Sep 2008 12:46:35 +0000 Re: PasswordPolicy control and SetPassword extension by Peter Marschall Hi,<br/><br/>On Friday, 19. September 2008, Graham Barr wrote:<br/>&gt; I will apply thins change, then cut a new release this weekend.<br/><br/>Please find attached another fix which IMHO should go into the next release as <br/>well.<br/><br/>Dunno if it isimportant: patch is against origin/next.<br/><br/>Regards<br/>Peter<br/><br/>-- <br/>Peter Marschall<br/>peter@adpm.de<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2960.html Fri, 19 Sep 2008 10:02:15 +0000 Re: PasswordPolicy control and SetPassword extension by Graham Barr On Sep 17, 2008, at 8:17 AM, Guillaume Rousse wrote:<br/>&gt; Buchan Milne a &eacute;crit :<br/>&gt;&gt;&gt; set_password was not passing through controls. Please try the <br/>&gt;&gt;&gt; attached<br/>&gt;&gt;&gt; lib/Net/LDAP/Extension/SetPassword.pm<br/>&gt;&gt; The patch works fine, I tested with the attached script, which <br/>&gt;&gt; works as a CGI or in the console, and uses/supports PasswordPolicy <br/>&gt;&gt; (e.g. if password has been reset or has expired, user is prompted <br/>&gt;&gt; to change it).<br/>&gt; But the patch also triggers an error if no control is actually used:<br/>&gt; controls.0.type is undefined at /usr/lib/perl5/vendor_perl/5.10.0/ <br/>&gt; Net/LDAP/Message.pm<br/>&gt;<br/>&gt; The following patch fixes this issue.<br/><br/>Thanks for testing.<br/><br/>I will apply thins change, then cut a new release this weekend.<br/><br/>Graham.<br/><br/>&gt;<br/>&gt; -- <br/>&gt; Guillaume Rousse<br/>&gt; Moyens Informatiques - INRIA Futurs<br/>&gt; Tel: 01 69 35 69 62<br/>&gt; --- /usr/lib/perl5/vendor_perl/5.10.0/Net/LDAP/Extension/ <br/>&gt; SetPassword.pm 2008-09-17 15:14:54.000000000 +0200<br/>&gt; +++ SetPassword.pm 2008-09-17 15:16:20.000000000 +0200<br/>&gt; @@ -26,7 +26,7 @@<br/>&gt; my $res = $ldap-&gt;extension(<br/>&gt; name =&gt; &#39;1.3.6.1.4.1.4203.1.11.1&#39;,<br/>&gt; value =&gt; $passwdModReq-&gt;encode(\%opt),<br/>&gt; - control =&gt; $opt{control},<br/>&gt; + ($opt{control} ? (control =&gt; $opt{control}) : ())<br/>&gt; );<br/>&gt;<br/>&gt; bless $res; # Naughty :-)<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2959.html Fri, 19 Sep 2008 06:28:05 +0000 Re: PasswordPolicy control and SetPassword extension by Guillaume Rousse Buchan Milne a &eacute;crit :<br/>&gt;&gt; set_password was not passing through controls. Please try the attached<br/>&gt;&gt; lib/Net/LDAP/Extension/SetPassword.pm<br/>&gt; <br/>&gt; The patch works fine, I tested with the attached script, which works as a CGI <br/>&gt; or in the console, and uses/supports PasswordPolicy (e.g. if password has <br/>&gt; been reset or has expired, user is prompted to change it).<br/>But the patch also triggers an error if no control is actually used:<br/>controls.0.type is undefined at <br/>/usr/lib/perl5/vendor_perl/5.10.0/Net/LDAP/Message.pm<br/><br/>The following patch fixes this issue.<br/>-- <br/>Guillaume Rousse<br/>Moyens Informatiques - INRIA Futurs<br/>Tel: 01 69 35 69 62<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2958.html Wed, 17 Sep 2008 06:17:20 +0000 Re: PasswordPolicy control and SetPassword extension by Buchan Milne On Friday 12 September 2008 19:21:33 Graham Barr wrote:<br/>&gt; On Sep 12, 2008, at 9:24 AM, Guillaume Rousse wrote:<br/>&gt; &gt; Hello list.<br/>&gt; &gt;<br/>&gt; &gt; I&#39;ve been trying to use a PasswordPolicy control with a password<br/>&gt; &gt; change operation, in order to nicely handle constraints violations<br/>&gt; &gt; in server response.<br/><br/>I actually subscribed to this mailing list on Thursday to ask the same <br/>question.<br/><br/>&gt; &gt;<br/>&gt; &gt; my $pp = Net::LDAP::Control::PasswordPolicy-&gt;new();<br/>&gt; &gt;<br/>&gt; &gt; my $result = $ldap-&gt;set_password(<br/>&gt; &gt; user =&gt; $dn,<br/>&gt; &gt; newpasswd =&gt; $new_password,<br/>&gt; &gt; control =&gt; [ $pp ]<br/>&gt; &gt; );<br/>&gt; &gt; if ($result-&gt;code == LDAP_CONSTRAINT_VIOLATION) {<br/>&gt; &gt; my $resp = $result-&gt;control(LDAP_CONTROL_PASSWORDPOLICY);<br/>&gt; &gt; print $resp-&gt;error() if defined $resp;<br/>&gt; &gt; }<br/>&gt;<br/>&gt; set_password was not passing through controls. Please try the attached<br/>&gt; lib/Net/LDAP/Extension/SetPassword.pm<br/><br/>The patch works fine, I tested with the attached script, which works as a CGI <br/>or in the console, and uses/supports PasswordPolicy (e.g. if password has <br/>been reset or has expired, user is prompted to change it).<br/><br/><br/>&gt; And as has been pointed out there has been a change to<br/>&gt; Net::LDAP::Control::PasswordPolicy recently<br/>&gt;<br/>&gt; There is a git repository available at<br/>&gt;<br/>&gt; http://git.goingon.net/?p=perl-ldap.git<br/>&gt;<br/>&gt; The branch for the next release, which has the PasswordPolicy fixes,<br/>&gt; is at<br/>&gt;<br/>&gt; http://git.goingon.net/?p=perl-ldap.git;a=shortlog;h=refs/heads/next<br/><br/>I actually shipped PasswordPolicy fixes in the Mandriva cooker (similar to <br/>Debian &quot;unstable&quot;, Fedora &quot;Rawhide&quot;) package, and have just included the <br/>SetPassword.pm patch.<br/><br/>http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/perl-ldap<br/><br/>Regards,<br/>Buchan<br/><br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2957.html Mon, 15 Sep 2008 08:49:48 +0000 Re: PasswordPolicy control and SetPassword extension by Guillaume Rousse Cl&eacute;ment OUDOT a &eacute;crit :<br/>&gt;&gt;&gt; You can use it with the ldap_modify operation (and not with<br/>&gt;&gt;&gt; modify_password extension). The modify operation accepts controls and so<br/>&gt;&gt;&gt; you can check the control response.<br/>&gt;&gt; I don&#39;t see which operation you are refering to. I can&#39;t use a standard<br/>&gt;&gt; attribute value change operation here, I need to use the specific<br/>&gt;&gt; password change extension.<br/>&gt; <br/>&gt; Why? Which LDAP server are you using?<br/>Because smb5pwd overlay (password synchronisation) only works through it.<br/>-- <br/>Guillaume Rousse<br/>Moyens Informatiques - INRIA Futurs<br/>Tel: 01 69 35 69 62<br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2956.html Mon, 15 Sep 2008 01:15:10 +0000 Re: PasswordPolicy control and SetPassword extension by Graham Barr On Sep 12, 2008, at 9:24 AM, Guillaume Rousse wrote:<br/>&gt; Hello list.<br/>&gt;<br/>&gt; I&#39;ve been trying to use a PasswordPolicy control with a password <br/>&gt; change operation, in order to nicely handle constraints violations <br/>&gt; in server response.<br/>&gt;<br/>&gt; my $pp = Net::LDAP::Control::PasswordPolicy-&gt;new();<br/>&gt;<br/>&gt; my $result = $ldap-&gt;set_password(<br/>&gt; user =&gt; $dn,<br/>&gt; newpasswd =&gt; $new_password,<br/>&gt; control =&gt; [ $pp ]<br/>&gt; );<br/>&gt; if ($result-&gt;code == LDAP_CONSTRAINT_VIOLATION) {<br/>&gt; my $resp = $result-&gt;control(LDAP_CONTROL_PASSWORDPOLICY);<br/>&gt; print $resp-&gt;error() if defined $resp;<br/>&gt; }<br/><br/>set_password was not passing through controls. Please try the attached <br/>lib/Net/LDAP/Extension/SetPassword.pm<br/><br/>And as has been pointed out there has been a change to <br/>Net::LDAP::Control::PasswordPolicy recently<br/><br/>There is a git repository available at<br/><br/>http://git.goingon.net/?p=perl-ldap.git<br/><br/>The branch for the next release, which has the PasswordPolicy fixes, <br/>is at<br/><br/>http://git.goingon.net/?p=perl-ldap.git;a=shortlog;h=refs/heads/next<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2955.html Fri, 12 Sep 2008 10:21:48 +0000 Re: PasswordPolicy control and SetPassword extension by Chris Ridd <br/>On 12 Sep 2008, at 16:14, Cl&eacute;ment OUDOT wrote:<br/><br/>&gt;&gt; Cl&eacute;ment OUDOT a &eacute;crit :<br/>&gt;&gt;&gt;&gt; Hello list.<br/>&gt;&gt;&gt;&gt;<br/>&gt;&gt;&gt;&gt; I&#39;ve been trying to use a PasswordPolicy control with a password <br/>&gt;&gt;&gt;&gt; change<br/>&gt;&gt;&gt;&gt; operation, in order to nicely handle constraints violations in <br/>&gt;&gt;&gt;&gt; server<br/>&gt;&gt;&gt;&gt; response.<br/>&gt;&gt;&gt;&gt;<br/>&gt;&gt;&gt;&gt; my $pp = Net::LDAP::Control::PasswordPolicy-&gt;new();<br/>&gt;&gt;&gt;&gt;<br/>&gt;&gt;&gt;&gt; my $result = $ldap-&gt;set_password(<br/>&gt;&gt;&gt;&gt; user =&gt; $dn,<br/>&gt;&gt;&gt;&gt; newpasswd =&gt; $new_password,<br/>&gt;&gt;&gt;&gt; control =&gt; [ $pp ]<br/>&gt;&gt;&gt;&gt; );<br/>&gt;&gt;&gt;&gt; if ($result-&gt;code == LDAP_CONSTRAINT_VIOLATION) {<br/>&gt;&gt;&gt;&gt; my $resp = $result-&gt;control(LDAP_CONTROL_PASSWORDPOLICY);<br/>&gt;&gt;&gt;&gt; print $resp-&gt;error() if defined $resp;<br/>&gt;&gt;&gt;&gt; }<br/>&gt;&gt;&gt;&gt;<br/>&gt;&gt;&gt;&gt; $resp is never defined, and all I can do is to print raw<br/>&gt;&gt;&gt;&gt; $result-&gt;message() to the user, whereas I&#39;d like to distinguish <br/>&gt;&gt;&gt;&gt; between<br/>&gt;&gt;&gt;&gt; different case, for translations purpose mainly.<br/>&gt;&gt;&gt;&gt;<br/>&gt;&gt;&gt;&gt; According to documentation, set_password operation only accept <br/>&gt;&gt;&gt;&gt; user,<br/>&gt;&gt;&gt;&gt; oldpasswd and newpasswd args, which seems to imply it doesn&#39;t <br/>&gt;&gt;&gt;&gt; handle<br/>&gt;&gt;&gt;&gt; controls. So, is PasswordPolicy control restricted to bind <br/>&gt;&gt;&gt;&gt; operations<br/>&gt;&gt;&gt;&gt; only<br/>&gt;&gt;&gt;&gt; ?<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; You can use it with the ldap_modify operation (and not with<br/>&gt;&gt;&gt; modify_password extension). The modify operation accepts controls <br/>&gt;&gt;&gt; and so<br/>&gt;&gt;&gt; you can check the control response.<br/>&gt;&gt; I don&#39;t see which operation you are refering to. I can&#39;t use a <br/>&gt;&gt; standard<br/>&gt;&gt; attribute value change operation here, I need to use the specific<br/>&gt;&gt; password change extension.<br/>&gt;<br/>&gt; Why? Which LDAP server are you using?<br/><br/>One reason for requiring the extension could be that you want the <br/>server to generate (and return!) a password for you. All other uses of <br/>PasswordModify can be done with a normal modify operation AFAICS.<br/><br/>&gt;&gt;&gt; Please read this thread because the Password Policy module was <br/>&gt;&gt;&gt; patched<br/>&gt;&gt;&gt; recently:<br/>&gt;&gt;&gt; http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2943.html<br/><br/>Graham&#39;s changes look OK to me FWIW.<br/><br/>&gt;&gt; I did, but it only relates to retrieving values from the control once<br/>&gt;&gt; used, not how to use it.<br/>&gt;<br/>&gt; For example :<br/>&gt; $mesg = $ldap-&gt;modify($dn, replace =&gt; { userPassword =&gt; $new }, <br/>&gt; control =&gt;<br/><br/>It may be that Guillaume is required to provide the previous password <br/>in the operation - that&#39;s something that password policy can require <br/>for additional security. But that&#39;s easily done with a plain modify op <br/>too.<br/><br/>Cheers,<br/><br/>Chris http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2954.html Fri, 12 Sep 2008 08:50:17 +0000 Re: PasswordPolicy control and SetPassword extension by Clément OUDOT &gt; Cl&eacute;ment OUDOT a &eacute;crit :<br/>&gt;&gt;&gt; Hello list.<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; I&#39;ve been trying to use a PasswordPolicy control with a password change<br/>&gt;&gt;&gt; operation, in order to nicely handle constraints violations in server<br/>&gt;&gt;&gt; response.<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; my $pp = Net::LDAP::Control::PasswordPolicy-&gt;new();<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; my $result = $ldap-&gt;set_password(<br/>&gt;&gt;&gt; user =&gt; $dn,<br/>&gt;&gt;&gt; newpasswd =&gt; $new_password,<br/>&gt;&gt;&gt; control =&gt; [ $pp ]<br/>&gt;&gt;&gt; );<br/>&gt;&gt;&gt; if ($result-&gt;code == LDAP_CONSTRAINT_VIOLATION) {<br/>&gt;&gt;&gt; my $resp = $result-&gt;control(LDAP_CONTROL_PASSWORDPOLICY);<br/>&gt;&gt;&gt; print $resp-&gt;error() if defined $resp;<br/>&gt;&gt;&gt; }<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; $resp is never defined, and all I can do is to print raw<br/>&gt;&gt;&gt; $result-&gt;message() to the user, whereas I&#39;d like to distinguish between<br/>&gt;&gt;&gt; different case, for translations purpose mainly.<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; According to documentation, set_password operation only accept user,<br/>&gt;&gt;&gt; oldpasswd and newpasswd args, which seems to imply it doesn&#39;t handle<br/>&gt;&gt;&gt; controls. So, is PasswordPolicy control restricted to bind operations<br/>&gt;&gt;&gt; only<br/>&gt;&gt;&gt; ?<br/>&gt;&gt;<br/>&gt;&gt; You can use it with the ldap_modify operation (and not with<br/>&gt;&gt; modify_password extension). The modify operation accepts controls and so<br/>&gt;&gt; you can check the control response.<br/>&gt; I don&#39;t see which operation you are refering to. I can&#39;t use a standard<br/>&gt; attribute value change operation here, I need to use the specific<br/>&gt; password change extension.<br/><br/>Why? Which LDAP server are you using?<br/><br/><br/>&gt;&gt; Please read this thread because the Password Policy module was patched<br/>&gt;&gt; recently:<br/>&gt;&gt; http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2943.html<br/>&gt; I did, but it only relates to retrieving values from the control once<br/>&gt; used, not how to use it.<br/><br/>For example :<br/>$mesg = $ldap-&gt;modify($dn, replace =&gt; { userPassword =&gt; $new }, control =&gt;<br/>[ $pp ]);<br/>my($resp) = $mesg-&gt;control( &quot;1.3.6.1.4.1.42.2.27.8.5.1&quot; );<br/>print &quot;PP error:&quot;.$resp-&gt;pp_error.&quot;\n&quot;;<br/><br/>The PP error code give you the correct information (password in history,<br/>etc.)<br/><br/>Cl&eacute;ment.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2953.html Fri, 12 Sep 2008 08:15:13 +0000 Re: PasswordPolicy control and SetPassword extension by Guillaume Rousse Cl&eacute;ment OUDOT a &eacute;crit :<br/>&gt;&gt; Hello list.<br/>&gt;&gt;<br/>&gt;&gt; I&#39;ve been trying to use a PasswordPolicy control with a password change<br/>&gt;&gt; operation, in order to nicely handle constraints violations in server<br/>&gt;&gt; response.<br/>&gt;&gt;<br/>&gt;&gt; my $pp = Net::LDAP::Control::PasswordPolicy-&gt;new();<br/>&gt;&gt;<br/>&gt;&gt; my $result = $ldap-&gt;set_password(<br/>&gt;&gt; user =&gt; $dn,<br/>&gt;&gt; newpasswd =&gt; $new_password,<br/>&gt;&gt; control =&gt; [ $pp ]<br/>&gt;&gt; );<br/>&gt;&gt; if ($result-&gt;code == LDAP_CONSTRAINT_VIOLATION) {<br/>&gt;&gt; my $resp = $result-&gt;control(LDAP_CONTROL_PASSWORDPOLICY);<br/>&gt;&gt; print $resp-&gt;error() if defined $resp;<br/>&gt;&gt; }<br/>&gt;&gt;<br/>&gt;&gt; $resp is never defined, and all I can do is to print raw<br/>&gt;&gt; $result-&gt;message() to the user, whereas I&#39;d like to distinguish between<br/>&gt;&gt; different case, for translations purpose mainly.<br/>&gt;&gt;<br/>&gt;&gt; According to documentation, set_password operation only accept user,<br/>&gt;&gt; oldpasswd and newpasswd args, which seems to imply it doesn&#39;t handle<br/>&gt;&gt; controls. So, is PasswordPolicy control restricted to bind operations only<br/>&gt;&gt; ?<br/>&gt; <br/>&gt; You can use it with the ldap_modify operation (and not with<br/>&gt; modify_password extension). The modify operation accepts controls and so<br/>&gt; you can check the control response.<br/>I don&#39;t see which operation you are refering to. I can&#39;t use a standard <br/> attribute value change operation here, I need to use the specific <br/>password change extension.<br/><br/>&gt; Please read this thread because the Password Policy module was patched<br/>&gt; recently:<br/>&gt; http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2943.html<br/>I did, but it only relates to retrieving values from the control once <br/>used, not how to use it.<br/><br/>-- <br/>Guillaume Rousse<br/>Moyens Informatiques - INRIA Futurs<br/>Tel: 01 69 35 69 62<br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2952.html Fri, 12 Sep 2008 07:59:24 +0000 Re: PasswordPolicy control and SetPassword extension by Clément OUDOT &gt; Hello list.<br/>&gt;<br/>&gt; I&#39;ve been trying to use a PasswordPolicy control with a password change<br/>&gt; operation, in order to nicely handle constraints violations in server<br/>&gt; response.<br/>&gt;<br/>&gt; my $pp = Net::LDAP::Control::PasswordPolicy-&gt;new();<br/>&gt;<br/>&gt; my $result = $ldap-&gt;set_password(<br/>&gt; user =&gt; $dn,<br/>&gt; newpasswd =&gt; $new_password,<br/>&gt; control =&gt; [ $pp ]<br/>&gt; );<br/>&gt; if ($result-&gt;code == LDAP_CONSTRAINT_VIOLATION) {<br/>&gt; my $resp = $result-&gt;control(LDAP_CONTROL_PASSWORDPOLICY);<br/>&gt; print $resp-&gt;error() if defined $resp;<br/>&gt; }<br/>&gt;<br/>&gt; $resp is never defined, and all I can do is to print raw<br/>&gt; $result-&gt;message() to the user, whereas I&#39;d like to distinguish between<br/>&gt; different case, for translations purpose mainly.<br/>&gt;<br/>&gt; According to documentation, set_password operation only accept user,<br/>&gt; oldpasswd and newpasswd args, which seems to imply it doesn&#39;t handle<br/>&gt; controls. So, is PasswordPolicy control restricted to bind operations only<br/>&gt; ?<br/><br/>You can use it with the ldap_modify operation (and not with<br/>modify_password extension). The modify operation accepts controls and so<br/>you can check the control response.<br/><br/>Please read this thread because the Password Policy module was patched<br/>recently:<br/>http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2943.html<br/><br/>Cl&eacute;ment OUDOT,<br/>LINAGORA.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2951.html Fri, 12 Sep 2008 07:41:21 +0000 PasswordPolicy control and SetPassword extension by Guillaume Rousse Hello list.<br/><br/>I&#39;ve been trying to use a PasswordPolicy control with a password change <br/>operation, in order to nicely handle constraints violations in server <br/>response.<br/><br/>my $pp = Net::LDAP::Control::PasswordPolicy-&gt;new();<br/><br/>my $result = $ldap-&gt;set_password(<br/> user =&gt; $dn,<br/> newpasswd =&gt; $new_password,<br/> control =&gt; [ $pp ]<br/>);<br/>if ($result-&gt;code == LDAP_CONSTRAINT_VIOLATION) {<br/> my $resp = $result-&gt;control(LDAP_CONTROL_PASSWORDPOLICY);<br/> print $resp-&gt;error() if defined $resp;<br/>}<br/><br/>$resp is never defined, and all I can do is to print raw <br/>$result-&gt;message() to the user, whereas I&#39;d like to distinguish between <br/>different case, for translations purpose mainly.<br/><br/>According to documentation, set_password operation only accept user, <br/>oldpasswd and newpasswd args, which seems to imply it doesn&#39;t handle <br/>controls. So, is PasswordPolicy control restricted to bind operations only ?<br/><br/>-- <br/>Guillaume Rousse<br/>Moyens Informatiques - INRIA Futurs<br/>Tel: 01 69 35 69 62<br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2950.html Fri, 12 Sep 2008 07:24:42 +0000 Re: Strange behavoir of PasswordPolicy module by Graham Barr On Sep 3, 2008, at 3:47 AM, Cl&eacute;ment OUDOT wrote:<br/><br/>&gt;&gt; Would help if I attached it :-)<br/>&gt;&gt;<br/>&gt; Ok, I confirm this one is working! Do you plan to release it soon?<br/><br/>As soon as I hear back from Chris about the changes as he originally <br/>wrote the module i question.<br/><br/>&gt; And have you a visibility on the uploading of perl-ldap packahe into <br/>&gt; main<br/>&gt; Linux distributions?<br/><br/>No<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2949.html Wed, 03 Sep 2008 06:41:32 +0000 Re: Strange behavoir of PasswordPolicy module by Clément OUDOT &gt; Would help if I attached it :-)<br/>&gt;<br/><br/><br/>Ok, I confirm this one is working! Do you plan to release it soon?<br/><br/>And have you a visibility on the uploading of perl-ldap packahe into main<br/>Linux distributions?<br/><br/>Thanks for your precious help.<br/><br/>Cl&eacute;ment OUDOT.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2948.html Wed, 03 Sep 2008 01:47:56 +0000 Re: Strange behavoir of PasswordPolicy module by Graham Barr Would help if I attached it :-)<br/><br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2947.html Tue, 02 Sep 2008 10:22:05 +0000 Re: Strange behavoir of PasswordPolicy module by Graham Barr On Sep 2, 2008, at 11:12 AM, Cl&eacute;ment OUDOT wrote:<br/><br/>&gt;&gt; Attached is a potential fix for this. Note that is also renames the<br/>&gt;&gt; error method for fetching the password policy error to be called<br/>&gt;&gt; pp_error. This is because there is already an error method in the<br/>&gt;&gt; Control base class which has a different purpose.<br/>&gt;&gt;<br/>&gt;&gt; A diff can also be seen at<br/>&gt;&gt;<br/>&gt;&gt; http://git.goingon.net/?p=perl-ldap.git;a=commitdiff;h=1db4bbb61f5f68a3a7ff178e58818db62e94c398<br/>&gt;<br/>&gt; Hi,<br/>&gt;<br/>&gt; I replace my PasswordPolicy.pm by the one you provided, but I get <br/>&gt; worse ;)<br/><br/>Try the attached.<br/><br/>&gt; I don&#39;t know what &quot;passwordPolicyRequest control value not absent&quot; <br/>&gt; means.<br/><br/>The control is used in the request and the response. But in the <br/>request the value of the<br/>control must be empty.<br/><br/>&gt; The renaming of error in pp_error will be problematic, because the <br/>&gt; perl<br/>&gt; code has to be adapted to the perl-ldap version module! Is there no <br/>&gt; any<br/>&gt; solution?<br/><br/>No. It was a bug in the initial module that needs to be fixed. As you <br/>pointed out the module is broken, so the number of people required to <br/>change code will be minimal.<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2946.html Tue, 02 Sep 2008 10:15:05 +0000 Re: Strange behavoir of PasswordPolicy module by Clément OUDOT &gt; Attached is a potential fix for this. Note that is also renames the<br/>&gt; error method for fetching the password policy error to be called<br/>&gt; pp_error. This is because there is already an error method in the<br/>&gt; Control base class which has a different purpose.<br/>&gt;<br/>&gt; A diff can also be seen at<br/>&gt;<br/>&gt; http://git.goingon.net/?p=perl-ldap.git;a=commitdiff;h=1db4bbb61f5f68a3a7ff178e58818db62e94c398<br/><br/>Hi,<br/><br/>I replace my PasswordPolicy.pm by the one you provided, but I get worse ;)<br/>The control is not working, as shown byt the Dump of the LDAP bind object:<br/><br/>$VAR1 = bless( {<br/> &#39;parent&#39; =&gt; bless( {<br/> &#39;net_ldap_version&#39; =&gt; 3,<br/> &#39;net_ldap_scheme&#39; =&gt; &#39;ldap&#39;,<br/> &#39;net_ldap_debug&#39; =&gt; 0,<br/> &#39;net_ldap_socket&#39; =&gt; bless(<br/>\*Symbol::GEN0, &#39;IO::Socket::INET&#39;<br/>),<br/> &#39;net_ldap_host&#39; =&gt; &#39;localhost&#39;,<br/> &#39;net_ldap_uri&#39; =&gt; &#39;localhost&#39;,<br/> &#39;net_ldap_resp&#39; =&gt; {},<br/> &#39;net_ldap_mesg&#39; =&gt; {},<br/> &#39;net_ldap_async&#39; =&gt; 0,<br/> &#39;net_ldap_port&#39; =&gt; 389,<br/> &#39;net_ldap_refcnt&#39; =&gt; 1<br/> }, &#39;Net::LDAP&#39; ),<br/> &#39;errorMessage&#39; =&gt; &#39;passwordPolicyRequest control value<br/>not absent&#39;,<br/> &#39;ctrl_hash&#39; =&gt; undef,<br/> &#39;resultCode&#39; =&gt; 2,<br/> &#39;callback&#39; =&gt; undef,<br/> &#39;mesgid&#39; =&gt; 1,<br/> &#39;matchedDN&#39; =&gt; &#39;&#39;,<br/> &#39;controls&#39; =&gt; undef,<br/> &#39;raw&#39; =&gt; undef<br/> }, &#39;Net::LDAP::Bind&#39; );<br/><br/><br/>I don&#39;t know what &quot;passwordPolicyRequest control value not absent&quot; means.<br/><br/>The renaming of error in pp_error will be problematic, because the perl<br/>code has to be adapted to the perl-ldap version module! Is there no any<br/>solution?<br/><br/>Cl&eacute;ment.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2945.html Tue, 02 Sep 2008 09:12:25 +0000 Re: Strange behavoir of PasswordPolicy module by Graham Barr Attached is a potential fix for this. Note that is also renames the <br/>error method for fetching the password policy error to be called <br/>pp_error. This is because there is already an error method in the <br/>Control base class which has a different purpose.<br/><br/>A diff can also be seen at<br/><br/>http://git.goingon.net/?p=perl-ldap.git;a=commitdiff;h=1db4bbb61f5f68a3a7ff178e58818db62e94c398<br/><br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2944.html Tue, 02 Sep 2008 08:50:17 +0000 Strange behavoir of PasswordPolicy module by Clément OUDOT Hello,<br/><br/>I&#39;m using the PP control to retrieve warning (time to expiration and authn<br/>remaining). But it seems the dedicated functions time_before_expiration()<br/>and grace_authentications_remaining() are not wroking.<br/><br/>I run this:<br/>-----------------------<br/>print &quot;Time before expiration:&quot;.$resp-&gt;time_before_expiration.&quot;\n&quot;;<br/>print &quot;Time before<br/>expiration:&quot;.$resp-&gt;{asn}-&gt;{warning}-&gt;{timeBeforeExpiration}.&quot;\n&quot;;<br/>------------------------<br/><br/>And the result is:<br/>------------------------<br/>Time before expiration:<br/>Time before expiration:1249<br/>------------------------<br/><br/>So the control is well formed (I can check it with Data::Dumper), but I<br/>can read the value only by browing the HASH and with the dedicated<br/>function.<br/><br/>I use perl-ldap 0.36 on Linux CentOS 5.2.<br/><br/>Any idea?<br/><br/>Cl&eacute;ment OUDOT.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/09/msg2943.html Mon, 01 Sep 2008 09:05:12 +0000 Re: Problem using LDAP by Graham Barr On Aug 28, 2008, at 2:26 PM, pierre.ayotte@desjardins.com wrote:<br/>&gt; We are currently using Perl::LDAP for many years now and it was <br/>&gt; working really fine until a couple of days. We have 5 Windows 2000 <br/>&gt; active directory wich we acess with Perl::LDAP using bind. Now in <br/>&gt; three of those environnement we have the following error message <br/>&gt; when we try to bind to the AD :<br/>&gt;<br/>&gt;<br/>&gt; &quot;LDAP_STRONG_AUTH_REQUIRED<br/>&gt; The server requires authentication be performed with a SASL mechanism&quot;<br/>&gt;<br/>&gt; Here is the perl code:<br/>&gt;<br/>&gt; use Net::LDAP;<br/>&gt; use Net::LDAP::Util(&#39;ldap_error_name&#39;,&#39;ldap_error_text&#39;);<br/>&gt;<br/>&gt; $ldap = Net::LDAP-&gt;new(@ARGV[0]) or die &quot;$@&quot;;<br/>&gt; $mesg = $ldap-&gt;bind( dn =&gt; <br/>&gt; &quot;cn=XXXXX,ou=XXXXX,DC=XXX,DC=XXX,DC=XXX&quot;, password =&gt; &#39;PWD&#39;, <br/>&gt; version =&gt; &quot;3&quot;);<br/><br/>You are performing a simple bind, but it seems your AD now has a <br/>requirement that you use SASL binding.<br/><br/>you will need to change you bind to<br/><br/> $mesg = $ldap-&gt;bind( dn =&gt; <br/>&quot;cn=XXXXX,ou=XXXXX,DC=XXX,DC=XXX,DC=XXX&quot;,, sasl =&gt; $sasl, version =&gt; 3);<br/><br/>where $sasl is an Authen::SASL object.<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/08/msg2942.html Fri, 29 Aug 2008 10:11:24 +0000 Problem using LDAP by pierre.ayotte GIF89a&nbsp;&#0;h&#0;&divide;&#0;&#0;&#0;&#0;&#0;&#128;&#0;&#0;&#0;&#128;&#0;&#128;&#128;&#0;&#0;&#0;&#128;&#128;&#0;&#128;&#0;&#128;&#128;&#128;&#128;&#128;&Agrave;&Agrave;&Agrave;&yuml;&#0;&#0;&#0;&yuml;&#0;&yuml;&yuml;&#0;&#0;&#0;&yuml;&yuml;&#0;&yuml;&#0;&yuml;&yuml;&yuml;&yuml;&yuml;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;3&#0;&#0;f&#0;&#0;&#153;&#0;&#0;&Igrave;&#0;&#0;&yuml;&#0;3&#0;&#0;33&#0;3f&#0;3&#153;&#0;3&Igrave;&#0;3&yuml;&#0;f&#0;&#0;f3&#0;ff&#0;f&#153;&#0;f&Igrave;&#0;f&yuml;&#0;&#153;&#0;&#0;&#153;3&#0;&#153;f&#0;&#153;&#153;&#0;&#153;&Igrave;&#0;&#153;&yuml;&#0;&Igrave;&#0;&#0;&Igrave;3&#0;&Igrave;f&#0;&Igrave;&#153;&#0;&Igrave;&Igrave;&#0;&Igrave;&yuml;&#0;&yuml;&#0;&#0;&yuml;3&#0;&yuml;f&#0;&yuml;&#153;&#0;&yuml;&Igrave;&#0;&yuml;&yuml;3&#0;&#0;3&#0;33&#0;f3&#0;&#153;3&#0;&Igrave;3&#0;&yuml;33&#0;33333f33&#153;33&Igrave;33&yuml;3f&#0;3f33ff3f&#153;3f&Igrave;3f&yuml;3&#153;&#0;3&#153;33&#153;f3&#153;&#153;3&#153;&Igrave;3&#153;&yuml;3&Igrave;&#0;3&Igrave;33&Igrave;f3&Igrave;&#153;3&Igrave;&Igrave;3&Igrave;&yuml;3&yuml;&#0;3&yuml;33&yuml;f3&yuml;&#153;3&yuml;&Igrave;3&yuml;&yuml;f&#0;&#0;f&#0;3f&#0;ff&#0;&#153;f&#0;&Igrave;f&#0;&yuml;f3&#0;f33f3ff3&#153;f3&Igrave;f3&yuml;ff&#0;ff3fffff&#153;ff&Igrave;ff&yuml;f&#153;&#0;f&#153;3f&#153;ff&#153;&#153;f&#153;&Igrave;f&#153;&yuml;f&Igrave;&#0;f&Igrave;3f&Igrave;ff&Igrave;&#153;f&Igrave;&Igrave;f&Igrave;&yuml;f&yuml;&#0;f&yuml;3f&yuml;ff&yuml;&#153;f&yuml;&Igrave;f&yuml;&yuml;&#153;&#0;&#0;&#153;&#0;3&#153;&#0;f&#153;&#0;&#153;&#153;&#0;&Igrave;&#153;&#0;&yuml;&#153;3&#0;&#153;33&#153;3f&#153;3&#153;&#153;3&Igrave;&#153;3&yuml;&#153;f&#0;&#153;f3&#153;ff&#153;f&#153;&#153;f&Igrave;&#153;f&yuml;&#153;&#153;&#0;&#153;&#153;3&#153;&#153;f&#153;&#153;&#153;&#153;&#153;&Igrave;&#153;&#153;&yuml;&#153;&Igrave;&#0;&#153;&Igrave;3&#153;&Igrave;f&#153;&Igrave;&#153;&#153;&Igrave;&Igrave;&#153;&Igrave;&yuml;&#153;&yuml;&#0;&#153;&yuml;3&#153;&yuml;f&#153;&yuml;&#153;&#153;&yuml;&Igrave;&#153;&yuml;&yuml;&Igrave;&#0;&#0;&Igrave;&#0;3&Igrave;&#0;f&Igrave;&#0;&#153;&Igrave;&#0;&Igrave;&Igrave;&#0;&yuml;&Igrave;3&#0;&Igrave;33&Igrave;3f&Igrave;3&#153;&Igrave;3&Igrave;&Igrave;3&yuml;&Igrave;f&#0;&Igrave;f3&Igrave;ff&Igrave;f&#153;&Igrave;f&Igrave;&Igrave;f&yuml;&Igrave;&#153;&#0;&Igrave;&#153;3&Igrave;&#153;f&Igrave;&#153;&#153;&Igrave;&#153;&Igrave;&Igrave;&#153;&yuml;&Igrave;&Igrave;&#0;&Igrave;&Igrave;3&Igrave;&Igrave;f&Igrave;&Igrave;&#153;&Igrave;&Igrave;&Igrave;&Igrave;&Igrave;&yuml;&Igrave;&yuml;&#0;&Igrave;&yuml;3&Igrave;&yuml;f&Igrave;&yuml;&#153;&Igrave;&yuml;&Igrave;&Igrave;&yuml;&yuml;&yuml;&#0;&#0;&yuml;&#0;3&yuml;&#0;f&yuml;&#0;&#153;&yuml;&#0;&Igrave;&yuml;&#0;&yuml;&yuml;3&#0;&yuml;33&yuml;3f&yuml;3&#153;&yuml;3&Igrave;&yuml;3&yuml;&yuml;f&#0;&yuml;f3&yuml;ff&yuml;f&#153;&yuml;f&Igrave;&yuml;f&yuml;&yuml;&#153;&#0;&yuml;&#153;3&yuml;&#153;f&yuml;&#153;&#153;&yuml;&#153;&Igrave;&yuml;&#153;&yuml;&yuml;&Igrave;&#0;&yuml;&Igrave;3&yuml;&Igrave;f&yuml;&Igrave;&#153;&yuml;&Igrave;&Igrave;&yuml;&Igrave;&yuml;&yuml;&yuml;&#0;&yuml;&yuml;3&yuml;&yuml;f&yuml;&yuml;&#153;&yuml;&yuml;&Igrave;&yuml;&yuml;&yuml;,&#0;&#0;&#0;&#0;&nbsp;&#0;h&#0;&#0;&#8;&yuml;&#0;&#1;&lt;&#24;H&deg;&nbsp;&Aacute;&#131;&#8;&#19;*\&Egrave;&deg;&iexcl;&Atilde;&#135;&#16;#J4&#8;@&agrave;&Auml;&#139;&#24;3j&Uuml;&Egrave;qa&Aring;&#142; C&#138;&#28;&sup1;&ntilde;#&Eacute;&#147;(S&#158;4&copy;&sup2;&yen;&Euml;&#151;&#15;Y&Acirc;&#156;I&#19;&brvbar;&Igrave;&#154;8s&#138;&frac14;&copy;&sup3;&sect;&Iuml;&#137;&lt;&#127;<br/>&#29;&#154;0(&Ntilde;&pound;D&#141;&quot;]&Uacute;S)&Oacute;&sect;4&#157;B&#157;&Uacute;Rj&Oacute;&#130;&#22;&copy;&ordm;&acute;&Uacute;&deg;&cent;&times;&#148;Y&micro;&#130; &#139;1,Y&plusmn;h&#7;rehV&iacute;&#3;&#147;^&sup3;&AElig;}&Euml;R&icirc;W&middot;p&iuml;&brvbar;&#149;&cedil;&Ouml;#V&micro;r&yuml;&frac34;%&#24;x&deg;a&middot;t &#11;&THORN;&#11;&plusmn;&macr;&Acirc;&para;&#135;#[,lx&sup2;`&Egrave;&#136;&#25;&Ccedil;&lt;&#11;tnf&ordm;&#158;)[&#6;}&times;l\&Icirc;&#154;&#139;&cent;&#142;&Egrave;&#25;&oacute;&acirc;&Acirc;&pound;).N&Iacute;zuc&#132;&reg;c&Atilde;&thorn;&#28;[2m&#135;&#142;&#139;&acirc;&brvbar;&uml;Wtf&Iuml;&#145;I&yuml;&#6;n{&sup1;&oacute;&Ccedil;&Iacute;&#159;K&Ccedil;&#26;}&uacute;&ocirc;&agrave;&Ouml;ic&#7;n&Oacute;&iuml;&Aacute;&ecirc;O&middot;&#39;&yuml;&frac12;&#8;&#158;&copy;&oslash;&aring;&aring;&#151;&#158;W&#140;&Oslash;&reg;{&Ocirc;&#2;&#139;&#39;VN&cedil;t&yacute;&acirc;&ograve;&otilde;&#130;&frac34;&#159;&frac34;d&yuml;&aacute;&iacute;&#29;&ccedil;&Ucirc;w&deg;QV&Ugrave;w&frac14;%8&szlig;&#129;x&Iacute;&brvbar;&Ograve;z&#138;&iacute;6[k&#151;M&oslash;Y&#128;&igrave;A&brvbar;&iexcl;l&igrave;m&otilde;&szlig;p&#18;&ograve;&#151;&times;G&#27;&#138;&egrave;^&#134;&#151;&#157;&brvbar; Y&sect;}H&#158;&#139;&sup2;&#133;x!&#128;&#24;&Icirc;&Egrave;ao&frac12;u&Egrave;&nbsp;&#142;3A&uml;&pound;n&#3;rXc&#144;(&#30;&#6;W&#133;E&#14;&aelig;&Uacute;&#131;0<br/>id]&uacute;Q&#39;&#159;&#148;&iuml;u&oslash;U&#149;<br/>&icirc;&#7;&#152;&#143;&#141;5&sup1;Rv#q&sup1;&#19;&#152;;yI&amp;Ub&#158;i&#158;&#153;&ETH;&#1;&#150;&#28;_l&copy;Y&#31;G-<br/>8&amp;&#130;r&ordm;Y&#18;&#141;l:&#152;&#39;qt&#18;X&ccedil;&#137;[&#154;f&#153;&#138;&ocirc;&Eacute;&eacute;#&#133;v&#26;Xc|Y&frac34;&#153;&Yacute;&cent;&#136;&#26;&#39;i&#146;C. &aelig;&cent;|bZh&#142;8&quot;&ordf;&amp;&sect;x&#26;ya&#137;&#152;&ouml;)&#22;&copy;B&#134;&#8;i&#146;&macr;&aelig;&yuml;&#150;&#39;&yen;&iexcl;Yy&#159;&#136;&middot;&gt;9Y&#148;d&brvbar;&ugrave;&ccedil;P&frac34;&thorn;&uacute;S&deg;&Acirc;6&yen;j&plusmn;&gt;&#17;&#27;SF&Ccedil;&acirc;&Ugrave;,&#157;&Iuml;r&Ccedil;Z&#143;6&THORN;&#22;f&acute;$a&#11;`&#147;&Iuml;r&#137;\|2};_hsa&copy;d]Z&#22;<br/>+&macr;&ecirc;&#146;&brvbar;*&laquo;&#149;&Eacute;&cedil;&laquo;p&#3;jX`&ordf;&#24;j&#138;jH&eth;&acirc;&cedil;&acirc;c&yuml;&acirc;[/&#146;&thorn;:&#153;cG&yacute;&reg;X)q&ouml; &frac14;&iuml;&reg;&micro;&AElig;&#139;&#156;&#137;&Otilde;j&#148;&eth;&Agrave;&yen;b&#156;i&Agrave;C&#22;&Ugrave;&#28;&pound;e&#6;&ecirc;0&#146;&#28;&iuml;hr&Aacute;%&#22;l&aacute;&yen;&#22;&sup3;&ugrave;&iacute;&Auml;&acirc;Ry&cent;&sup1;&#15;&oacute;&middot;&reg;Q0&sect;&copy;,&Euml;&Egrave;f&#139;&shy;&para;=&#3;&#26;4z@&#15;]U&Ntilde;&THORN;1&#11;&#20;HH&#19;&egrave;&#159;&uml;]&iacute;&copy;S&Oacute;B&#139;&lt;&shy;&Aring;W&Otilde;$&amp;&#139;&uacute;&Ugrave;&#151;_&cedil;S&amp;&ecirc;&icirc;q]&sup3;+&ecirc;&Auml;+&otilde;)&laquo;&copy;&egrave;.&#136;r&Eacute;&pound;&iacute;&#155;&plusmn;&Ecirc;i3&frac12;2&#139;$&#159;&frac14;1&AElig;r&#27;&Uuml;&#28;&copy;&Iuml;vS&#156;\&Iacute;|&ccedil;&#29;&divide;&Ugrave;A&Ugrave;&#139;&ouml;&micro;&#129;&Ucirc;&#136;&divide;&Egrave;&#30;&#27;&THORN;q&AElig;%&#31;&Yacute;&cedil;&AElig;&macr;&icirc;&#157;2&Eacute;G&#18;9&pound;]&#127;3&#142;0&Atilde;&#134;&Acirc;m3&Ugrave;`&Ccedil;z&ordm;&Oslash;R&ecirc;Z&ocirc;&Icirc;&ecirc;I&#7;&raquo;P&#139;kG&micro;&Ntilde;&#128;&atilde;&#158;&#26;&copy;&#7;W]&Otilde;&curren;f&ouml;Ny&para;&#138;&#6;_&plusmn;&#159;a&#22;ou&#128;&yen;5&#143;.&#137;W&brvbar;&#14;1&#137;&laquo;&#131;{;&sup3;&AElig;&sect;&#8;&laquo;&ouml;vJ&uacute;v&#134;&#142;&reg;&sup1;&frac14;&THORN;&brvbar;<br/>\&thorn;&#141;&#146;{.&frac34;&Ocirc;&#144;k|&thorn;{&szlig;&iuml;=&#21;&frac14;&auml;&#27;&uml;&sup2;&frac14;&brvbar;&laquo;&macr;^&ouml;&iacute;&#19;^&gt;&aacute;&thorn;&#131;<br/>&yacute;&acirc;&#151;(&Igrave;&#136;&aelig;e&#153;&#139;&Ugrave;&ntilde;&#128;u=&Yacute;1&shy;&#129;&#14;&#132;V&#4;&#25;3&raquo; &#138;&Icirc;&#130;&laquo;&#130; &#6;_&acute;&Aacute;&#12;vP+&#21;&uuml;&nbsp;&#127;D8? &#146;&#16;8&#1;&#1;&#0;; http://www.nntp.perl.org/group/perl.ldap/2008/08/msg2941.html Fri, 29 Aug 2008 05:29:18 +0000 Release perl-ldap-0.37 by Graham Barr perl-ldap-0.37 should appear on CPAN soon with the following changes<br/><br/>perl-ldap 0.37 -- Thu Aug 28 07:48:13 CDT 2008<br/>==============================================<br/><br/>Bug Fixes<br/> * Pass correct hostname to SASL when connecting to a round-robin<br/> * Return the SASL error message when sasl client_start fails<br/><br/>Enhancements<br/> * Add Modify Increment (RFC 4525) support<br/> * Add Content Synchronization (RFC 4453) support<br/><br/>The repository is available at http://git.goingon.net/?p=perl-ldap.git;a=summary<br/><br/><br/>log summary<br/>===========<br/><br/>commit 0ad1afebd38acc8a0215e79773474b89ea7995a9<br/>Author: Graham Barr &lt;gbarr@pobox.com&gt;<br/>Date: Thu Aug 28 07:52:15 2008 -0500<br/><br/> Release 0.37<br/><br/>M Changes<br/>M META.yml<br/>M SIGNATURE<br/>M lib/Net/LDAP.pm<br/><br/>commit f187ff5eed693aed2ebd7235b176b63063a41d3a<br/>Author: Graham Barr &lt;gbarr@pobox.com&gt;<br/>Date: Tue Aug 26 17:37:58 2008 -0500<br/><br/> Add MANIFEST.SKIP<br/><br/>M .gitignore<br/>M MANIFEST<br/>A MANIFEST.SKIP<br/><br/>commit d864ee0506031fcdb8b3fcdb182d9339973055fd<br/>Author: Mathieu PARENT &lt;math.parent@gmail.com&gt;<br/>Date: Wed Jul 16 20:02:15 2008 +0200<br/><br/> LDAP Content synchronisation<br/><br/> Hi,<br/><br/> This patch implements Intermediate Message and RFC 4533.<br/><br/> Notes:<br/> - The only intrusive change is in lib/Net/LDAP/Search.pm<br/> - Net::LDAP::Intermediate::SyncInfo is not enabled by default (see<br/> lib/Net/LDAP/Intermediate.pm line 18) as there are decoding errors<br/> within ASN (see my previous mail).<br/><br/> Waiting for feedback before (I hope) inclusion.<br/><br/> Regards<br/><br/> Mathieu Parent<br/><br/>M MANIFEST<br/>M lib/Net/LDAP/ASN.pm<br/>M lib/Net/LDAP/Constant.pm<br/>M lib/Net/LDAP/Control.pm<br/>A lib/Net/LDAP/Control/SyncDone.pm<br/>A lib/Net/LDAP/Control/SyncRequest.pm<br/>A lib/Net/LDAP/Control/SyncState.pm<br/>A lib/Net/LDAP/Intermediate.pm<br/>A lib/Net/LDAP/Intermediate/SyncInfo.pm<br/>M lib/Net/LDAP/Search.pm<br/><br/>commit f61d59d2c17bdcd09294504e742c5a7d4e8caa97<br/>Author: Graham Barr &lt;gbarr@pobox.com&gt;<br/>Date: Tue Aug 26 16:47:45 2008 -0500<br/><br/> Add Module::Install<br/><br/>A .gitignore<br/>M MANIFEST<br/>A META.yml<br/>A SIGNATURE<br/>A inc/Module/AutoInstall.pm<br/>A inc/Module/Install.pm<br/>A inc/Module/Install/AutoInstall.pm<br/>A inc/Module/Install/Base.pm<br/>A inc/Module/Install/Can.pm<br/>A inc/Module/Install/Fetch.pm<br/>A inc/Module/Install/Include.pm<br/>A inc/Module/Install/Makefile.pm<br/>A inc/Module/Install/Metadata.pm<br/>A inc/Module/Install/Win32.pm<br/>A inc/Module/Install/WriteAll.pm<br/>A inc/Test/Builder.pm<br/>A inc/Test/Builder/Module.pm<br/>A inc/Test/More.pm<br/>A inc/attributes.pm<br/><br/>commit d16082de98c8f0427f0b057246e8adb794023560<br/>Author: Ron Isaacson &lt;isaacson@cpan.org&gt;<br/>Date: Tue Aug 26 16:39:07 2008 -0500<br/><br/> [rt.cpan.org #37538] Errors from SASL client_start are not returned<br/><br/> In bind(), if the SASL client_start call fails, the exact error <br/>message<br/> is swallowed, and the user gets a generic &quot;Local error&quot; message <br/>back.<br/><br/> The error handling looks like this:<br/><br/> my $initial = $sasl_conn-&gt;client_start;<br/><br/> return _error($ldap, $mesg, LDAP_LOCAL_ERROR, &quot;$@&quot;)<br/> unless defined($initial);<br/><br/> This looks like a copy &amp; paste from a few lines above, where errors<br/> creating $sasl_conn are caught by an eval. In this case, there is <br/>no<br/> eval, and &quot;$@&quot; will always be empty. To return the exact SASL error<br/> message to the caller, I think the last parameter here should be<br/> $sasl_conn-&gt;error().<br/><br/>M lib/Net/LDAP.pm<br/><br/>commit 9e261fa3aff79a92391497e7ab90c9ae0a5707c4<br/>Author: Peter Marschall &lt;peter@adpm.de&gt;<br/>Date: Sat May 24 12:37:23 2008 +0000<br/><br/> fix typo<br/><br/>M lib/Net/LDAP/LDIF.pod<br/><br/>commit f52c2166d3aed3695b9e72f79e1906da578bf384<br/>Author: Chris Ridd &lt;chris.ridd@isode.com&gt;<br/>Date: Tue Apr 22 05:04:52 2008 +0000<br/><br/> Add Modify Increment (RFC 4525) support<br/><br/>M lib/Net/LDAP.pm<br/>M lib/Net/LDAP.pod<br/>M lib/Net/LDAP/ASN.pm<br/>M lib/Net/LDAP/Constant.pm<br/>M lib/Net/LDAP/LDIF.pm<br/><br/>commit af630673855d88c9a88e1f86ee0d068337562e91<br/>Author: Graham Barr &lt;gbarr@pobox.com&gt;<br/>Date: Mon Apr 21 16:29:58 2008 +0000<br/><br/> Fix a problem with Net::LDAP when talking to a round-robin LDAP <br/>server(s)<br/> using SASL/GSSAPI authentication to use the provided hostname not <br/>the<br/> canonical name (Patch from Dominic Hargreaves)<br/><br/>M lib/Net/LDAP.pm<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/08/msg2940.html Thu, 28 Aug 2008 06:07:57 +0000 Re: "" is not exported by the Net::LDAP::Constant module by Graham Barr On Aug 26, 2008, at 7:49 AM, ocns pcns wrote:<br/>&gt; =================================================================<br/>&gt; The Issue:<br/>&gt;<br/>&gt; &quot;&quot; is not exported by the Net::LDAP::Constant module at <br/>&gt; select_bsid.pl line 32<br/>&gt; at /usr/lib/perl5/site_perl/5.10/Net/LDAP/Constant.pm line 25<br/>&gt; Net::LDAP::Constant::import(undef, undef) called at <br/>&gt; select_bsid.pl line 32<br/>&gt; main::BEGIN() called at /usr/lib/perl5/site_perl/5.10/Net/ <br/>&gt; LDAP.pm line 3 2<br/>&gt; eval {...} called at /usr/lib/perl5/site_perl/5.10/Net/ <br/>&gt; LDAP.pm line 32<br/>&gt; Can&#39;t continue after import errors at select_bsid.pl line 32<br/><br/>Something strange is going on here. Net:LDAP::import delegates to <br/>Net::LDAP::Constant::import, but it only passes the arguments it was <br/>passed. use Net::LDAP; should not pass any arguments, but somehow <br/>undef,undef is being passed.<br/><br/>THis code has not changed in a long time, so we need to determine <br/>where those undef values come from. Could you modify Net/LDAP.pm and <br/>add the following line as the first line of sub import, before the shift<br/><br/> require Carp; Carp::cluck(scalar @_);<br/><br/>Graham.<br/><br/> http://www.nntp.perl.org/group/perl.ldap/2008/08/msg2939.html Tue, 26 Aug 2008 07:59:32 +0000