saslpasswd2 segfault on Slackware 10.1 (Mayday)

Matthew Cook matthew.cook at iinet.net.au
Thu Sep 15 08:14:11 EDT 2005


Howdy,

I have a sticky problem building and installing cyrus-sasl-2.1.21 on my 
Slackware 10.1 box.   I've googled alot over the last two nights and this 
issue appears to be the result of the Berkeley database lib that sasl is 
being linked to.

I am using the following configure options to build;

./configure \
--prefix=/usr \
--enable-anon \
--enable-plain \
--enable-login \
--disable-krb4 \
--disable-otp \
--disable-cram \
--disable-digest \
--with-saslauthd=/var/run/saslauthd \
--with-plugindir=/usr/lib/sasl2 \
--without-pam \
--with-mysql \
--with-openssl

There are no errors and after building I see the following libraries are 
being linked against;

root at Tweety:/# ldd /usr/sbin/saslpasswd2
         libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x40022000)
         libdl.so.2 => /lib/libdl.so.2 (0x40037000)
         libresolv.so.2 => /lib/libresolv.so.2 (0x4003c000)
         libdb-4.2.so => /lib/libdb-4.2.so (0x4004f000)
         libc.so.6 => /lib/libc.so.6 (0x40122000)
         /lib/ld-linux.so.2 (0x40000000)

It appears my system is picking up the v4.2 berkeley libs.   I know that 
the following berkely libs are included on this system;

root at Tweety:/lib# ls -al libdb*
-rwxr-xr-x  1 root root 508752 2004-05-12 10:39 libdb-3.1.so*
-rwxr-xr-x  1 root root 604216 2004-05-12 11:01 libdb-3.3.so*
-rwxr-xr-x  1 root root 867492 2004-05-30 15:33 libdb-4.2.so*
lrwxrwxrwx  1 root root     15 2005-09-08 17:38 libdb.so.2 -> libdb1.so.2.1.3*
lrwxrwxrwx  1 root root     11 2005-09-08 17:38 libdb.so.3 -> libdb2.so.3*
-rwxr-xr-x  1 root root  55516 2005-01-25 03:32 libdb1.so.2.1.3*
-rwxr-xr-x  1 root root 264288 2005-01-25 03:32 libdb2.so.3*

All of the HOWTO's I've found seem to either mention or use the libdb-3.3 
libs, not the 4.x series.   Now if I try to run the saslpasswd2 util I get 
the following;

root at Tweety:/# saslpasswd2 -c -u vk5zmc.org matthew
Password:****
Again (for verification):****
/etc/sasldb2
Segmentation fault

Now if I compile adding this additional option --with-dblib=gdbm I am able 
to execute saslpasswd2 util with out any hoohah.  Except I am using a 
database lib that cyrus-imap does not support :-(

Now for the GDB guru's;

root at Tweety:/# gdb
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
(gdb) file /usr/sbin/saslpasswd2
Reading symbols from /usr/sbin/saslpasswd2...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) set args -c -u vk5zmc.org matthew
(gdb) run
Starting program: /usr/sbin/saslpasswd2 -c -u vk5zmc.org matthew
Password:****
Again (for verification):****
/etc/sasldb2

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0x40019eaf in berkeleydb_close (utils=0x804f748, mbdb=0x804f748) at 
db_berkeley.c:119
#2  0x4001a28f in _sasldb_putdata (utils=0x804cf50, context=0x804c220,
     authid=0xffffffff <Address 0xffffffff out of bounds>, realm=0x804ce00 
"Couldn't update db",
     propName=0x804ce00 "Couldn't update db", data_in=0x804fffb "test", 
data_len=4) at db_berkeley.c:312
#3  0x4001838c in sasldb_auxprop_store (glob_context=0x0, 
sparams=0x804cd58, ctx=0x804d028, user=0x804fbb4 "",
     ulen=134529496) at sasldb.c:176
#4  0x40026549 in sasl_auxprop_store (conn=0x804d8a0, ctx=0x804d028, 
user=0xbffff929 "matthew") at auxprop.c:948
#5  0x4002e91a in sasl_setpass (conn=0x804c220, user=0xbffff929 "matthew", 
pass=0x804c1a8 "test", passlen=4, oldpass=0x0,
     oldpasslen=0, flags=1) at server.c:182
#6  0x080490fc in main (argc=5, argv=0x804c1bc) at saslpasswd.c:411

At first I thought it was a file permission problem so I have temporarily 
changed the file permissions to the sasldb2 file thus;

root at Tweety:/etc# ls -al sasl*
-rw-rw-rw-  1 root sasl 0 2005-09-26 09:59 sasldb2

But that didn't work either.   I am also looking to use the cyrus imap 
server hence I need to compile cyrus-sasl and cyrus-imapd against the same 
libs.

Any help or pointers to what I am not doing correctly would be greatly 
appreciated.

Regards

Matthew
-----
Imagineer
CCK Technologies


More information about the Cyrus-sasl mailing list