Anyone experience with compiling ldap modules?

Anyone experience with compiling ldap modules?

Post by richard.van.e » Wed, 16 Jun 1999 04:00:00



Hello, I'm desperate !!!!!

For 4 days now, I'm trying to set up an apache-server that uses
authentication using the LDAP protocol.
The problem is, that I don't seem to get the module to compile properly.
I hope someone can help me out with this, because I
am really getting frustrated about this. This is what I am trying to do:

Linux installation: RedHat 5.2
OpenSSL installation: OpenSSL-0.9.3a
OpenLDAP installation: the latest version ??
Apache version: 1.3.6
Mod_SSL: 2.3.1-1.3.6
auth_ldap from Dave Carrigan
(ftp://ftp.enbridge.com/pub/dhc/auth_ldap.html) both version 1.2.3 and
1.3.2

Procedure:

Compile Apache and MOD_ssl  --> works fine
Compile auth_ldap as a DSO and I get the following messages:
#make

gcc -c -o auth_ldap.o -DLINUX=2 -DMOD_SSL=203101 -DUSE_HSREGEX -DEAPI
-Wall -DAUTH_LDAP_FRONTPAGE_HACK -DWITH_OPENLDAP -fpic -DSHARED_MODULE
-I/opt/apache/include -I/usr/local/include auth_ldap.c
gcc -c -o auth_ldap_config.o -DLINUX=2 -DMOD_SSL=203101 -DUSE_HSREGEX
-DEAPI -Wall -DAUTH_LDAP_FRONTPAGE_HACK -DWITH_OPENLDAP -fpic
-DSHARED_MODULE -I/opt/apache/include -I/usr/local/include
auth_ldap_config.c
gcc -c -o auth_ldap_cache.o -DLINUX=2 -DMOD_SSL=203101 -DUSE_HSREGEX
-DEAPI -Wall -DAUTH_LDAP_FRONTPAGE_HACK -DWITH_OPENLDAP -fpic
-DSHARED_MODULE -I/opt/apache/include -I/usr/local/include
auth_ldap_cache.c
auth_ldap_cache.c: In function `auth_ldap_authbind':
auth_ldap_cache.c:217: warning: passing arg 3 of `ldap_simple_bind_s'
discards `const' from pointer target type
auth_ldap_cache.c: In function `auth_ldap_compare':
auth_ldap_cache.c:344: warning: passing arg 2 of `ldap_compare_s'
discards `const' from pointer target type
auth_ldap_cache.c:344: warning: passing arg 3 of `ldap_compare_s'
discards `const' from pointer target type
auth_ldap_cache.c:344: warning: passing arg 4 of `ldap_compare_s'
discards `const' from pointer target type
ld -Bshareable -o auth_ldap.so -lldap -llber auth_ldap.o
auth_ldap_config.o auth_ldap_cache.o

If I use the Netscape ldap SDK instead of OpenLdap, I get different
errors. If i use different ldap modules, I still don't get it working
!!!

The fact is, that after 4 days, I still don't get this module to compile
properly.
Any help would be appreciated !!!!!!!!!!!!

Thx in advance,
Richard van Es

 
 
 

Anyone experience with compiling ldap modules?

Post by john.. » Wed, 16 Jun 1999 04:00:00




Quote:> Hello, I'm desperate !!!!!

> For 4 days now, I'm trying to set up an apache-server that uses
> authentication using the LDAP protocol.
> The problem is, that I don't seem to get the module to compile
properly.
> I hope someone can help me out with this, because I
> am really getting frustrated about this. This is what I am trying to
do:

> Linux installation: RedHat 5.2
> OpenSSL installation: OpenSSL-0.9.3a
> OpenLDAP installation: the latest version ??
> Apache version: 1.3.6
> Mod_SSL: 2.3.1-1.3.6
> auth_ldap from Dave Carrigan
> (ftp://ftp.enbridge.com/pub/dhc/auth_ldap.html) both version 1.2.3 and
> 1.3.2

I have a similar setup, and had similar problems.  Rest assured that
once you figure it out it does indeed work.  I'll give you info about my
experience and try to help you out.  If you're still having problems,

stuff) and I'll try to help further.  There _really_ needs to be some
sort of FAQ or mini-HOWTO on this...

Quote:> Procedure:

> Compile Apache and MOD_ssl  --> works fine
> Compile auth_ldap as a DSO and I get the following messages:
> #make

Well, one thing I figured out is it isn't enough to compile auth_ldap
linked against your LDAP libraries, Apache has to be compiled against
them too.  And if you're using the Mozilla or Netscape LDAP SDKs, you'll
also have to link against pthread.so; not sure about OpenLDAP.  Go back
and recompile Apache, but set a LIBS= variable and put in the libraries
you're using in auth_ldap's Makefile.  Then try to compile auth_ldap.

- Show quoted text -

Quote:> gcc -c -o auth_ldap.o -DLINUX=2 -DMOD_SSL=203101 -DUSE_HSREGEX -DEAPI
> -Wall -DAUTH_LDAP_FRONTPAGE_HACK -DWITH_OPENLDAP -fpic -DSHARED_MODULE
> -I/opt/apache/include -I/usr/local/include auth_ldap.c
> gcc -c -o auth_ldap_config.o -DLINUX=2 -DMOD_SSL=203101 -DUSE_HSREGEX
> -DEAPI -Wall -DAUTH_LDAP_FRONTPAGE_HACK -DWITH_OPENLDAP -fpic
> -DSHARED_MODULE -I/opt/apache/include -I/usr/local/include
> auth_ldap_config.c
> gcc -c -o auth_ldap_cache.o -DLINUX=2 -DMOD_SSL=203101 -DUSE_HSREGEX
> -DEAPI -Wall -DAUTH_LDAP_FRONTPAGE_HACK -DWITH_OPENLDAP -fpic
> -DSHARED_MODULE -I/opt/apache/include -I/usr/local/include
> auth_ldap_cache.c
> auth_ldap_cache.c: In function `auth_ldap_authbind':
> auth_ldap_cache.c:217: warning: passing arg 3 of `ldap_simple_bind_s'
> discards `const' from pointer target type
> auth_ldap_cache.c: In function `auth_ldap_compare':
> auth_ldap_cache.c:344: warning: passing arg 2 of `ldap_compare_s'
> discards `const' from pointer target type
> auth_ldap_cache.c:344: warning: passing arg 3 of `ldap_compare_s'
> discards `const' from pointer target type
> auth_ldap_cache.c:344: warning: passing arg 4 of `ldap_compare_s'
> discards `const' from pointer target type
> ld -Bshareable -o auth_ldap.so -lldap -llber auth_ldap.o
> auth_ldap_config.o auth_ldap_cache.o

You shouldn't be getting errors compiling auth_ldap; at least, there are
no errors with the Netscape SDK.  Also, are you sure you want to enable
the AUTH_LDAP_FRONTPAGE_HACK option?  It's a lot of unnecessary hassle
if you aren't using MS FrontPage.

Quote:

> If I use the Netscape ldap SDK instead of OpenLdap, I get different
> errors. If i use different ldap modules, I still don't get it working
> !!!

OK, with the Netscape SDK, are you linking against libldap30.so or
libldapssl30.so?  And, when you do, can the compiled auth_ldap.so
actually find that file (does a 'ldd auth_ldap.so' show any problems)?

auth_ldap is a bit tricker than some Apache modules.  I've had mod_put
and mod_roaming compile right away, no problems.  And mod_perl normally
compiles pretty easily if you let it handle Apache.  But auth_ldap
requires a little more attention to detail than some of the others,
mainly due to it's reliance on the LDAP libraries...  If you're still
having problems, e-mail me and I'll give you my complete procedure
(don't use my deja.com address, e-mail me at the address above).

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

1. Compiling Apache-2.0.35 with LDAP modules (httpd-ldap)

Hello,

    I used tu use an LDAP module to do authentication with Apache-1.3.x
and it warked just fine !

    As a very curious person, I'm trying to get to use Apache-2.0.35.
But I still need to do LDAP authentication.

    I read the manual pages shipped in Apache distribution, and learnt
that mod_ldap and mao_auth_ldap are no longer part of the stantard
Apache 2 distribution. So I "CVS checked out" some source code named
httpd-ldap, as indicated in the manual pages.

    My problem is now where must I store the top-level directory
(httpd-ldap, and its subdirectories ldap-aaa and ldap-cache) in the main
Apache 2.0.35 source tree ? And how do I get the
configuration/compilation process to use those modules ?? I tried
several ways, but none succeeded...

    Any help would be greatly appreciated.

Thank you very much.

Hubert.

--
=======================================================================================================
This electronic transmission and any files attached to it are strictly confidential and intended solely for the addressee.
If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission.
If you have received this transmission in error, please notify us by return and delete the same.
The views expressed in this electronic transmission do not necessarily reflect those of Atos Origin or any of its subsidiary companies.
Although the sender endeavours to maintain a computer virus free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Thank You.
=======================================================================================================

2. Solaris 2.5 - 2.6 Upgrd, nwbackup

3. Anyone compile the UofM ldap package on AIX 4.2?

4. more than 20 domains problem ..

5. compiling PHP on Solaris with LDAP, but not SUN ldap

6. Samba Win95 DOS-Box Problem

7. Any Experience of using pam with LDAP Directory Server

8. Setting up 2nd pc.

9. problem compiling modules from modules.tar.gz

10. Redhat 5.1 - ANSWERS - compile kernel, modules, /lib/modules/preferred

11. Compiling the kernel: to module or not to module?

12. PAM module for LDAP?

13. Anyone know how tro setup a central user-management using LDAP?