From: Sandeep Sharma (ssharma at jabber dot com)
Date: Thu Nov 13 2003 - 12:56:46 EST
Hello,
I am trying to install cyrus sasl on a Read Hat Linux 7.3 box. So I
downloaded cyrus sasl 2.1.15, and did
configure
make
make install
ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
There were no errors and everything got installed.
Now I tried to create a user using saslpasswd2 and it core dumps. More
information follows.
ldd /usr/local/sbin/saslpasswd2
libresolv.so.2 => /lib/libresolv.so.2 (0x40019000)
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4002b000)
libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x4003f000)
libdl.so.2 => /lib/libdl.so.2 (0x40052000)
libdb-3.3.so => /usr/lib/libdb-3.3.so (0x40055000)
libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
gcc --version
2.95.3
make --version
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for i686-pc-linux-gnu
saslpasswd2 -c test
Password:
Again (for verification):
Segmentation fault (core dumped)
gdb /usr/local/sbin/saslpasswd2 core.14294
GNU#0 0x0 in ?? () from /lib/i686/libc.so.6
(gdb)
(gdb) where
#0 0x0 in ?? () from /lib/i686/libc.so.6
#1 0x8049bdb in berkeleydb_open (utils=0x804b670, conn=0x804c8f8,
rdwr=0, mbdb=0xbfffd7dc) at db_berkeley.c:91
#2 0x8049dbb in _sasldb_getdata (utils=0x804b670, context=0x804c8f8,
auth_identity=0x804c8b0 "test", realm=0x804c898 "foo.bar.com",
propName=0x804a921 "userPassword", out=0xbfffd868 "onymous.so.2",
max_out=8192, out_len=0xbfffd864) at db_berkeley.c:173
#3 0x8049a3c in _sasldb_getsecret (utils=0x804b670, context=0x804c8f8,
authid=0x804c8b0 "test", realm=0x804c898 "foo.bar.com",
secret=0xbffff8ac) at allockey.c:157
#4 0x8049125 in _sasl_sasldb_set_pass (conn=0x804c8f8,
serverFQDN=0x804b220 "foo.bar.com", userstr=0xbffffaba "test",
pass=0x804c878 "test", passlen=4, user_realm=0x0, flags=1) at
saslpasswd.c:283
#5 0x8049577 in main (argc=3, argv=0xbffff9a4) at saslpasswd.c:463
#6 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)
The code snippet from db_berkeley.c is..
82 #if DB_VERSION_MAJOR < 3
83 ret = db_open(path, DB_HASH, flags, 0660, NULL, NULL, mbdb);
84 #else /* DB_VERSION_MAJOR < 3 */
85 ret = db_create(mbdb, NULL, 0);
86 if (ret == 0 && *mbdb != NULL)
87 {
88 #if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
89 ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH,
flags, 0660);
90 #else
91 ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags,
0660);
92 #endif
93 if (ret != 0)
94 {
95 (void) (*mbdb)->close(*mbdb, 0);
96 *mbdb = NULL;
97 }
98 }
99 #endif /* DB_VERSION_MAJOR < 3 */
At line 91, the function pointer "open" is NULL (0), hence the core
dump. So seems like db_create did not initialize the mbdb structure
correctly.
This machine already has an older version of sasl on it.
rpm -qa | grep sasl
cyrus-sasl-md5-1.5.24-25
cyrus-sasl-1.5.24-25
I was hesitant to remove the earlier version due to some dependencies
and it is a shared machine. But if this is causing the problem, then I
will have to remove it.
As is evident from the ldd output, the version of Berkeley DB used is
3.3
Has anyone experienced a similar problem and what was the fix? I really
appreciate any thoughts and ideas. If more information is needed, shoot
me an email and I will provide it. (output of configure, make and so on)
Have a nice day!
-Sandeep Sharma
|
|
|