Hello!

I have a question about an LDAP query with Net::LDAP. I send queries to
an OpenLDAP server (version 2.2.24). The queries are very simple and
intended to detect already existing user entries. The code that prepares
and sends the query looks like this:

$filter    = "(uid=".$username.")";
$filterobj = Net::LDAP::Filter->new($filter);
$lres      = $ldap->search( base => $base,
                            scope => 'sub',
                            sizelimit => 1,
                            timelimit => 15,
                            attrs => ['uid','cn','mail','accountStatus'],
                            filter => $filterobj );

I ask for four attributes. The entry belong to the account object
classes. accountStatus and mail is from qmail-ldap's object classes. The
script and the OpenLDAP server sit on the same host, so I talk to
localhost via TCP and OpenLDAP V3. TLS is not used. The bind works, the
login works, the query is sent and the OpenLDAP server returns the
resulting attributes. I double checked this with ldapsearch on the
command line and with the tethereal sniffer by observing the TCP
connection. However the resulting error code I get in the script is
LDAP_DECODING_ERROR. I have no idea what I did wrong or what happenend
here. Can anyone shed some light on this?

The system the script is running on is a Debian Sarge 3.1r1 with the
latest upgrades. The OpenLDAP server is compiled from source.

Best regards,
Lynx.

-- 
  )\._.,--....,'``.      Let GNU/Linux work for you while you take a nap.
 /,   _.. \   _\  (`._ ,. R. Pfeiffer <lynx at luchs.at> + http://web.luchs.at/
`._.-(,_..'--(,_..'`-.;.'  - System administration + Consulting + Teaching -

Attachment: pgpkM0Fy2NgfD.pgp
Description: PGP signature

Reply via email to