Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 114453 - apache2 mod_ldap.conf breaks mod_auth_ldap
Summary: apache2 mod_ldap.conf breaks mod_auth_ldap
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: apache1-is-dead
  Show dependency tree
 
Reported: 2005-12-04 09:23 UTC by Tyler Johnson
Modified: 2007-05-23 21:47 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Johnson 2005-12-04 09:23:54 UTC
I emerged apache2 and mod_auth_ldap and enabled -D AUTH_LDAP in
/etc/conf.d/apache2. When I try to start apache I get the following error:

~ # /etc/init.d/apache2 start
 * Apache2 has detected a syntax error in your configuration files:
Syntax error on line 9 of /etc/apache2/modules.d/46_mod_ldap.conf:
Can't locate API module structure `auth_ldap_module' in file
/usr/lib/apache2/modules/mod_auth_ldap.so:
/usr/lib/apache2/modules/mod_auth_ldap.so: undefined symbol: auth_ldap_module

It seems that the 46_mod_ldap.conf tries to load apache's native mod_auth_ldap,
which seems to be broken under gentoo (works fine in other distros like debian).

Meanwhile, the mod_auth_ldap package installs mm_mod_auth_ldap which was
recently been renamed as per
http://www.muquit.com/muquit/software/mod_auth_ldap/README3.4.txt/ 

mm_mod_auth_ldap seems to work fine, but apache never starts because
46_mod_ldap.conf kills apache before it gets a chance to load the correct module
(/etc/apache2/modules.d/55_mod_auth_ldap.conf).

The work around is pretty simple -- comment out:

<IfDefine AUTH_LDAP>
  <IfModule !mod_auth_ldap.c>
    LoadModule auth_ldap_module   modules/mod_auth_ldap.so
  </IfModule>
</IfDefine>

in the file /etc/apache2/modules.d/46_mod_ldap.conf and start apache.


Reproducible: Always
Steps to Reproduce:
1. emerge apache and mod_auth_ldap with apache2 and ldap use flags.
2. enable -D AUTH_LDAP in /etc/conf.d/apache2
3. try to start apache

Actual Results:  
~ # /etc/init.d/apache2 start
 * Apache2 has detected a syntax error in your configuration files:
Syntax error on line 9 of /etc/apache2/modules.d/46_mod_ldap.conf:
Can't locate API module structure `auth_ldap_module' in file
/usr/lib/apache2/modules/mod_auth_ldap.so:
/usr/lib/apache2/modules/mod_auth_ldap.so: undefined symbol: auth_ldap_module


Expected Results:  
apache should start with mod_auth_ldap enabled

I've tried this against the stable and ~x86 branch. Seems to behave the same in
both.
Comment 1 Morten Mertner 2006-01-22 13:46:26 UTC
I can confirm that this bug report is valid, and that the suggested work-around works as described.

In case it matters: using mod_auth_ldap 3.3 from an overlay ebuild (with missing keyword for amd64 added).
Comment 2 Tyler Johnson 2006-04-14 11:42:18 UTC
I just built a few more servers and found another work around:

Compile apache with static-modules and ldap, and DON'T emerge net-www/mod_auth_ldap.

This will result in a functional *apache* mod_auth_ldap module as opposed to the mm_mod_auth_ldap module installed by net-www/mod_auth_ldap.

Also, note that the syntax between apache's mod_auth_ldap and mm_mod_auth_ldap are completely different. There are good examples in the apache doc.
Comment 3 Enderson Tadeu S. Maia (RETIRED) gentoo-dev 2006-04-25 11:17:49 UTC
I have ldap_auth working with apache2 compiled with ldap USE-flag.

But if I install mod_auth_ldap, and remove, it takes away the file, that are the same for the both package.

# equery belongs /usr/lib/apache2/modules/mod_auth_ldap.so
[ Searching for file(s) /usr/lib/apache2/modules/mod_auth_ldap.so in *... ]
net-www/mod_auth_ldap-3.3 (/usr/lib/apache2/modules/mod_auth_ldap.so)
net-www/apache-2.0.55-r1 (/usr/lib/apache2/modules/mod_auth_ldap.so)

The workaround is, not to install mod_auth_ldap, and use apache2 ldap USE-flag.
I reinstalled apache2, to get the file back.

Comment 4 Benedikt Böhm (RETIRED) gentoo-dev 2007-05-23 21:12:30 UTC
net-www/mod_auth_ldap will go away in favor of the ldap modules included with apache2 soon, closing this as wontfix