Jeff A. Earickson
2005-Jan-26 21:11 UTC
[Dovecot] How to run in debug format for SSL testing?
Help, new to dovecot... I want to get some output from my test sessions to confirm that SSL pop and imap are working. How does one get debug output from dovecot? How does one see that dovecot is using SSL in a transaction? I configured dovecot 0.99.13 with: CC=gcc CPPFLAGS=-I/opt/openssl/include LDFLAGS=-L/opt/openssl/lib \ ./configure --prefix=/opt/dovecot --with-ssl=openssl \ --with-ssldir=/opt/openssl/ssl --with-rawlog --enable-debug > configure.out on Solaris 9. BTW, if I compile with Sun's StudioOne version 8 compiler, I get a core dump of dovecot-auth into /var/run/dovecot. The gdb backtrace looks like: gdb dovecot-auth core GNU gdb 5.2.1 Copyright 2002 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 "sparc-sun-solaris2.8"... (gdb complaints about lack of debug symbols from numerous libs snipped out) Core was generated by `dovecot-auth'. Program terminated with signal 10, Bus error. #0 0x0002b64c in pam_child_input () (gdb) backtrace #0 0x0002b64c in pam_child_input () #1 0x00036c68 in io_loop_handler_run () #2 0x00035e5c in io_loop_run () #3 0x00025940 in main () The code works when compiled with gcc 3.4.3. Jeff Earickson Colby College
On 26.1.2005, at 23:11, Jeff A. Earickson wrote:> Help, new to dovecot... > > I want to get some output from my test sessions to confirm that > SSL pop and imap are working. How does one get debug output from > dovecot? How does one see that dovecot is using SSL in a transaction?I don't think you can currently see it from logs. Easiest way to try that it works at all is to use: openssl s_client -connect host:993> on Solaris 9. BTW, if I compile with Sun's StudioOne version 8 > compiler, > I get a core dump of dovecot-auth into /var/run/dovecot. The gdb > backtrace > looks like: > > Program terminated with signal 10, Bus error. > #0 0x0002b64c in pam_child_input ()Looks like I fixed this in some 1.0-tests already. I'll include the fix in 0.99.14 as well: diff -ru dovecot-0.99.13/src/auth/passdb-pam.c dovecot-0.99.14/src/auth/passdb-pam.c --- dovecot-0.99.13/src/auth/passdb-pam.c 2004-12-19 07:25:15.000000000 +0200 +++ dovecot-0.99.14/src/auth/passdb-pam.c 2005-01-30 09:52:53.000000000 +0200 @@ -275,7 +275,7 @@ i_error("PAM: Child process returned only %d bytes", ret); result = PASSDB_RESULT_INTERNAL_FAILURE; } else { - result = *((enum passdb_result *) buf); + memcpy(&result, buf, sizeof(result)); if ((size_t)ret > sizeof(result)) { /* error message included */ -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20050130/8f45fc56/attachment-0001.bin>
Jeff A. Earickson
2005-Jan-31 18:25 UTC
[Dovecot] How to run in debug format for SSL testing?
On Sun, 30 Jan 2005, Timo Sirainen wrote:> Date: Sun, 30 Jan 2005 09:53:55 +0200 > From: Timo Sirainen <tss at iki.fi> > To: Jeff A. Earickson <jaearick at colby.edu> > Cc: dovecot at dovecot.org > Subject: Re: [Dovecot] How to run in debug format for SSL testing? > > On 26.1.2005, at 23:11, Jeff A. Earickson wrote: > >> Help, new to dovecot... >> >> I want to get some output from my test sessions to confirm that >> SSL pop and imap are working. How does one get debug output from >> dovecot? How does one see that dovecot is using SSL in a transaction? > > I don't think you can currently see it from logs. > > Easiest way to try that it works at all is to use: > > openssl s_client -connect host:993Timo, this worked great for seeing how SSL worked. Thanks! But still, if one builds with "enable-debug", how do you actually use it? I tried doing "setenv VERBOSE_DEBUG 1" and running the code, but didn't see anything happen.> >> on Solaris 9. BTW, if I compile with Sun's StudioOne version 8 compiler, >> I get a core dump of dovecot-auth into /var/run/dovecot. The gdb backtrace >> looks like: >> >> Program terminated with signal 10, Bus error. >> #0 0x0002b64c in pam_child_input () > > Looks like I fixed this in some 1.0-tests already. I'll include the fix in > 0.99.14 as well:Yes, this patch got 0.99.13 to work with Sun's compiler, no core dumps. Thanks.> > diff -ru dovecot-0.99.13/src/auth/passdb-pam.c > dovecot-0.99.14/src/auth/passdb-pam.c > --- dovecot-0.99.13/src/auth/passdb-pam.c 2004-12-19 07:25:15.000000000 > +0200 > +++ dovecot-0.99.14/src/auth/passdb-pam.c 2005-01-30 09:52:53.000000000 > +0200 > @@ -275,7 +275,7 @@ > i_error("PAM: Child process returned only %d bytes", ret); > result = PASSDB_RESULT_INTERNAL_FAILURE; > } else { > - result = *((enum passdb_result *) buf); > + memcpy(&result, buf, sizeof(result)); > > if ((size_t)ret > sizeof(result)) { > /* error message included */ >