Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 164916 - net-mail/cyrus-imapd-2.3.7 crashes at startup when used with LDAP and SASL
Summary: net-mail/cyrus-imapd-2.3.7 crashes at startup when used with LDAP and SASL
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Tobias Scherbaum (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-01 21:32 UTC by Arhont
Modified: 2007-08-20 13:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arhont 2007-02-01 21:32:46 UTC
The Cyrus imapd v 2.3.7 service crashes at start up when used with LDAP. This problem exists when the nsswitch.conf has the ldap group entry like this:

group:          files ldap

The ldap directory works fine to authenticate users using pam or nsswitch or other programs such as samba and radius. The passwd and group entries are resolved without a problem using a getent command. The imap crashes regardless of having groups in the ldap directory or not. 

In order to start the service you have to hash out or delete the ldap part from the group entry from the nsswitch.conf. Once the imapd has started it is safe to add an ldap entry to the nsswitch.conf to resume ldap authentication.

Alternative solution to the start up problem is to start imapd service prior to starting the slapd.


Reproducible: Always

Steps to Reproduce:
1. Setup LDAP authentication using sasl and/or nss-ldap
2. start slapd to enable system wide ldap based authentication
3. start imapd

Actual Results:  
The imapd server crashes:

# ps aux |grep cyrus
cyrus    18018  0.6  0.2   4784  2512 ?        Ss   21:14   0:00 /usr/lib/cyrus/master
cyrus    18029  0.0  0.0  28064   492 ?        R    21:14   0:00 idled
cyrus    18073  0.0  0.0      0     0 ?        Z    21:14   0:00 [master] <defunct>
cyrus    18074  0.0  0.0      0     0 ?        Z    21:14   0:00 [master] <defunct>
cyrus    18075  0.0  0.0      0     0 ?        Z    21:14   0:00 [master] <defunct>


Expected Results:  
starting whithout ldap in the group entry produces the following:

# ps aux |grep cyrus
cyrus     4899  0.0  0.1  22008  2980 ?        Ss   Jan29   0:00 /usr/lib/cyrus/master
cyrus     4913  0.0  0.0  42572   680 ?        S    Jan29   0:02 idled
cyrus     4935  0.0  0.1  52496  2188 ?        S    Jan29   0:00 imapd -s
cyrus     4936  0.0  0.1  52232  2140 ?        S    Jan29   0:00 timsieved
cyrus     4937  0.0  0.1  52496  2188 ?        S    Jan29   0:00 imapd -s
cyrus     4938  0.0  0.1  52228  2144 ?        S    Jan29   0:00 timsieved
cyrus     4939  0.0  0.1  52500  2192 ?        S    Jan29   0:00 imapd -s
cyrus     4940  0.0  0.1  52228  2140 ?        S    Jan29   0:00 timsieved
cyrus     4941  0.0  0.1  52500  2192 ?        S    Jan29   0:00 imapd -s
cyrus     4942  0.0  0.1  52228  2140 ?        S    Jan29   0:00 timsieved


Here is the information about my system:

Software versions:
sys-auth/nss_ldap  253
sys-auth/pam_ldap 183
net-nds/openldap 2.3.30-r2
net-mail/cyrus-imapd 2.3.7
dev-libs/cyrus-sasl 2.1.22-r1

The snapshots of configuration files:

nsswitch.conf
passwd:         files ldap
group:          files ldap


cat /etc/saslauthd.conf 
ldap_servers: ldap://127.0.0.1/
ldap_bind_dn: cn=sasl,o=company
ldap_bind_pw: <password>
ldap_search_base: o=company
ldap_auth_method: bind
ldap_filter: uid=%u
ldap_version: 3
ldap_scope: sub


-------------
# emerge --info
Portage 2.1.1-r2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.18-gentoo-r6 i686)
=================================================================
System uname: 2.6.18-gentoo-r6 i686 AMD Athlon(TM) XP 2200+
Gentoo Base System version 1.12.6
Last Sync: Thu, 01 Feb 2007 00:00:10 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="en_GB.UTF-8"
LINGUAS="en_GB en ru ru_RU"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 7zip X509 acl acpi alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol autocreate autosieve bacula-clientonly bacula-nodir bacula-nosd bash-completion berkdb bitmap-fonts bzip2 chroot cli client-only cracklib crypt cups dlloader dri elibc_glibc exiscan exiscan-acl extensions fortran frnothreads frxp ftp gnutls hpn iconv idn imap input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text ldap linguas_en linguas_en_GB linguas_ru linguas_ru_RU lm_sensors lmtp maildir mbox midi mmx ncurses nls nptl nptlonly ntlm overlays pam pcre perl ppds pppd python readline reflection samba sasl sensord server session sftplogging skey snmp spl sse ssl tcpd truetype-fonts type1-fonts udev unicode userland_GNU userlocales video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vnc"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------------------

If you require any other information, I would be glad to assist.
Comment 1 Tobias Scherbaum (RETIRED) gentoo-dev 2007-07-28 15:45:34 UTC
Can please check back and verify if this problem still applies to cyrus-imapd-2.3.8?
Comment 2 Tobias Scherbaum (RETIRED) gentoo-dev 2007-08-20 13:11:51 UTC
Ping timeout. Feel free to reopen if this is still a problem for you. Thanks!