After battling with this for more than a week -- I've now well surpassed my knowledgebase, and am seeking assistance with this issue.

I'll briefly summarize my current situation, and then go into detail about how I got here for reference and the search engines.


I'm able to execute the command: ~vpopmail/bin/vuserinfo [EMAIL PROTECTED]
name:   test
passwd:
clear passwd:
comment/gecos: test
uid:    0
gid:    0
flags:  0
gecos: test
limits: No user limits set.
dir:       /usr/local/vpopmail/domains/safire.us/test
quota:     NOQUOTA
usage:     NOQUOTA
last auth: Tue Mar 29 10:17:07 2005
last auth ip: imap

and I can see this successfully connect to mysql:
050620 10:31:48       7 Connect     [EMAIL PROTECTED] on
                     7 Init DB     vpopmail
7 Query select pw_name, pw_passwd, pw_uid, pw_gid, pw_gecos, pw_dir, pw_shell , pw_clear_passwd from vpopmail where pw_name = "test" and pw_domain = "safire.us"

proving that my ~vpopmail/etc/vpopmail.mysql settings are accurate (as set my toaster_watcher.pl from toaster-watcher.conf setting)

However the following commands fail:

authtest [EMAIL PROTECTED]
Authentication FAILED: Input/output error
authtest -s authvchkpw [EMAIL PROTECTED]
Authentication FAILED: Input/output error

Which kindly produces:
-rw-------   1 root  wheel   716800 Jun 20 10:24 authdaemond.core
as seen in the system logs: kernel: pid 49176 (authdaemond), uid 0: exited on signal 11 (core dumped)

with DEBUG_LOGIN, I get the following errors through syslog:
[[ main startup ]]
Jun 20 10:26:50 gold authdaemond: stopping authdaemond children
Jun 20 10:26:50 gold authdaemond: modules="authvchkpw", daemons=5
Jun 20 10:26:50 gold authdaemond: Installing libauthvchkpw
Jun 20 10:26:50 gold authdaemond: Installation complete: authvchkpw
[[ end main startup ]]
[[ segfault errors ]]
Jun 20 10:27:50 gold authdaemond: stopping authdaemond children
Jun 20 10:27:50 gold authdaemond: restarting authdaemond children
Jun 20 10:27:50 gold authdaemond: modules="authvchkpw", daemons=5
Jun 20 10:27:50 gold authdaemond: Uninstalling authvchkpw
Jun 20 10:27:50 gold authdaemond: Installing libauthvchkpw
Jun 20 10:27:50 gold authdaemond: Installation complete: authvchkpw
[[ end segfault errors ]]

gdb backtrace of the core shows:

#0  0x00000008004016a4 in ?? ()
#1 0x0000000800c7a5a2 in courier_authvchkpw_init () from /usr/local/lib/courier-authlib/libauthvchkpw.so #2 0x0000000800c7a64b in courier_authvchkpw_init () from /usr/local/lib/courier-authlib/libauthvchkpw.so #3 0x0000000800c72857 in vget_assign (domain=0x800d7f100 "safire.us", dir=0x0, dir_len=0, uid=0x800d7efe0,
   gid=0x7fffffffe304) at vpopmail.c:2244
#4 0x0000000800c6e6f1 in auth_vchkpw_pre (userid=0x5070e0 "[EMAIL PROTECTED]", service=0x7fffffffe440 "pop3", callback=0x800c6e330 <callback_vchkpw>, arg=0x7fffffffe350) at preauthvchkpw.c:80 #5 0x0000000800c6e47b in auth_vchkpw (service=0x7fffffffe440 "pop3", authtype=0x7fffffffe445 "login", authdata=0x5070e0 "[EMAIL PROTECTED]", callback_func=0x402a70 <printauth>, callback_arg=0x7fffffffe40c) at authvchkpw.c:89 #6 0x0000000000403611 in auth (fd=4, p=0x7fffffffe44b "[EMAIL PROTECTED]") at authdaemond.c:734
#7  0x0000000000403916 in doauth (fd=4) at authdaemond.c:820
#8  0x0000000000403f6c in start () at authdaemond.c:1021
#9 0x0000000000403fd9 in main (argc=1, argv=0x7fffffffe9d8) at authdaemond.c:1037

No indication is left in the mysql logs to show that the authtest even attempted to connect -- so whatever is happening -- it is dying before it even gets the information to do the authcheck.

I admin many systems and have not seen this segfault issue on i386 hardware.


I'm running on an AMD Opteron Box, FreeBSD 5.4-RELEASE-p2 AMD64 Edition. I'm using Mail Toaster 4.08, vpopmail 5.4.10_2, courier-authlib-base-0.56, courier-authlib-vchkpw-0.56, courier-imap-4.0.3,1

I've executed:

toaster_setup.pl -s courier
toaster_setup.pl -s vpopmail

(with toaster-watcher.conf settings:
install_vpopmail               = port  # ver, port    (5.4.7)
install_courier_imap           = port   # 0, ver, port (3.0.8)
)

with these make.conf settings in effect:
CFLAGS=-fPIC -ggdb
CPUTYPE=
CXXFLAGS=
NOCCACHE=
STRIP=
DEBUG=-g
DEBUG_FLAGS=-ggdb

I also set all these as environment variables just for good measure
(This was after executing pkg_delete courier-authlib-base-0.56 courier-authlib-vchkpw-0.56 courier-imap-4.0.3,1 courier-authlib-vchkpw-0.56 p5-vpopmail-0.08 vpopmail-5.4.10_2)

These commands are affected by the pkgtools.conf settings:

MAKE_ARGS = {
'mail/vpopmail' => 'WITH_CLEAR_PASSWD=yes WITH_MYSQL=yes WITH_QMAIL_EXT=yes WITH_SPAMASSASSIN=yes SPAM_THRESHOLD=10 LOGLEVEL=y WITH_SQL_LOG=yes' 'mail/courier-imap' => 'BATCH=1 WITHOUT_IPV6=yes WITH_OPENSSL=yes WITH_AUTH_VCHKPW=yes',
'security/courier-authlib' => 'BATCH=1 WITH_AUTH_VCHKPW=yes',
}

The crash upon connect occurs after courier-authdaemond is freshly started:

./courier-authdaemond.sh start
Starting courier_authdaemond.

(/usr/local/etc/authlib/authdaemonrc contains relevant settings:
authmodulelist="authvchkpw"
DEBUG_LOGIN=1
)

I'd like to note that the vuserinfo command also failed until I added WITH_MYSQL=yes to vpopmail's MAKE_ARGS:
./vuserinfo [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
no such user [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

Any suggestions on how to continue, what more I can get out of GDB, or any more information I can provide is greatly appreciated.

---------end current issue--------------

I had previously been battling with the following error:
Linking libauthvchkpw.la
/usr/bin/ld: /usr/local/vpopmail/lib/libvpopmail.a(vpopmail.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC
/usr/local/vpopmail/lib/libvpopmail.a: could not read symbols: Bad value
gmake[2]: *** [libauthvchkpw.la] Error 1
gmake[2]: Leaving directory `/usr/ports/mail/courier-authlib-vchkpw/work/courier-authlib-0.56'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/mail/courier-authlib-vchkpw/work/courier-authlib-0.56'
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/mail/courier-authlib-vchkpw.
*** Error code 1

Which can be resolved multiple ways --
I had make.conf CFLAGS?=-fPIC -- however some things do not use that apparently
setting it to CFLAGS=-fPIC and recompiling vpopmail and courier helped.

At one point I was trying to use install_vpopmail=5.4.8 in the toaster-watcher.conf -- however I had to: setenv CFLAGS -fPIC to get that version to compile correctly (I use /bin/tcsh, you'll need some set/export commands with bash)

--
Applied Networking System Administration Major
Rochester Institute of Technology
Rochester, NY

[EMAIL PROTECTED]
AIM: L0g1cX
http://LogicX.net

Reply via email to