r25633 - in /trunk/libnet-ldap-perl: Changes META.yml Makefile.PL SIGNATURE debian/changelog lib/Net/LDAP.pm lib/Net/LDAP.pod lib/Net/LDAP/Control/PasswordPolicy.pm lib/Net/LDAP/Extension.pm lib/Net/LDAP/Extension/SetPassword.pm lib/Net/LDAP/RootDSE.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Sep 26 14:56:30 UTC 2008
Author: gregoa
Date: Fri Sep 26 14:56:26 2008
New Revision: 25633
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25633
Log:
New upstream release.
Modified:
trunk/libnet-ldap-perl/Changes
trunk/libnet-ldap-perl/META.yml
trunk/libnet-ldap-perl/Makefile.PL
trunk/libnet-ldap-perl/SIGNATURE
trunk/libnet-ldap-perl/debian/changelog
trunk/libnet-ldap-perl/lib/Net/LDAP.pm
trunk/libnet-ldap-perl/lib/Net/LDAP.pod
trunk/libnet-ldap-perl/lib/Net/LDAP/Control/PasswordPolicy.pm
trunk/libnet-ldap-perl/lib/Net/LDAP/Extension.pm
trunk/libnet-ldap-perl/lib/Net/LDAP/Extension/SetPassword.pm
trunk/libnet-ldap-perl/lib/Net/LDAP/RootDSE.pm
Modified: trunk/libnet-ldap-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/Changes?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/Changes (original)
+++ trunk/libnet-ldap-perl/Changes Fri Sep 26 14:56:26 2008
@@ -1,3 +1,13 @@
+perl-ldap 0.38 -- Sun Sep 21 09:17:25 CDT 2008
+==============================================
+
+Bug Fixes
+ * Fix bug in Net::LDAP::Extension using wrong field for resultCode
+ * Fix Net::LDAP::Control::PasswordPolicy decoding bug.
+
+Enhancements
+ * Net::LDAP::Extension::SetPassword now supports controls
+
perl-ldap 0.37 -- Thu Aug 28 07:48:13 CDT 2008
==============================================
Modified: trunk/libnet-ldap-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/META.yml?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/META.yml (original)
+++ trunk/libnet-ldap-perl/META.yml Fri Sep 26 14:56:26 2008
@@ -17,4 +17,9 @@
requires:
Convert::ASN1: 0.07
perl: 5.004
-version: 0.37
+resources:
+ ListArchive: http://perl.markmail.org/search/list:perl-ldap
+ MailingList: http://lists.cpan.org/showlist.cgi?name=perl-ldap
+ homepage: http://ldap.perl.org/
+ repository: http://git.goingon.net/?p=perl-lda.git;a=summary
+version: 0.38
Modified: trunk/libnet-ldap-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/Makefile.PL?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/Makefile.PL (original)
+++ trunk/libnet-ldap-perl/Makefile.PL Fri Sep 26 14:56:26 2008
@@ -10,6 +10,11 @@
version_from ('lib/Net/LDAP.pm');
license ('perl');
abstract ('LDAP client library');
+
+resources homepage => 'http://ldap.perl.org/';
+resources repository => 'http://git.goingon.net/?p=perl-lda.git;a=summary';
+resources MailingList => 'http://lists.cpan.org/showlist.cgi?name=perl-ldap';
+resources ListArchive => 'http://perl.markmail.org/search/list:perl-ldap';
sign(1);
Modified: trunk/libnet-ldap-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/SIGNATURE?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/SIGNATURE (original)
+++ trunk/libnet-ldap-perl/SIGNATURE Fri Sep 26 14:56:26 2008
@@ -16,12 +16,12 @@
SHA1 24a5cce207ec42358c1cff40639e6dff8d7e8d6b .gitignore
SHA1 d0b391ea67d4af1e877c4476490c95cf3f8783e6 CREDITS
-SHA1 24b111e2babe43d89238159d69519c39c373a31c Changes
+SHA1 9bf4598bfc2400b535cbd53aa1f9f307d40eb21d Changes
SHA1 18422f27b2f17b10e9d18b4e482d7bfc95c8df86 INSTALL
SHA1 c2bec936399190520629d3a2e25b313c471c241e MANIFEST
SHA1 88cb906904179e0adf52007f0679a294294ea021 MANIFEST.SKIP
-SHA1 9d4376f9d94e41f1ddd484f92ac4c9170d7ab388 META.yml
-SHA1 a73ad16739e5ebb9df0242295510cd3dcd4785ba Makefile.PL
+SHA1 9f7e4671918e8e0a9f5ac29c3cf7af6f8f6f4d0e META.yml
+SHA1 7767423201733f281c8b344b2b9079b2f545af2e Makefile.PL
SHA1 f3b66414a0872801f3c4c38a93499d0fe48509ef README
SHA1 6c5729e4c6bb46c66fcc33dbb8231292d1c14dee TODO
SHA1 8e15e7abefa826736358685aa1115810baaa9b4a bin/ldapdelete
@@ -82,8 +82,8 @@
SHA1 4dde3f6e30c239c15c234309b7c32dd5a7d409a9 install-nomake
SHA1 da956a83d04192b551118b6ddffc32977cff5427 lib/Bundle/Net/LDAP.pm
SHA1 3637699c1d2e0427a74aa5e44ef0f61a725a83f4 lib/LWP/Protocol/ldap.pm
-SHA1 f028f8fee44babefc7122fefcfd008f9af402e23 lib/Net/LDAP.pm
-SHA1 c20c8cb8fdf5f930a00ffa24706be4a67e9fc4f1 lib/Net/LDAP.pod
+SHA1 5e12c15d019a9ecca587cdb2445a3223c97e7322 lib/Net/LDAP.pm
+SHA1 a4f08a76aa0da5c2c5af06207b230aff3a429c41 lib/Net/LDAP.pod
SHA1 9161a577599bc648dfb2ce46fcb10a96a62dfb6a lib/Net/LDAP/ASN.pm
SHA1 4b1f29fd2ca60e4bf1bcf6ae8d97f56c2442eb56 lib/Net/LDAP/Bind.pm
SHA1 8b37856e342f814ff7ad3f7906ccf9025ca54bdd lib/Net/LDAP/Constant.pm
@@ -91,7 +91,7 @@
SHA1 ab3a966de9724b2ce4197757fec087a766bb4a09 lib/Net/LDAP/Control/EntryChange.pm
SHA1 f2db11b80336a47c8bc5a1ebeb2ad0228838275c lib/Net/LDAP/Control/ManageDsaIT.pm
SHA1 409330c198b6459bffdb78761ce22a300417337e lib/Net/LDAP/Control/Paged.pm
-SHA1 d9119f1138226c7823905afd8946d8be66e849e3 lib/Net/LDAP/Control/PasswordPolicy.pm
+SHA1 fe30617a053e2edbdcfae924390fb940dff1884e lib/Net/LDAP/Control/PasswordPolicy.pm
SHA1 28e53a53f254fbee4f8b71ab311f9ca833007f59 lib/Net/LDAP/Control/PersistentSearch.pm
SHA1 4aefe0e20e65cef8c42d631de86b4fcaabc4ad93 lib/Net/LDAP/Control/PostRead.pm
SHA1 e9f76fc3b7b3cb0ef6d81fba0650373959a8abde lib/Net/LDAP/Control/PreRead.pm
@@ -107,8 +107,8 @@
SHA1 9bbe4edd5987aacc832b09a2d4ed043752f7ebdd lib/Net/LDAP/Entry.pm
SHA1 19e9a756153d83d4f31cc821826f84125933a2e0 lib/Net/LDAP/Entry.pod
SHA1 f9a7c3e2ad3e9398c7c142ce6e015af2a7060f17 lib/Net/LDAP/Examples.pod
-SHA1 e52b67753bb12fd61d10cab20905fdb390361283 lib/Net/LDAP/Extension.pm
-SHA1 61301677c081a6c2afa4bd39250d3d50fd2047bf lib/Net/LDAP/Extension/SetPassword.pm
+SHA1 b3ad85252ac3fa97bd63149cbe1fc94302b2acea lib/Net/LDAP/Extension.pm
+SHA1 acc63277837285411078a27ed73c575316fa6717 lib/Net/LDAP/Extension/SetPassword.pm
SHA1 e701488dfea2250b60bf1a5e58d556ab173f57a8 lib/Net/LDAP/Extension/WhoAmI.pm
SHA1 1d0e9a195cec05800c9ad9d4fcb2d567bf4dc116 lib/Net/LDAP/Extra.pm
SHA1 ff4ff38435edd72be15178a7afceb486a560a804 lib/Net/LDAP/FAQ.pod
@@ -123,7 +123,7 @@
SHA1 6a8b2d30a43d6295de37771c2576cb66c7f10bfd lib/Net/LDAP/Message.pod
SHA1 1ae5e4d10afff9f5d6cd8262a294db331fb461d5 lib/Net/LDAP/RFC.pod
SHA1 4921a9eb85f595aaa4c5c2bf7261feae54440763 lib/Net/LDAP/Reference.pod
-SHA1 f06325e3a75f69792014a762919c1fcf90ab7d78 lib/Net/LDAP/RootDSE.pm
+SHA1 cc2a08d0823bd8ceef9b8977bfe9436e5f9e3144 lib/Net/LDAP/RootDSE.pm
SHA1 91b9629d67cc2fe12689e4a9b42cba658fc206fd lib/Net/LDAP/Schema.pm
SHA1 4e23323449b264e98257c4bc257aaa454469386b lib/Net/LDAP/Schema.pod
SHA1 dc6bb8acf0c4bf514b02aee9f167a67e5920e386 lib/Net/LDAP/Search.pm
@@ -153,7 +153,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
-iEYEARECAAYFAki2ny0ACgkQR0BL4gbYw3QvRACghtDa7UVuxFTHNFAJFSjVZLU0
-eNUAn375ZIZ92Rfgyo0H2mDe8xuWStWM
-=57M5
+iEYEARECAAYFAkjWWLwACgkQR0BL4gbYw3RIqgCeNAlOU/3nRDum8qp8UkGCwzov
+qqcAmgLLwK4UPx5/2R02bEEXwJ5J+0+R
+=WiMd
-----END PGP SIGNATURE-----
Modified: trunk/libnet-ldap-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/debian/changelog?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/debian/changelog (original)
+++ trunk/libnet-ldap-perl/debian/changelog Fri Sep 26 14:56:26 2008
@@ -1,3 +1,9 @@
+libnet-ldap-perl (1:0.38-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org> Fri, 26 Sep 2008 16:55:17 +0200
+
libnet-ldap-perl (1:0.37-1) unstable; urgency=low
* New upstream release (closes: #499566).
Modified: trunk/libnet-ldap-perl/lib/Net/LDAP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/lib/Net/LDAP.pm?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/lib/Net/LDAP.pm (original)
+++ trunk/libnet-ldap-perl/lib/Net/LDAP.pm Fri Sep 26 14:56:26 2008
@@ -28,7 +28,7 @@
LDAP_UNAVAILABLE
);
-$VERSION = "0.37";
+$VERSION = "0.38";
@ISA = qw(Tie::StdHash Net::LDAP::Extra);
$LDAP_VERSION = 3; # default LDAP protocol version
@@ -1026,7 +1026,7 @@
return $mesg
if IO::Socket::SSL::socketToSSL($sock, {_SSL_context_init_args($arg)});
- my $err = $@;
+ my $err = $@ || $IO::Socket::SSL::SSL_ERROR || $IO::Socket::SSL::SSL_ERROR || ''; # avoid use on once warning
if ($sock_class ne ref($sock)) {
$err = $sock->errstr;
Modified: trunk/libnet-ldap-perl/lib/Net/LDAP.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/lib/Net/LDAP.pod?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/lib/Net/LDAP.pod (original)
+++ trunk/libnet-ldap-perl/lib/Net/LDAP.pod Fri Sep 26 14:56:26 2008
@@ -417,9 +417,23 @@
string if only a single value is wanted in the attribute, or a
reference to an array of strings if multiple values are wanted.
+ $mesg = $ldap->modify( $dn,
+ add => {
+ description => 'List of members', # Add description attribute
+ member => [
+ 'cn=member1,ou=people,dc=example,dc=com', # Add to attribute
+ 'cn=member2,ou=people,dc=example,dc=com',
+ ]
+ }
+ );
+
=item delete =E<gt> [ ATTR, ... ]
Delete complete attributes from the entry.
+
+ $mesg = $ldap->modify( $dn,
+ delete => ['member','description'] # Delete attributes
+ );
=item delete =E<gt> { ATTR =E<gt> VALUE, ... }
@@ -428,13 +442,40 @@
a reference to an array of strings if multiple values are being
deleted.
+If C<VALUE> is a reference to an empty array or all existing values
+of the attribute are being deleted, then the attribute will be
+deleted from the entry.
+
+ $mesg = $ldap->modify( $dn,
+ delete => {
+ description => 'List of members',
+ member => [
+ 'cn=member1,ou=people,dc=example,dc=com', # Remove members
+ 'cn=member2,ou=people,dc=example,dc=com',
+ ],
+ seeAlso => [], # Remove attribute
+ }
+ );
+
=item replace =E<gt> { ATTR =E<gt> VALUE, ... }
Replace any existing values in each given attribute with
C<VALUE>. C<VALUE> should be a string if only a single value is wanted
in the attribute, or a reference to an array of strings if multiple
values are wanted. A reference to an empty array will remove the
-entire attribute.
+entire attribute. If the attribute does not already exist in the
+entry, it will be created.
+
+ $mesg = $ldap->modify( $dn,
+ replace => {
+ description => 'New List of members', # Change the description
+ member => [ # Replace whole list with these
+ 'cn=member1,ou=people,dc=example,dc=com',
+ 'cn=member2,ou=people,dc=example,dc=com',
+ ],
+ seeAlso => [], # Remove attribute
+ }
+ );
=item increment =E<gt> { ATTR =E<gt> VALUE, ... }
@@ -444,6 +485,12 @@
advertizes support for LDAP_FEATURE_MODIFY_INCREMENT. Use
L<Net::LDAP::RootDSE/supported_feature> to check this.
+ $mesg = $ldap->modify( $dn,
+ increment => {
+ uidNumber => 1 # increment uidNumber by 1
+ }
+ );
+
=item changes =E<gt> [ OP =E<gt> [ ATTR =E<gt> VALUE ], ... ]
This is an alternative to B<add>, B<delete>, B<replace> and B<increment>
@@ -453,6 +500,21 @@
Use this form if you want to control the order in which the operations
will be performed.
+
+ $mesg = $ldap->modify( $dn,
+ changes => [
+ add => [
+ description => 'A description',
+ member => $newMember,
+ ],
+ delete => [
+ seeAlso => [],
+ ],
+ add => [
+ anotherAttribute => $value,
+ ],
+ ]
+ );
=item control =E<gt> CONTROL
Modified: trunk/libnet-ldap-perl/lib/Net/LDAP/Control/PasswordPolicy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/lib/Net/LDAP/Control/PasswordPolicy.pm?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/lib/Net/LDAP/Control/PasswordPolicy.pm (original)
+++ trunk/libnet-ldap-perl/lib/Net/LDAP/Control/PasswordPolicy.pm Fri Sep 26 14:56:26 2008
@@ -8,7 +8,7 @@
use Net::LDAP::Control;
@ISA = qw(Net::LDAP::Control);
-$VERSION = "0.01";
+$VERSION = "0.02";
use Net::LDAP::ASN qw(ppControlResponse);
use strict;
@@ -19,15 +19,16 @@
delete $self->{asn};
unless (exists $self->{value}) {
- $self->{asn} = {
- timeBeforeExpiration =>
- defined($self->{time_before_expiration}) ?
- $self->{time_before_expiration} : '',
- graceAuthNsRemaining =>
- defined($self->{grace_authentications_remaining}) ?
- $self->{grace_authentications_remaining} : '',
- error => defined($self->{error}) ? $self->{error} : '',
- };
+ $self->{asn} = \my %asn;
+ if (defined($self->{time_before_expiration})) {
+ $asn{warning}{timeBeforeExpiration} = defined($self->{time_before_expiration});
+ }
+ elsif (defined($self->{grace_authentications_remaining})) {
+ $asn{warning}{graceAuthNsRemaining} = $self->{time_before_expiration};
+ }
+ if (defined($self->{pp_error})) {
+ $asn{error} = $self->{pp_error};
+ }
}
$self;
@@ -38,9 +39,19 @@
$self->{asn} ||= $ppControlResponse->decode($self->{value});
if (@_) {
delete $self->{value};
- return $self->{asn}{timeBeforeExpiration} = shift || 0;
- }
- $self->{asn}{timeBeforeExpiration};
+ my $time = shift;
+ if (defined $time) {
+ $self->{asn}{warning} = { timeBeforeExpiration => $time };
+ }
+ elsif (my $warning = $self->{asn}{warning}) {
+ if (exists $warning->{timeBeforeExpiration}) {
+ delete $self->{asn}{warning};
+ }
+ }
+ return $time;
+ }
+ my $warning = $self->{asn}{warning};
+ $warning && $warning->{timeBeforeExpiration};
}
sub grace_authentications_remaining {
@@ -48,19 +59,38 @@
$self->{asn} ||= $ppControlResponse->decode($self->{value});
if (@_) {
delete $self->{value};
- return $self->{asn}{graceAuthNsRemaining} = shift || 0;
- }
- $self->{asn}{graceAuthNsRemaining};
-}
-
-sub error {
+ my $remaining = shift;
+ if (defined $remaining) {
+ $self->{asn}{warning} = { graceAuthNsRemaining => $remaining };
+ }
+ elsif (my $warning = $self->{asn}{warning}) {
+ if (exists $warning->{graceAuthNsRemaining}) {
+ delete $self->{asn}{warning};
+ }
+ }
+ return $remaining;
+ }
+ my $warning = $self->{asn}{warning};
+ $warning && $warning->{graceAuthNsRemaining};
+}
+
+sub pp_error {
my $self = shift;
$self->{asn} ||= $ppControlResponse->decode($self->{value});
if (@_) {
delete $self->{value};
- return $self->{asn}{error} = shift || 0;
+ return $self->{asn}{error} = shift;
}
$self->{asn}{error};
+}
+
+sub value {
+ my $self = shift;
+ return $self->{value} if exists $self->{value};
+ my $asn = $self->{asn};
+ # Return undef if all optional values are missing
+ return undef unless $asn and (defined $asn->{error} or $asn->{warning});
+ $self->{value} = $ppControlResponse->encode($self->{asn});
}
1;
@@ -89,7 +119,7 @@
my($resp) = $mesg->control( LDAP_CONTROL_PASSWORDPOLICY );
if (defined($resp)) {
- my $v = $resp->error;
+ my $v = $resp->pp_error;
print "Password policy error $v\n" if defined $v;
$v = $resp->time_before_expiration;
print "Password expires in $v second(s)\n" if defined $v;
@@ -123,7 +153,7 @@
If defined, this is an integer value holding the number of
authentication requests allowed before the account is locked.
-=item error
+=item pp_error
If defined, this contains a more detailed error code for the account.
See L<Net::LDAP::Constant> for definitions of each.
Modified: trunk/libnet-ldap-perl/lib/Net/LDAP/Extension.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/lib/Net/LDAP/Extension.pm?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/lib/Net/LDAP/Extension.pm (original)
+++ trunk/libnet-ldap-perl/lib/Net/LDAP/Extension.pm Fri Sep 26 14:56:26 2008
@@ -7,13 +7,13 @@
use vars qw(@ISA $VERSION);
@ISA = qw(Net::LDAP::Message);
-$VERSION = "1.01";
+$VERSION = "1.02";
#fetch the response name
sub response_name {
my $self = shift;
- $self->sync unless exists $self->{Code};
+ $self->sync unless exists $self->{resultCode};
exists $self->{responseName}
? $self->{responseName}
@@ -24,7 +24,7 @@
sub response {
my $self = shift;
- $self->sync unless exists $self->{Code};
+ $self->sync unless exists $self->{resultCode};
exists $self->{response}
? $self->{response}
Modified: trunk/libnet-ldap-perl/lib/Net/LDAP/Extension/SetPassword.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/lib/Net/LDAP/Extension/SetPassword.pm?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/lib/Net/LDAP/Extension/SetPassword.pm (original)
+++ trunk/libnet-ldap-perl/lib/Net/LDAP/Extension/SetPassword.pm Fri Sep 26 14:56:26 2008
@@ -3,7 +3,7 @@
require Net::LDAP::Extension;
-$VERSION = "0.02";
+$VERSION = "0.03";
@ISA = qw(Net::LDAP::Extension);
use Convert::ASN1;
@@ -25,7 +25,8 @@
my $res = $ldap->extension(
name => '1.3.6.1.4.1.4203.1.11.1',
- value => $passwdModReq->encode(\%opt)
+ value => $passwdModReq->encode(\%opt),
+ ($opt{control} ? (control => $opt{control}) : ())
);
bless $res; # Naughty :-)
Modified: trunk/libnet-ldap-perl/lib/Net/LDAP/RootDSE.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ldap-perl/lib/Net/LDAP/RootDSE.pm?rev=25633&op=diff
==============================================================================
--- trunk/libnet-ldap-perl/lib/Net/LDAP/RootDSE.pm (original)
+++ trunk/libnet-ldap-perl/lib/Net/LDAP/RootDSE.pm Fri Sep 26 14:56:26 2008
@@ -40,7 +40,7 @@
my $dse = $ldap->root_dse();
# get naming Contexts
- my @contexts = $dse->get_value('namingContext');
+ my @contexts = $dse->get_value('namingContexts');
# get supported LDAP versions as an array reference
my $versions = $dse->get_value('supportedLDAPVersion', asref => 1);
More information about the Pkg-perl-cvs-commits
mailing list