Derrick J Brashear wrote:
If anyone else wants to try this (I'd guess auth_unix use in mupdate isn't common?)
I use saslauthd for authentication which then uses pam. Is there a way to get rid of auth_unix ?
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN
http://www.contrib.andrew.cmu.edu/~shadow/auth_unix.c.diff
is a diff which probably works. I'm still unsure if there are platforms using the 3 argument version of getgrent_r() and it appears to be a non-standard function anyway, so this probably needs configure glue.
This patch breaks imapd and possibly mupdate ( I cant test it )
# telnet localhost 143 * OK ..... server ready 1 login 1 BAD Missing required argument to Login 2 login cyrus dsdsdsd 2 NO Login failed: authentication failure 3 login cyrus abc123 Connection closed by foreign host.
on what would be a successfull login, imapd exits with SIGSEGV
backtrace attached.
Using host libthread_db library "/lib/tls/libthread_db.so.1". Error while mapping shared library sections: : Success. Error while reading shared library symbols: : No such file or directory. [Thread debugging using libthread_db enabled] [New Thread -150941568 (LWP 23504)] 0x00292402 in ?? ()
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -150941568 (LWP 23504)] 0x00552969 in __nss_getent_r () from /lib/tls/libc.so.6 Thread 1 (Thread -150941568 (LWP 23504)): #0 0x00552969 in __nss_getent_r () from /lib/tls/libc.so.6 No symbol table info available. #1 0x0050a2b2 in getgrent_r@@GLIBC_2.1.2 () from /lib/tls/libc.so.6 No symbol table info available. #2 0x0809bab5 in auth_newstate (identifier=0x8140280 "cyrus") at auth_unix.c:255 newstate = (struct auth_state *) 0x8769c48 pwd = {pw_name = 0xfee8cca0 "cyrus", pw_passwd = 0xfee8cca6 "x", pw_uid = 76, pw_gid = 12, pw_gecos = 0xfee8ccae "Cyrus IMAP Server", pw_dir = 0xfee8ccc0 "/var/lib/imap", pw_shell = 0xfee8ccce "/bin/bash"} pwdp = (struct passwd *) 0xfee8d0d0 mem = (char **) 0x0 grp = {gr_name = 0xfee8cea0 "root", gr_passwd = 0xfee8cea5 "x", gr_gid = 0, gr_mem = 0xfee8ceb0} grpp = (struct group *) 0x3 buf = "root\000x\0000:[EMAIL PROTECTED]@Ïèþ\000\000\000\000ú\003\000\000ÿÿÿÿsasl_canon_u\000\000\000\000sasl_pwcheck_method", '\0' <repeats 13 times>, "OK\000PAM auth"... buf2 = "cyrus\000x\00076:12:Cyrus IMAP Server\000/var/lib/imap\000/bin/bash\000\000sbin/nologin\000\000þ\017Ïèþ\020Îèþ\017Ïèþ", '\0' <repeats 28 times>, "ôÑèþ\000\000\000\000\000\000\000\000ÿÿÿÿ\003\000\000\000\bÔèþÐÑèþÿÿÿÿ{\207\n\bt\000\000\000ÿÿÿÿ\000\000\000\000\"Óèþ", '\0' <repeats 12 times>, "n\000\000\000\020=ª\002\210Íèþüq\n\bàÎèþ ÊY\000\000\000\000\000\216ý\022\b\214Íèþ\b\003\024\b\000\000\000\000"... i = -18297073 #3 0x080864bd in mysasl_proxy_policy (conn=0x87686a0, context=0x8131cc8, requested_user=0x8768fb0 "cyrus", rlen=5, auth_identity=0x87690b1 "cyrus", alen=5, def_realm=0x0, urlen=0, propctx=0x87693e8) at global.c:536 ctx = (struct proxy_context *) 0x8131cc8 val = 0x8130104 "" authstate = (struct auth_state *) 0x87690b1 userisadmin = 0 realm = 0x0 #4 0x0804da35 in imapd_proxy_policy (conn=0x87686a0, context=0x8131cc8, requested_user=0x8768fb0 "cyrus", rlen=5, auth_identity=0x87690b1 "cyrus", alen=5, def_realm=0x0, urlen=0, propctx=0x87693e8) at imapd.c:371 No locals. #5 0x005d310a in sasl_server_new () from /usr/lib/libsasl2.so.2 No symbol table info available. #6 0x005d4078 in sasl_checkpass () from /usr/lib/libsasl2.so.2 No symbol table info available. #7 0x08051f1e in cmd_login (tag=0x8769a58 "1", user=0x8769b38 "cyrus") at imapd.c:1808 userbuf = "cyrus\000G\000Û\235\004\b\200\f\001÷à/H\000\000\000\000\000\000\000\000\000ÔÔèþWZG\000âfI\000\021¢\004\b\200\f\001÷ ", '\0' <repeats 11 times>, "¤gI\000\000\030I\000à\222H\000À\f\001÷\020\000\000\000,ä\000÷\220ä\000÷à/H\000p6H\000p\236\004\b\200ÕèþEPG\000p\236\004\by:<\aD\222\004\b<Õèþ 6H\000\a\000\000\000\220ä\000÷\001\000\000\000\000\000\000\000D3N\000\216\225G\000Û\235\004\b\200\f\001÷à/H\000\000\000\000\000\000\000\000\000dÕèþWZG\000âfI\000\021¢\004\boßèþ ", '\0' <repeats 11 times>... userlen = 5 canon_user = 0xfee8d470 "cyrus" c = 10 '\n' passwdbuf = {s = 0x8769ba8 "abc123", len = 6, alloc = 100} passwd = 0x8769ba8 "abc123" reply = 0x0 plaintextloginpause = 5451891 r = 0 #8 0x0804fbfd in cmdloop () at imapd.c:1171 fd = -1 motdfilename = "/var/lib/imap/msg/motd\000\000\000\000\000\000\000\000\000\000Ky\n\b", '\0' <repeats 12 times>, "\001\000\000\000\020\000\000\000\000Ð\232õ\001", '\0' <repeats 11 times>, "@Üèþ\002\000\000\000\005\000\000\000¨âèþpàèþ\000\000\000\000úã\022\bM\000\000\000ÿÿÿÿ", '\0' <repeats 12 times>, "D\210z\000pÜèþÐ4H\000\000\000\000\000\000\000\000\000PçH\000À\f\001÷", '\0' <repeats 32 times>, "F Y", '\0' <repeats 13 times>, "à/H\000)ä\022\bÐ4H\000\000\000\000\000\000\000\000\000dÐY\000àÐY\000üÏY\000\000\000"... c = 32 ret = 22 usinguid = 774909488 havepartition = 775369265 havenamespace = 6611135 recursive = 134521361 tag = {s = 0x8769a58 "1", len = 1, alloc = 100} cmd = {s = 0x8769ac8 "Login", len = 5, alloc = 100} arg1 = {s = 0x8769b38 "cyrus", len = 5, alloc = 100} arg2 = {s = 0x0, len = 0, alloc = 0} arg3 = {s = 0x0, len = 0, alloc = 0} arg4 = {s = 0x0, len = 0, alloc = 0} p = 0x8769acd "" shut = "\020\000\000\000,ä\000÷ø~v\bà/H\000è\205v\b0.Ü\000\024ØèþEPG\0000.Ü\000\2256Ê\006ô*Ü\000Ð×èþ 6H\000\a\000\000\000ø~v\b\001\000\000\000\000\000\000\000\001\000\000\000 6H\000À\f\001÷üÏY\000Ð×èþ`ËY\000D3N\000m4N\000 \206v\büÏY\000\004Øèþè×èþÃHN\000\004ØèþèØèþÿ121\000\000\000\000ÿÿÿÿüÏY\000èØèþ\004Øèþ°Øèþ+\223M\000\004ØèþhîX\000èØèþèØèþD3N\000ÓIN\000èØèþüÏY\000`Øèþ<Øèþ"... err = 0xf7010cc0 "" #9 0x0804e35b in service_main (argc=1, argv=0x8760008, envp=0xfee8fae0) at imapd.c:689 salen = 16 timeout = 30 secprops = (sasl_security_properties_t *) 0x8138710 imapd_localaddr = {ss_family = 2, __ss_align = 16777343, __ss_padding = '\0' <repeats 44 times>, "à/H\000\001\000\000\000Ð4H\0000åèþ¶\206G\000p6H\000\220ä\000÷\001\000\000\000\001", '\0' <repeats 11 times>, "\204\221\004\bP\023\023\b\226\000\000\000\213\236\004\b\200¯H\000ó0S\000üÏY\0007º\004\b"} imapd_remoteaddr = {ss_family = 2, __ss_align = 16777343, __ss_padding = "\000\000\000\000\000\000\000\000\213\236\004\bðäèþEPG\000\213\236\004\b2¼\006\000\204\221\004\b¬äèþ 6H\000\a\000\000\000\220ä\000÷\001\000\000\000\000\000\000\000\001\000\000\000 6H\000\000\000\000\000\000\000\000\000¬äèþ", '\0' <repeats 20 times>, "2¼\006\000 åèþÐ4H\000\000\000\000\000\000\000\000\000\200¯H"} localip = "127.0.0.1;143\000èþWZG\000âfI\000\021¢\004\b¶\206G\000 ", '\0' <repeats 11 times>, "¤gI\000\000\030I\000à\222H\000À\f\001÷" remoteip = "127.0.0.1;32802\000ìãèþ\216\225G\000Û\235\004\b\200\f\001÷à/H\000\000\000\000\000\001\000\000\000\000\020\000\000\000\000\000\000\216\225G\000Û\235\004\b" hbuf = "[EMAIL PROTECTED](áèþ\205\033Y\000\000\000\000\000 àèþ\000àèþ\001\200ûüÏY\000øäèþàÁY\000\034àèþ)ôO\000üÏY\0006_v\b¬?P\0009_v\b\226áèþ\002", '\0' <repeats 11 times>, "à/H\000\000\000\000\000\b®\021\000\000\000\000þ\000\000\000\000\b®\021\000äú8\003´z\021\000¬àèþÿÿÿÿè\fY\000öÿÿÿ\001"... niflags = 1 imapd_haveaddr = 1 #10 0x0804c5db in main (argc=2, argv=0xfee8fad4, envp=0xfee8fae0) at service.c:530 fdflags = 0 fd = 9 p = 0xfef48fdf "0" service = 0x8760038 "imap" request = {x = 134903810} opt = -1 alt_config = 0x0 call_debugger = 1 max_use = 250 reuse_timeout = 60 soctype = 1 typelen = 4 newargc = 1 newargv = (char **) 0x8760008 id = 0 path = "/usr/lib/cyrus-imapd/imapd", '\0' <repeats 22 times>, "\216\225G\000$«f\000\000\017\001÷à/H\000\000\000\000\000\233Îl\000`ú\000÷F\026G\000$«f\000w6Z", '\0' <repeats 97 times>, "$«f\000Ø÷\000÷à/H\000À\f\001÷w6Z\000híèþF\026G\000mðz\000w6Z", '\0' <repeats 97 times>, "mðz\000Hõ\000÷à/H\000À\f\001÷w6Z\000ìíèþF\026G\000\215\005^\000w6Z\000\000\000\000\000\000\000\000\000à/H\000ôõèþ\001\000\000\000\220ëèþ[\205G\000\001", '\0' <repeats 11 times>... sbuf = {st_dev = 771, __pad1 = 0, st_ino = 290064, st_mode = 33261, st_nlink = 1, st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, st_size = 973328, st_blksize = 4096, st_blocks = 1912, st_atim = { tv_sec = 1114556229, tv_nsec = 227738144}, st_mtim = {tv_sec = 1114620294, tv_nsec = 0}, st_ctim = {tv_sec = 1114556033, tv_nsec = 285525888}, __unused4 = 0, __unused5 = 0} start_ino = 290064 start_size = 973328 start_mtime = 1114620294 #11 0x0049aad4 in __libc_start_main () from /lib/tls/libc.so.6 No symbol table info available. #12 0x0804b965 in _start () No symbol table info available.