Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#21604 - [db] dbm compatibility missing in 5.1.19.2

Attached to Project: Arch Linux
Opened by Benoit Izac (benizac) - Thursday, 04 November 2010, 22:06 GMT
Last edited by Allan McRae (Allan) - Thursday, 11 November 2010, 04:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Since I upgraded db from 4.8.26-2 to 5.1.19-2, the dbm compatibility is missing:

$ cat test.c
#define DB_DBM_HSEARCH 1
#include <db.h>

int main(void) {
DBM *db = dbm_open("/dev/null", 0, 0600);
return 0;
}
$ gcc -ldb test.c
/tmp/ccvbSNOF.o: In function `main':
test.c:(.text+0x18): undefined reference to `__db_ndbm_open'
collect2: ld returned 1 exit status

This is a problem for application like inn who needs it in authprogs/ckpasswd.c.

Please add --enable-dbm to ../dist/configure.

Without --enable-dbm (current package):
$ nm /usr/lib/libdb.a 2>/dev/null | grep dbm_open
$
With:
$ nm pkg/usr/lib/libdb.a 2>/dev/null | grep dbm_open
0000000000000050 T __db_ndbm_open
$
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 11 November 2010, 04:21 GMT
Reason for closing:  Implemented
Additional comments about closing:  db-5.1.19-3
Comment by Wilderman Ceren (m0n0lithic) - Monday, 08 November 2010, 04:00 GMT
Hi, since the last update of db and checking /var/ log/auth.log for the authentication process I realized that was not working pam_userdb module version of pam-1.1.1-2 generated an error like this:

PAM unable to dlopen(/lib/security/pam_userdb.so): /lib/security/pam_userdb.so: undefined symbol: __db_ndbm_firstkey
PAM adding faulty module: /lib/security/pam_userdb.so

verifying resolved functions :
ldd -r /lib/security/pam_userdb.so
linux-vdso.so.1 => (0x00007fff549ff000)
libpam.so.0 => /lib/libpam.so.0 (0x00007f831b4f8000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f831b2f4000)
libdb-5.1.so => /usr/lib/libdb-5.1.so (0x00007f831af72000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f831ad3b000)
libc.so.6 => /lib/libc.so.6 (0x00007f831a9de000)
/lib/ld-linux-x86-64.so.2 (0x00007f831b913000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f831a7c0000)
undefined symbol: __db_ndbm_firstkey (/lib/security/pam_userdb.so)
undefined symbol: __db_ndbm_open (/lib/security/pam_userdb.so)
undefined symbol: __db_ndbm_nextkey (/lib/security/pam_userdb.so)
undefined symbol: __db_ndbm_close (/lib/security/pam_userdb.so)
undefined symbol: __db_ndbm_fetch (/lib/security/pam_userdb.so)

It is possible to repair it with the suggested parameter:

Fix using ABS:
add --enable-dbm to PKGBUILD build() ./configure of last db abs-source:

build() {
cd ${srcdir}/$pkgname-${_basever}/build_unix
../dist/configure --prefix=/usr --enable-compat185 \
--enable-shared --enable-static --enable-cxx --enable-dbm

[wceren@canete db]$ makepkg -s
$ sudo pacman -U db-5.1.19-2-x86_64.pkg.tar.xz
$ ldd -r /lib/security/pam_userdb.so
linux-vdso.so.1 => (0x00007fff2a688000)
libpam.so.0 => /lib/libpam.so.0 (0x00007f8536ef7000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f8536cf3000)
libdb-5.1.so => /usr/lib/libdb-5.1.so (0x00007f8536970000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f8536739000)
libc.so.6 => /lib/libc.so.6 (0x00007f85363dc000)
/lib/ld-linux-x86-64.so.2 (0x00007f8537312000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f85361be000)

;-) It's fun, now PAM-BerkeleyDB Auth it's functional!

Loading...