Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

changes for the next release #6

Merged
merged 10 commits into from

1 participant

@marschap
Owner

No description provided.

marschap added some commits
@marschap marschap RT#74572 fix $entry->update($ldif) bdb94c1
@marschap marschap RT#72108 fix non-blocking IO with SSL
Net::LDAP supports non-blocking IO using select(2).  It also supports
LDAPS by using IO::Socket::SSL.  The problem is that select(2) isn't
enough to see if there is any data on an SSL socket - one must also
check if there is any pending data in the SSL buffer that was already
read from the socket.

Patch by cbratcher@barracuda.com
7f9bbf6
@marschap marschap RT#74759 fix POD spelling/grammar errors
Spelling/grammar improvements used in Debian's package of perl-ldap.

Patch by gregor herrmann <gregoa@debian.org> of the Debian Perl Group
51995cd
@marschap marschap FAQ.pod: trim trailing blanks 57b6512
@marschap marschap FAQ.pod: fix typos bc321fd
@marschap marschap FAQ.pod: use official spelling of Perl 84abd9d
@marschap marschap FAQ.pod: update version used in example e14c341
@marschap marschap FAQ.pod: update perl-V output and site_perl location ef71621
@marschap marschap FAQ-pod: update locations where to get perl-ldap c2864c9
@marschap marschap FAQ.pod: some more fixes 4e04d53
@marschap marschap merged commit c579bc9 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 5, 2012
  1. @marschap
Commits on Feb 9, 2012
  1. @marschap

    RT#72108 fix non-blocking IO with SSL

    marschap authored
    Net::LDAP supports non-blocking IO using select(2).  It also supports
    LDAPS by using IO::Socket::SSL.  The problem is that select(2) isn't
    enough to see if there is any data on an SSL socket - one must also
    check if there is any pending data in the SSL buffer that was already
    read from the socket.
    
    Patch by cbratcher@barracuda.com
  2. @marschap

    RT#74759 fix POD spelling/grammar errors

    marschap authored
    Spelling/grammar improvements used in Debian's package of perl-ldap.
    
    Patch by gregor herrmann <gregoa@debian.org> of the Debian Perl Group
Commits on Apr 6, 2012
  1. @marschap
  2. @marschap

    FAQ.pod: fix typos

    marschap authored
  3. @marschap
  4. @marschap
  5. @marschap
  6. @marschap
  7. @marschap

    FAQ.pod: some more fixes

    marschap authored
This page is out of date. Refresh to see the latest.
View
2  lib/Net/LDAP.pm
@@ -845,7 +845,7 @@ sub process {
my $sel = IO::Select->new($sock);
my $ready;
- for( $ready = 1 ; $ready ; $ready = $sel->can_read(0)) {
+ for( $ready = 1 ; $ready ; $ready = $sel->can_read(0) || (ref($sock) eq 'IO::Socket::SSL' && $sock->pending())) {
my $pdu;
asn_read($sock, $pdu)
or return _drop_conn($ldap, LDAP_OPERATIONS_ERROR, "Communications Error");
View
4 lib/Net/LDAP/Constant.pm
@@ -404,7 +404,7 @@ Operation was canceled
=item LDAP_NO_SUCH_OPERATION (119)
-Server has no knowledge of the operation requested for cancelation
+Server has no knowledge of the operation requested for cancellation
=item LDAP_TOO_LATE (120)
@@ -412,7 +412,7 @@ Too late to cancel the outstanding operation
=item LDAP_CANNOT_CANCEL (121)
-The identified operation does not support cancelation or
+The identified operation does not support cancellation or
the cancel operation cannot be performed
=item LDAP_ASSERTION_FAILED (122)
View
2  lib/Net/LDAP/Control/MatchedValues.pm
@@ -83,7 +83,7 @@ by RFC 3876.
The C<MatchedValues Control>, which only has a meaning with the C<Search> operation,
allows the client to specify criteria that restrict the values of attributes returned.
-It has no effect on the number of objects found, but only allows to restrict the
+It has no effect on the number of objects found, but only allows one to restrict the
values of the attributes returned by the search to those matching the criteria.
View
2  lib/Net/LDAP/Control/PostRead.pm
@@ -54,7 +54,7 @@ by RFC 4527.
In modification operations, the C<Post-Read request control> indicates to the
server that a copy of the modified entry after the update is to be returned.
After the successful completion of the operation, the accompanying C<Post-Read
-response control> allows to retrieve the updated value from the servers's response.
+response control> allows one to retrieve the updated value from the servers's response.
One use case of this control may be to obtain values of operational attributes,
such as the C<entryUUID> and C<modifyTimestamp> attributes, updated by the server
View
2  lib/Net/LDAP/Control/PreRead.pm
@@ -108,7 +108,7 @@ by RFC 4527.
In modification operations, the C<Pre-Read request control> indicates to the
server that a copy of the original entry before the update is to be returned.
After the successful completion of the operation, the accompanying C<Pre-Read
-response control> allows to retrieve the original value from the servers's response.
+response control> allows one to retrieve the original value from the servers's response.
One use case of this control control may be to obtain replaced or deleted
values of modified attributes or a copy of the entry being deleted.
View
1  lib/Net/LDAP/Entry.pm
@@ -289,6 +289,7 @@ sub update {
}
}
elsif (ref($target) && UNIVERSAL::isa($target, 'Net::LDAP::LDIF')) {
+ require Net::LDAP::Message;
$target->write_entry($self);
$mesg = Net::LDAP::Message::Dummy->new();
$mesg->set_error(LDAP_OTHER, $target->error())
View
346 lib/Net/LDAP/FAQ.pod
@@ -11,7 +11,7 @@ Net::LDAP::FAQ - Frequently Asked Questions about Net::LDAP
This document serves to answer the most frequently asked questions on both the
perl-ldap Mailing List and those sent to Graham Barr.
-The latest version of this FAQ can be found at
+The latest version of this FAQ can be found at
http://ldap.perl.org/FAQ.html
@@ -22,27 +22,19 @@ The latest version of this FAQ can be found at
perl-ldap is the distribution name. The perl-ldap distribution contains
the Net::LDAP modules.
-=head2 Why another perl LDAP implementation ?
+=head2 Why another Perl LDAP implementation ?
perl-ldap's goal is to be as portable as possible. It does this by
-being implemented completely in perl. So basically anywhere that perl
+being implemented completely in Perl. So basically anywhere that Perl
runs perl-ldap will run. This is not true for other implementations
which require a C compiler.
=head2 Where can I get it ?
-Perl-ldap is available from CPAN. You will find it in the
-authors/id/GBARR directory. Alternatively you can download
-the latest version from
+Perl-ldap is available from CPAN.
+You can find the released versions at:
- http://www.cpan.org/search?dist=perl-ldap
-
-B<WARNING:> The perl-ldap module is stored on CPAN as a *.gz file.
-Netscape on Windows systems sometimes has a problem storing the module
-with the correct name, it will replace the *.tar.gz with *_tar.tar.
-To correct the problem, with the pointer on the link, do a right click
-and then select B<save link as> to save the file with the correct file
-name.
+ http://search.cpan.org/dist/perl-ldap/
=head2 Is there a web page for perl-ldap ?
@@ -73,75 +65,77 @@ which also has messages from before the move.
Yes. perl-ldap has online documentation at
- http://ldap.perl.org/
+ http://ldap.perl.org/
which will have the latest documentation available.
-=head2 Is there a public CVS repository ?
+=head2 Is there a public repository ?
-No, but there is a public SVN repository at
+Yes, there is a public Git repository at
- http://svn.mutatus.co.uk
+ https://github.com/perl-ldap/perl-ldap
-=head2 Can I get perl-ldap from the public SVN repository?
+=head2 Can I get perl-ldap from the public Git repository?
-Yes, any one can pull perl-ldap from the public SVN repository
-on perl.ldap.org.
+Yes, anyone can pull perl-ldap from the public Git repository
+on GitHub.
-There are several ways this can be done.
+There are several ways this can be done - see below.
=over 4
-=item Web
+=item CPAN
+
+You can download it from CPAN by following the "Download" link on:
+
+ http://search.cpan.org/dist/perl-ldap/
+
+Example;
-You can download it from CPAN by following the release link:
+ http://search.cpan.org/CPAN/authors/id/M/MA/MARSCHAP/perl-ldap-0.44.tar.gz
-The 2 lines in the following example should be put together as
-one continuous line. Example;
+=item Git - fork on GitHub
- http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/perl-ldap-0.33.tar.gz
+If you have an account on Github (there's a free variant), you can easily
+fork the perl-ldap respository on GitHub.
+When logged on to GitHub, navigate to the perl-ldap repository
-B<WARNING:> The perl-ldap module is stored on CPAN as a *.gz file.
-Netscape on Windows systems sometimes has a problem storing the module
-with the correct name, it will replace the *.tar.gz with *_tar.tar.
-To correct the problem, with the pointer on the link, do a right click
-and then select B<save link as> to save the file with the correct file
-name.
+ https://github.com/perl-ldap/perl-ldap
-=item SVN
+and simply click on the "Fork" button near the top-right corner.
+
+=item Git - clone repository
You can download latest development version of perl-ldap from
-svn.mutatus.co.uk by executing a anonymous SVN "checkout" command.
+GitHub by cloning the repsoitory using the command:
+
+ git clone https://github.com/perl-ldap/perl-ldap.git
+
+This command will create a directory named 'perl-ldap' in your
+current directory containing a local clone of the repository.
-The 2 lines in the following example should be put together as
-one continuous line. Example;
+Keeping your local repository in sync with perl-ldap's GitHub repository
+is easy:
- svn co http://svn.mutatus.co.uk/repos/perl-ldap/trunk
+ cd perl-ldap
+ git pull
=item Web page
-Most of the time there is a URL link on the perl-ldap
+Most of the time there is a URL link on the perl-ldap
home page on ldap.perl.org that points to the latest released
version of perl-ldap. Due to the fact that humans must
update the web page to point to a new release it sometimes does
not get updated as quickly as it should.
-B<WARNING:> The perl-ldap module is stored on CPAN as a *.gz file.
-Netscape on Windows systems sometimes has a problem storing the module
-with the correct name, it will replace the *.tar.gz with *_tar.tar.
-To correct the problem, with the pointer on the link, do a right click
-and then select B<save link as> to save the file with the correct file
-name.
-
=back
-=head2 What is SVN.
+=head2 What is Git.
-"SVN" is an abbreviation for "Subversion" (see http://subversion.tigris.org).
-Subversion is a "Source Control" or "Revision Control" tool
-designed to keep track of source changes made by groups of
-developers working on the same files, allowing them to
-stay in sync with each other as each individual chooses.
+Git (see http://git-scm.com) is a distributed version control system
+designed to keep track of source changes made by groups of developers
+working on the same files, allowing them to stay in sync with each other
+as each individual chooses.
=head1 LDAP AND DIRECTORY TERMINOLOGY.
@@ -167,7 +161,7 @@ Requests For Comments, better known as RFCs. The RFCs can be found on
the Internet at http://www.ietf.org/ (the master repository) and many
other places. There's a link to all the LDAP-related RFCs at
Perl-LDAP's web site, http://ldap.perl.org/rfc.html. Some of the more
-important RFC numbers are RFC 451i0 - 4519 for LDAP (previously called
+important RFC numbers are RFC 4510 - 4519 for LDAP (previously called
LDAPv3) and the historic RFC 1777 for LDAPv2.
=head2 What is a LDAP Directory.
@@ -183,7 +177,7 @@ communicating with a client.
=head2 What is an Entry.
-The traditional directory definition of a directory object
+The traditional directory definition of a directory object
is called an Entry. Entries are composed of attributes that
contain the information to be recorded about the object.
@@ -206,7 +200,7 @@ An entry's direct superior entry is called the entry's 'parent'.
The entry(s) in a directory are composed of attributes that contain
information about the object. Each attribute has a type
-and can contain one or more values.
+and can contain one or more values.
For example:
@@ -292,11 +286,11 @@ Technically, an RDN contains attribute-value assertions, or AVAs. When
an AVA is written down, the attribute name is separated from the
attribute value with an equals (=) sign.
-Example of a DN:
+Example of a DN:
cn=Road Runner,ou=bird,dc=cartoon,dc=com
- RDNs of the proceeding DN:
+ RDNs of the proceeding DN:
RDN => cn=Road Runner
RDN => ou=bird
RDN => dc=cartoon
@@ -332,26 +326,26 @@ entry still only has one DN.
=head2 What is a search base.
-A search base is a Distinguished Name that is the
+A search base is a Distinguished Name that is the
starting point of search queries.
Example of a DN:
- cn=Road Runner,ou=bird,dc=cartoon,dc=com
+ cn=Road Runner,ou=bird,dc=cartoon,dc=com
Possible search base(s) for the proceeding DN:
- Base => cn=Road Runner,ou=bird,dc=cartoon,dc=com
- Base => ou=bird,dc=cartoon,dc=com
- Base => dc=cartoon,dc=com
- Base => dc=com
+ Base => cn=Road Runner,ou=bird,dc=cartoon,dc=com
+ Base => ou=bird,dc=cartoon,dc=com
+ Base => dc=cartoon,dc=com
+ Base => dc=com
Setting the search base to the lowest possible branch of
the directory will speed up searches considerably.
=head2 What is the difference between a LDAP server and a relational database.
-The most basic difference is that a directory server is a
+The most basic difference is that a directory server is a
specialized database designed to provide fast searches. While a relational
database is optimized for transactions (where a series of operations is
counted as 1, thus if one of the steps fails, the RDBMS can roll-back to
@@ -373,14 +367,14 @@ network. There's language specific protocols (like Perl's DBI and Java's
JDBC) that hide this problem behind an API abstraction, but that's not a
replacement for a standard access protocol.
-LDAP is starting to be used on roles traditionally played by RDBMS in
-terms of general data management because it's easier to setup a LDAP
-server (once you understand the basic nomenclature) and you don't need
-a DBA to write your queries and more importantly all LDAP servers speak
-the same essential protocol, thus you don't have to fuss with a
-database driver trying to connect it to the Internet. Once you have an
-LDAP server up and running, it's automatically available over the 'net.
-It's possible to connect to a LDAP server from a variety of mechanisms,
+LDAP is starting to be used on roles traditionally played by RDBMS in
+terms of general data management because it's easier to setup a LDAP
+server (once you understand the basic nomenclature) and you don't need
+a DBA to write your queries and more importantly all LDAP servers speak
+the same essential protocol, thus you don't have to fuss with a
+database driver trying to connect it to the Internet. Once you have an
+LDAP server up and running, it's automatically available over the 'net.
+It's possible to connect to a LDAP server from a variety of mechanisms,
including just about every possible programming language.
More information on this topic can be found on the following URLs;
@@ -407,11 +401,11 @@ To install the modules that are in the perl-ldap distribution follow the
same steps that you would for most other distributions found on CPAN, that
is
- # replace 0.33 with the version you have
+ # replace 0.44 with the version you have
- gunzip perl-ldap-0.33.tar.gz
- tar xvf perl-ldap-0.33.tar
- cd perl-ldap-0.33
+ gunzip perl-ldap-0.44.tar.gz
+ tar xvf perl-ldap-0.44.tar
+ cd perl-ldap-0.44
perl Makefile.PL
make
@@ -425,29 +419,31 @@ complex, so a simple copy is enough to install. First run
perl -V
-This will output information about the version of perl you have
+This will output information about the version of Perl you have
installed. Near the bottom you will find something like
@INC:
- /usr/local/perl/perl5.005/lib/5.00502/sun4-solaris
- /usr/local/perl/perl5.005/lib/5.00502
- /usr/local/perl/perl5.005/lib/site_perl/5.005/sun4-solaris
- /usr/local/perl/perl5.005/lib/site_perl/5.005
- .
-
-This is a list of directories that perl searches when it is looking for
+ /usr/local/lib/perl/5.8.3
+ /usr/local/share/perl/5.8.3
+ /usr/lib/perl5
+ /usr/share/perl5
+ /usr/lib/perl/5.8.3
+ /usr/share/perl/5.8.3
+ /usr/local/lib/site_perl
+
+This is a list of directories that Perl searches when it is looking for
a module. The directory you need is the site_perl directory, but without
the system architecture name, in this case it is
-C</usr/local/perl/perl5.005/lib/site_perl/5.005>. The files required
+C</usr/local/lib/site_perl>. The files required
can then be installed with
- # replace 0.33 with the version you have
+ # replace 0.44 with the version you have
- gunzip perl-ldap-0.33.tar.gz
- tar xvf perl-ldap-0.33.tar
- cd perl-ldap-0.33/lib
+ gunzip perl-ldap-0.44.tar.gz
+ tar xvf perl-ldap-0.44.tar
+ cd perl-ldap-0.44/lib
- cp * /usr/local/perl/perl5.005/lib/site_perl/5.005
+ cp * /usr/local/lib/site_perl
=head2 How can I load Perl-LDAP into an ActiveState Perl installation.
@@ -461,23 +457,23 @@ ActiveState Perl tree.
The ActiveState ppm command can be used to install Perl-LDAP.
When a new version of Perl-LDAP is released, it takes ActiveState
a period of time to get the new release into the ActiveState ppm
-system.
+system.
=item 2.
-If the user has nmake installed, the user can do a normal perl
+If the user has nmake installed, the user can do a normal Perl
module install using nmake instead of make.
=item 3.
-If the user does not have nmake or make, the user can install
-Perl-LDAP using the install-nomake script by issuing the
+If the user does not have nmake or make, the user can install
+Perl-LDAP using the install-nomake script by issuing the
following command.
perl install-nomake
The install-nomake script can be used on any system that does not
-have make installed.
+have make installed.
=back
@@ -541,14 +537,14 @@ web search engine to find the package that you need.
If you want to use Net::LDAP::DSML you will need these modules.
You can obtain the latest releases from
- http://search.cpan.org/search?module=XML::SAX
+ http://search.cpan.org/search?module=XML::SAX
http://search.cpan.org/search?module=XML::SAX::Writer
=item ResourcePool::Factory::Net::LDAP
If you want to use failover the ResourcePool::Factory::Net::LDAP
-perl module provides methods to do this.
+Perl module provides methods to do this.
You can obtain the latest release from
http://search.cpan.org/search?module=ResourcePool::Factory::Net::LDAP
@@ -589,8 +585,8 @@ the directory manager.
=head2 How can I tell when the server returns an error, bind() always returns
true ?
-Most methods in Net::LDAP return a L<Net::LDAP::Message>
-object, or a sub-class of that. This object will hold the results
+Most methods in Net::LDAP return a L<Net::LDAP::Message>
+object, or a sub-class of that. This object will hold the results
from the server, including the result code.
So, for example, to determine the result of the bind operation.
@@ -654,7 +650,7 @@ shift each entry in turn. For example
# as an array
# How many entries were returned from the search
- my $max = $mesg->count;
+ my $max = $mesg->count;
for( my $index = 0 ; $index < $max ; $index++) {
my $entry = $mesg->entry($index);
@@ -687,7 +683,7 @@ And to get the first of the values for a given attribute
$values = $entry->get( 'cn' );
-One thing to remember is that attribute names are case
+One thing to remember is that attribute names are case
insensitive, so 'sn', 'Sn', 'sN' and 'SN' are all the same.
So, if you want to print all the values for the attribute C<'ou'> then this
@@ -709,7 +705,7 @@ can do
=head2 How do I limit the scope of a directory search.
You limit the scope of a directory search by setting the
-scope parameter of search request.
+scope parameter of search request.
Consider the following:
use Net::LDAP;
@@ -736,7 +732,7 @@ Search the entries immediately below the base object.
=item sub
Search the whole tree below the base object.
-This is the default.
+This is the default.
=back
@@ -751,7 +747,7 @@ Using the inline approach involves requesting the data and
then waiting for all of the data to be returned before the
user starts processing the data.
-Example:
+Example:
use Net::LDAP;
@@ -767,9 +763,9 @@ Example:
# In this example we will use an array
# How many entries were returned from the search
- my $max = $mesg->count;
+ my $max = $mesg->count;
- for( my $index = 0 ; $index < $max ; $index++)
+ for( my $index = 0 ; $index < $max ; $index++)
{
my $entry = $mesg->entry($index);
my $dn = $entry->dn; # Obtain DN of this entry
@@ -779,20 +775,20 @@ Example:
{
#get a list of values for a given attribute
$attr = $entry->get_value( $var, asref => 1 );
- if ( defined($attr) )
- {
- foreach my $value ( @$attr )
- {
+ if ( defined($attr) )
+ {
+ foreach my $value ( @$attr )
+ {
print "$var: $value\n"; # Print each value for the attribute.
- }
- }
+ }
+ }
}
}
-As you can see the example is straight forward, but there is one
+As you can see the example is straightforward, but there is one
drawback to this approach. You must wait until all entries for the
request search to be returned before you can process the data. If
-there several thousand entries that match the search filter this
+there several thousand entries that match the search filter this
could take quite a long time period.
=head2 USING THE CALLBACK SUBROUTINE APPROACH
@@ -803,7 +799,7 @@ to a callback subroutine as each entry arrives at the client.
A callback is just a subroutine that is passed two parameters when
it is called, the mesg and entry objects.
-Example:
+Example:
use Net::LDAP;
@@ -817,7 +813,7 @@ Example:
#
# At this point the user needs to check the status of the
# ldap search.
- #
+ #
if ( $mesg->code )
{
@@ -825,7 +821,7 @@ Example:
print "Error code: $errstr\n";
$errstr = ldap_error_text($errstr);
print "$errstr\n";
- }
+ }
sub callback
@@ -851,17 +847,17 @@ Example:
{
#get a list of values for a given attribute
$attr = $entry->get_value( $var, asref => 1 );
- if ( defined($attr) )
- {
- foreach my $value ( @$attr )
- {
+ if ( defined($attr) )
+ {
+ foreach my $value ( @$attr )
+ {
print "$var: $value\n"; # Print each value for the attribute.
- }
- }
+ }
+ }
}
#
# For large search requests the following 2 lines of code
- # may be very important, they will reduce the amount of memory
+ # may be very important, they will reduce the amount of memory
# used by the search results.
#
# If the user is not worried about memory useage then the 2 lines
@@ -871,9 +867,9 @@ Example:
} # End of callback subroutine
-As you can see the example is straight forward and it does not waste
+As you can see the example is straightforward and it does not waste
time waiting for all of the entries to be returned. However if the
-pop_entry method is not used the callback approach can allocate a
+pop_entry method is not used the callback approach can allocate a
lot of memory to the search request.
=head1 USING NET::LDAPS
@@ -883,7 +879,7 @@ lot of memory to the search request.
This class is a subclass of Net::LDAP so all the normal
Net::LDAP methods can be used with a Net::LDAPS object;
see the documentation for Net::LDAP to find out how to
-query a directory server using the LDAP protocol.
+query a directory server using the LDAP protocol.
The connection to the server is created when you create a new Net::LDAPS
object, e.g.
@@ -903,9 +899,9 @@ So, the above can also be expressed as:
capath => '/usr/local/cacerts/',
);
-There are additional options to the new method with LDAPS URIs
+There are additional options to the new method with LDAPS URIs
and the LDAPS new method and several additional methods are
-included in the LDAPS object class.
+included in the LDAPS object class.
For further information and code examples read the LDAPS
module documentation; perldoc Net::LDAPS
@@ -924,24 +920,24 @@ but some LDAP server vendors restrict this flexibility by not
allowing nested groups in their servers.
Two scripts for working with groups are available in the contrib
-directory. They are isMember.pl and printMembers.pl.
+directory. They are isMember.pl and printMembers.pl.
=head2 How do you format a filter to search for entries whose 'member'
-attribute has a particular value?
+attribute has a particular value?
-Asking for (member=*) is OK - the directory uses the equality matching
+Asking for (member=*) is OK - the directory uses the equality matching
rule which is defined for the member attribute.
-Asking for (member=c*) is not OK - there is no defined substring
-matching rule for the member attribute. That's because the member
-values are *not* strings, but distinguished names. There is no
+Asking for (member=c*) is not OK - there is no defined substring
+matching rule for the member attribute. That's because the member
+values are *not* strings, but distinguished names. There is no
substring matching rule for DNs, see RFC 2256 section 5.50.
-What you have to do is get the results of (member=*) and then select
-the required results from the returned values. You need to do this
-using knowledge of the string representation of DNs defined in RFC
-2253, which is important because the same DN can have different string
-representations. So you need to perform some canonicalization if you
+What you have to do is get the results of (member=*) and then select
+the required results from the returned values. You need to do this
+using knowledge of the string representation of DNs defined in RFC
+2253, which is important because the same DN can have different string
+representations. So you need to perform some canonicalization if you
want to be correct.
@@ -972,7 +968,7 @@ module documentation; perldoc Net::LDAP::DSML
=head2 How do I access the Control features.
-Support for LDAP version 3 Control objects is included in
+Support for LDAP version 3 Control objects is included in
perl-ldap starting with version .20.
For further information and code examples read the Control
@@ -980,7 +976,7 @@ module documentation; perldoc Net::LDAP::Control
=head2 How do I access the Virtual List features.
-Support for Virtual Lists is included in perl-ldap starting
+Support for Virtual Lists is included in perl-ldap starting
with version .20.
For further information and code examples read the Control
@@ -1004,23 +1000,23 @@ there are no performance issues with perl-ldap.
Where you may wish to use perl-ldap to perform, for example, a very
large number of queries (e.g. 10,000) in succession you may find a
-noticeable performance difference between perl-ldap and non pure-perl
+noticeable performance difference between perl-ldap and non pure-Perl
modules. This is not because of perl-ldap itself but because of the
-pure-perl Convert::ASN1 module that it depends on.
+pure-Perl Convert::ASN1 module that it depends on.
You should make up your own mind, based upon your own situation
(performance requirements, hardware etc.) as to whether you should use
perl-ldap or not. The figures quoted in this answer are only
indicative, and will differ for different people.
-=head2 Can I contribute perl scripts that use perl-ldap
-to the contrib section?
+=head2 Can I contribute Perl scripts that use perl-ldap
+to the contrib section?
-Any one can submit a perl script that uses perl-ldap for inclusion
+Any one can submit a Perl script that uses perl-ldap for inclusion
in the contrib section. Graham Barr will determine if the script
will be included and will do the initial check in of the script
to the SVN system on http://svn.mutatus.co.uk. Graham will make you
-the owner/developer of the script.
+the owner/developer of the script.
There are a couple of requirements for consideration.
@@ -1031,19 +1027,19 @@ Inside the script will be the pod documentation for the script.
No auxiliary documentation will be allowed. For examples of how
to do this see the tklkup script currently in the contrib section.
-=head2 Is it possible to get a complete entry, DN and attributes
+=head2 Is it possible to get a complete entry, DN and attributes
without specifying the attributes name?
-Yes, just specify you want a list of no attributes back. The RFC says
-that this tells the server to return all readable attributes back
+Yes, just specify you want a list of no attributes back. The RFC says
+that this tells the server to return all readable attributes back
(there may be access controls to prevent some from being returned.)
So in the search method, just set (for LDAPv2):
attrs => [ ]
-If you are using LDAPv3, you can specify an attribute called "*"
-instead, which lets you ask for additional (i.g. operational) attributes
+If you are using LDAPv3, you can specify an attribute called "*"
+instead, which lets you ask for additional (i.g. operational) attributes
in the same search.
attrs => [ "*" ]
@@ -1053,12 +1049,12 @@ the use of the "+" pseudo attribute. So that with these servers
attrs => [ "*", "+" ]
-will return the most information from the server.
+will return the most information from the server.
=head2 How do I put a JPEG photo into a entry in the directory.
Follow the following code example, replacing the (...) with
-whatever is relevant to your setup.
+whatever is relevant to your setup.
use Net::LDAP;
use Net::LDAP::Util qw(ldap_error_text);
@@ -1077,7 +1073,7 @@ whatever is relevant to your setup.
=head2 How do I add a jpeg photo into a entry in the directory via html-forms.
Follow the following code example, replacing the (...) with
-whatever is relevant to your setup.
+whatever is relevant to your setup.
use Net::LDAP;
use Net::LDAP::Util qw(ldap_error_text);
@@ -1109,7 +1105,7 @@ whatever is relevant to your setup.
=head2 What happens when you delete an attribute that does not exist.
-It is an error to delete an attribute that doesn't exist. When you
+It is an error to delete an attribute that doesn't exist. When you
get the error back the server ignores the entire modify operation
you sent it, so you need to make sure the error doesn't happen.
@@ -1138,7 +1134,7 @@ type.
The code required will look similar to the following code snippet.
$mesg = $ldap->delete("ref=\"ldap://acme/c=us,o=bricks\",o=clay",
- control => {type => "2.16.840.1.113730.3.4.2"} );
+ control => {type => "2.16.840.1.113730.3.4.2"} );
=head2 How do I add an ACI/ACL entry to a directory server with
Perl-LDAP.
@@ -1159,10 +1155,10 @@ When loading a binary attribute with data read from a file on a Win32
system, it has been noted that you should set "binmode" on the file
before reading the file contents into the data array.
-Another possible solution to this problem is to convert the
+Another possible solution to this problem is to convert the
binary data into a base64 encoded string and then store the encoded string
-in the file. Then when reading the file, decode the base64 encoded
-string back to binary and then use perl ldap to store the data
+in the file. Then when reading the file, decode the base64 encoded
+string back to binary and then use perl-ldap to store the data
in the directory.
=head2 How do I create a Microsoft Exchange 5.x user.
@@ -1171,7 +1167,7 @@ This is a solution provide by a perl-ldap user.
This code works with ActiveState Perl running on WinNT 4. Please note that
this requires the Win32::Perms module, and needs valid NT account info to
-replace the placeholders.
+replace the placeholders.
use Net::LDAP;
use Net::LDAP::Util;
@@ -1230,12 +1226,12 @@ replace the placeholders.
Most LDAP servers use the standard userPassword attribute as the
attribute to set when you want to change a user's password.
-They usually allow to set the password either using the regular
+They usually allow to set the password either using the regular
modify operation on the userPassword attribute or using the
extended LDAP Password Modify operation defined in RFC3062.
The recommended method is the extended Password Modify operation,
-which offers a standardized way to set user passwords but
+which offers a standardized way to set user passwords but
unfortunately is not available on all LDAP servers.
Whether the extended Password Modify operation is available can be
@@ -1273,7 +1269,7 @@ support to set the password (which is heavily recommended anyway ;-)
=back
-Here is an example of how to change your own password (for brevity's
+Here is an example of how to change your own password (for brevity's
sake error checking is left out):
use Net::LDAP;
@@ -1355,11 +1351,11 @@ Here is one possible solution.
unless ( $ldaps =
Net::LDAPS->new($ldapserverone,
- port=>636,timeout=>5) )
+ port=>636,timeout=>5) )
{
$ldaps = Net::LDAPS->new($ldapservertwo,
- port=>636,timeout=>20) ||
- return
+ port=>636,timeout=>20) ||
+ return
"Can't connect to $ldapserverone or $ldapservertwo via LDAPS: $@";
}
@@ -1447,7 +1443,7 @@ I<This web site has a nasty habit of resizing the browser
to cover the WHOLE screen.>
http://www.ldaps.com
-Jeff Hodges's Kings Mountain LDAP
+Jeff Hodges's Kings Mountain LDAP
http://www.kingsmountain.com/ldapRoadmap.shtml
Mark Wahl's LDAP World at Innosoft.
@@ -1491,7 +1487,7 @@ http://www.java.sun.com/jndi/
Sun One, formerly Iplanet.
http://wwws.sun.com/software/
-Eine deutsche LDAP Website
+Eine deutsche LDAP Website
A german LDAP Website
http://verzeichnisdienst.de/ldap/Perl/index.html
@@ -1512,20 +1508,20 @@ By Sven B. Schreiber. ISBN: 0201657775
Implementing LDAP.
By Mark Wilcox. ISBN: 1861002211
-LDAP: Programming Directory-Enabled Applications With
-Lightweight Directory Access Protocol.
+LDAP: Programming Directory-Enabled Applications With
+Lightweight Directory Access Protocol.
By Tim Howes, Mark Smith. ISBN: 1578700000
LDAP Programming; Directory Management and Integration.
By Clayton Donley. ISBN: 1884777910
-LDAP Programming with Java.
+LDAP Programming with Java.
By Rob Weltman, Tony Dahbura. ISBN: 0201657589
LDAP System Administration.
By Gerald Carter. ISBN: 1565924916
-Managing Enterprise Active Directory Services.
+Managing Enterprise Active Directory Services.
By Robbie Allen, Richard Puckett. ISBN: 0672321254
Solaris and LDAP Naming Services.
@@ -1549,7 +1545,7 @@ It was previously updated by Clif Harden E<lt>charden@pobox.comE<gt>.
The original author of this FAQ was Graham Barr E<lt>gbarr@pobox.comE<gt>
-Please report any bugs, or post any suggestions, to the
+Please report any bugs, or post any suggestions, to the
perl-ldap mailing list E<lt>perl-ldap@perl.orgE<gt>.
=head1 COPYRIGHT
View
2  lib/Net/LDAP/LDIF.pod
@@ -158,7 +158,7 @@ Write the entries to the LDIF file.
=item write_version ( )
-If the object's version is defined, this method allows to explicitly
+If the object's version is defined, this method allows one to explicitly
write the version before an entry is written.
If not called explicitly, it gets called automatically when writing
View
9 lib/Net/LDAP/Message.pm
@@ -252,6 +252,15 @@ sub Net::LDAP::Compare::is_error {
@ISA = qw(Net::LDAP::Message);
use Net::LDAP::Constant qw(LDAP_SUCCESS);
+ sub new {
+ my $self = shift;
+ my $type = ref($self) || $self;
+
+ $self = bless {}, $type;
+
+ $self;
+ }
+
sub sync { shift }
sub decode { shift }
sub abandon { shift }
Something went wrong with that request. Please try again.