Bug 19820

Summary: pam_userdb linked to wrong libdb
Product: [Retired] Red Hat Linux Reporter: vasquez
Component: pamAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED ERRATA QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dr, j
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-11-06 18:32:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description vasquez 2000-10-25 17:59:40 UTC
pam_userdb.so is linked to libdb-3, ldd -r /lib/security/pam_userdb.so
reports:
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4000d000)
        libdb-3.1.so => /lib/libdb-3.1.so (0x4003b000)
        libc.so.6 => /lib/libc.so.6 (0x400b7000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
undefined symbol: pam_get_item  (/lib/security/pam_userdb.so)
undefined symbol: dbm_firstkey  (/lib/security/pam_userdb.so)
undefined symbol: dbm_fetch     (/lib/security/pam_userdb.so)
undefined symbol: dbm_nextkey   (/lib/security/pam_userdb.so)
undefined symbol: dbm_open      (/lib/security/pam_userdb.so)
undefined symbol: dbm_close     (/lib/security/pam_userdb.so)
undefined symbol: pam_set_item  (/lib/security/pam_userdb.so)
undefined symbol: pam_get_user  (/lib/security/pam_userdb.so)

pam_userdb.so should probably be linked to libdb1.so

Comment 1 Nalin Dahyabhai 2000-10-25 22:13:21 UTC
That's correct -- it should be.  Please check that the packages at
http://people.redhat.com/nalin/test/ fix this problem.

Comment 2 vasquez 2000-10-26 10:49:57 UTC
Installed fine.
My problem is now that my db185 files don't work against it:
I get mangled key and value entries (basically every new entry in the file has
keys and values of the ones before in it).
It would really be of help to have db1 utils, sth like makemap and such.

Any plans for a pam_userdb3.so ?

Comment 3 Jason Tibbitts 2000-11-06 18:32:08 UTC
I was having the same problem and fetched the updated RPMS.  Unfortunately, it
fails to read my existing database files.

I get the following:

Nov  6 12:29:27 ilnea pam_userdb[21540]: user_lookup: could not open database
`/etc/ftp/users'

However, there is no problem opening the file:

stat("/etc/ftp/users.db", {st_mode=S_IFREG|0600, st_size=20480, ...}) = 0
open("/etc/ftp/users.db", O_RDONLY)     = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0a\25\6\0\5\0\0\0\0\20\0\0\2\0\0"..., 260) = 260
close(3)                                = 0

The file seems to have the appropriate format:

/etc/ftp/users.db: Berkeley DB 2.X Hash/Little Endian (Version 5, Logical
sequence number: file - 0, offset - 0, Bucket Size 4096, Overflow Point 2, Last
Freed 0, Max Bucket 3, High Mask 0x3, Low Mask 0x1, Fill Factor 0, Number of Keys 0)

Plus, I used Perl to manage this file, but Perl is linked against libdb-3.1.so
so it won't deal with it.

Any assistance in working this out would be appreciated.




Comment 4 Nalin Dahyabhai 2000-11-29 17:34:50 UTC
The package is linked against DB 3.1.  An database created with DB 2 (for
example, on RHL 6.2) will not be read.  If you dump out the contents of the
database with "db2_dump users.db | tee users", delete the .db file, and reload
it with "db_load -f users users.db", you'll have a DB 3 database which can be
read.  I personally wish we'd used gdbm for this from the start, because its
on-disk format doesn't change.  The updated packages are going out as an errata
soon.