|
From: Michael G. <gri...@am...> - 2001-06-05 18:58:51
|
Hi, I'm fairly new to Net::LDAP (Just started a yesterday). The examples
that I found in the documentation were pretty good, and got me up and
running, but now I'm having a problem that I can't figure out.
I'm testing a bind to the server with this snippet of code, and when it
fails because I input the wrong password, it returns a 0 ("LDAP_SUCCESS"),
when it should be returning a 49 ("BAD Credentials")
$ldap = Net::LDAP->new($LDAPSERVER) or die "$@";
$error = $ldap->bind (
dn => $dn,
password => $FORM{'pass'}
);
if ($error->code) {
$ldapmsg = ldap_error_name($mesg->code);
$code = $mesg->code;
error("Authentication Failed<P>LDAP replied:<br>$ldapmsg<br>$code");
}
(error is a little custom die subroutine that outputs html)
When it fails, $error->code = 0
I am using version 0.23, Perl 5.6.0, on OpenBSD 2.8, connecting to Netware
LDAP v. 3 server
Any help would be greatly appreciated. Thank you.
Michael Grinnell
gri...@am...
perl -V output follows:
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=openbsd, osvers=2.8, archname=i386-openbsd
uname='openbsd'
config_args='-Dopenbsd_distribution=defined -dsE'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O2', gccversion=2.95.3 19991030 (prerelease)
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccflags ='-fno-strict-aliasing -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/usr/lib
libs=-lm -lc
libc=/usr/lib/libc.a, so=so, useshrplib=true, libperl=libperl.so.6.0
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=define, ccdlflags=' '
cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC '
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Locally applied patches:
SUIDMAIL - fixes for suidperl security
Built under openbsd
Compiled at Oct 31 2000 17:00:35
@INC:
/usr/libdata/perl5/i386-openbsd/5.6.0
/usr/local/libdata/perl5/i386-openbsd/5.6.0
/usr/libdata/perl5
/usr/local/libdata/perl5
/usr/local/libdata/perl5/site_perl/i386-openbsd
/usr/libdata/perl5/site_perl/i386-openbsd
/usr/local/libdata/perl5/site_perl
/usr/libdata/perl5/site_perl
/usr/local/lib/perl5/site_perl
.
|