Hernando Barake <nandobarake at yahoo.com> wrote: Jay,
I am using the OpenLDAP libraries with the plain LDAP protocol. I had
the sample problem you described on the list and I noticed that the
OpenLDAP libraries did not have an "ldap_initialize" function (do "man
ldap" on Linux).
Are you using the same openldap version? Mine is 2.3.17. It is running on port 389. When I leave the auth_ldap.c untouched, I got an "No such file or directory error", when I commented those four(4) lines you told me to comment so that ldap_init is called instead of ldap_initialize, I got a "Protocol error". Now, I'm really lost, are you sure that you didn't touch anything aside from auth_ldap.c? It's been three days and I still haven't made it to work. Please, help me more.
I think my openldap version have both ldap_init and ldap_initialize.
From the ldap(3)
"The basic interaction is as follows. A session handle is created using
ldap_initialize(3) and set the protocol version to 3 by calling
ldap_set_option(3)."
Also, in ldap.h, I can see some lines like this:
#if LDAP_DEPRECATED
LDAP_F( LDAP * )
ldap_init LDAP_P(( /* deprecated */
LDAP_CONST char *host,
int port ));
LDAP_F( LDAP * )
ldap_open LDAP_P(( /* deprecated */
LDAP_CONST char *host,
int port ));
#endif
LDAP_F( int )
ldap_create LDAP_P((
LDAP **ldp ));
LDAP_F( int )
ldap_initialize LDAP_P((
LDAP **ldp,
LDAP_CONST char *url ));
Anymore idea?
Thanks!
I checked the logic for the "#if defined(WITH_OPENLDAP)" lines around
ldap_initialize and fixed them to make sure ldap_init() was called
instead. That solved the problem for me.
Good luck,
Hernando
--- jay alvarez wrote:
>
>
> Dave Carrigan wrote: jay alvarez wrote:
>
> > You mean these lines:
> >
> > //#if defined(WITH_OPENLDAP) && LDAP_VENDOR_VERSION >= 20000
> > // if ((ldap_initialize(&(sec->ldc->ldap), (sec->url))) !=
> LDAP_SUCCESS) {
> > //#else
> > if ((sec->ldc->ldap = ldap_init(sec->host, sec->port)) ==
> NULL) {
> > //#endif
> >
> > Commenting those lines did solved the problem:
> > "Could not connect to LDAP server: No such file or directory"
> >
> > but now, the error turned into:
> >
> > Could not bind to LDAP server `192.168.0.3' as uid
> > =jay,ou=people,o=example,dc=com: Protocol error
>
> Are you using ldap over SSL or plain ldap?
>
> I started ldap as "ldap -H "ldap:/// ldapi:/// ldaps:///"
> The URL I specified in my httpd.conf uses plain ldap
> AuthLDAPUrl ldap://192.168.0.3:389/ou=people,o=example,dc=com??sub
> Also, my ldap installation also supports TLS/SSL but
>
> both 1.6.1 and 1.6.0 with patches returns the same error.
> I even tried to change
> >=20000 to < 20000 as someone advised..
>
> Anymore idea?
> --
> Dave Carrigan
> Seattle, WA, USA
> dave at rudedog.org | http://www.rudedog.org/
>
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL-Postfix
>
> Dave is currently listening to The Pogues - Greenland Whale Fisheries
> (Live, 1985-03-01)
>
> _______________________________________________
> Auth_ldap mailing list
> Auth_ldap at rudedog.org
> http://www.rudedog.org/mailman/listinfo/auth_ldap
>
>
>
> ---------------------------------
> Yahoo! Mail
> Bring photos to life! New PhotoMail makes sharing a breeze. >
_______________________________________________
> Auth_ldap mailing list
> Auth_ldap at rudedog.org
> http://www.rudedog.org/mailman/listinfo/auth_ldap
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------
Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.rudedog.org/pipermail/auth_ldap/attachments/20060308/025ddff6/attachment.htm