FS#15654 - [autofs] Not working with LDAP

Attached to Project: Arch Linux
Opened by Sven (avanc) - Thursday, 23 July 2009, 16:57 GMT
Last edited by Andrea Scarpino (BaSh) - Wednesday, 03 March 2010, 01:09 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
If I use LDAP for the mapping, I get the following error:
open_lookup:95: cannot open lookup module ldap (/usr/lib/autofs/lookup_ldap.so: undefined symbol: krb5_princ_realm)

A ldd on lookup_ldap.so shows no references to krb5:
linux-gate.so.1 => (0xb7f66000)
libldap-2.3.so.0 => /usr/lib/libldap-2.3.so.0 (0xb7eed000)
liblber-2.3.so.0 => /usr/lib/liblber-2.3.so.0 (0xb7ee0000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb7ecc000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7eb5000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7d8e000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7d7a000)
libm.so.6 => /lib/libm.so.6 (0xb7d54000)
libc.so.6 => /lib/libc.so.6 (0xb7c0e000)
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7bc8000)
libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7a76000)
libdl.so.2 => /lib/libdl.so.2 (0xb7a71000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7a3f000)
/lib/ld-linux.so.2 (0xb7f67000)


It seems to be a problem with Underlinking:
[1]autofs@linux.kernel.org/msg07648.html"> http://www.mail-archive.com/autofs@linux.kernel.org/msg07648.html
[2] http://wiki.mandriva.com/en/Underlinking

I tried the patch in [1] but had no luck. After some hacking I got lookup_ldap.so linked with krb5.
ldd locks now like this:
linux-gate.so.1 => (0xb7f76000)
libldap-2.3.so.0 => /usr/lib/libldap-2.3.so.0 (0xb7efd000)
liblber-2.3.so.0 => /usr/lib/liblber-2.3.so.0 (0xb7ef0000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb7edc000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7ec5000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7d9e000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7d8a000)
libm.so.6 => /lib/libm.so.6 (0xb7d64000)
libkrb5.so.25 => /usr/lib/libkrb5.so.25 (0xb7d00000)
libc.so.6 => /lib/libc.so.6 (0xb7bba000)
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7b74000)
libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7a21000)
libdl.so.2 => /lib/libdl.so.2 (0xb7a1d000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb79eb000)
/lib/ld-linux.so.2 (0xb7f77000)
libhx509.so.4 => /usr/lib/libhx509.so.4 (0xb79b0000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb7937000)
libasn1.so.8 => /usr/lib/libasn1.so.8 (0xb78bc000)
libwind.so.0 => /usr/lib/libwind.so.0 (0xb7894000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7891000)
libroken.so.18 => /usr/lib/libroken.so.18 (0xb787f000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7866000)

The next error message is:
open_lookup:95: cannot open lookup module ldap (/usr/lib/autofs/lookup_ldap.so: undefined symbol: krb5_free_unparsed_name)

And now I don't know what to do.

Additional info:
autofs 5.0.4-4
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Wednesday, 03 March 2010, 01:09 GMT
Reason for closing:  Fixed
Additional comments about closing:  autofs 5.0.5-2
Comment by Paul Mattal (paul) - Sunday, 06 December 2009, 19:05 GMT
Andrea, can you make anything of this? I know you are maintaining openldap.
Comment by Andrea Scarpino (BaSh) - Friday, 15 January 2010, 12:30 GMT
There are more patches here: http://www.kernel.org/pub/linux/daemons/autofs/v5/
but we need a maintainer for autofs or we should move it to Unsupported
Comment by Sébastien Dumont (eYemZ) - Friday, 26 February 2010, 08:46 GMT
This fix the problem:

krb5_princ_realm is deprecated: http://www.h5l.org/manual/HEAD/krb5/group__krb5__deprecated.html

modules/cyrus-sasl.c
464,465c464,465
< krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
< krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
---
> krb5_realm_length(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),
> krb5_realm_data(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),
467,468c467,468
< krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
< krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
---
> krb5_realm_length(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),
> krb5_realm_data(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),

modules/Makefile
46c46
< LIBLDAP += $(LIBSASL) $(XML_LIBS)
---
> LIBLDAP += $(LIBSASL) $(XML_LIBS) -lkrb5

Loading...