Peter Stuge wrote:

On Thu, Apr 29, 2004 at 09:30:30AM -0700, Joe Zacky wrote:


Yes, I did do a full trace of both bincimap and pop3d with full 4096
character strings. What I found was the pop3d read the cdb database
until it found the correct user entry - 3 reads. The bincimap trace
showed the correct entry was never read from the cdb. It stopped before
it found the entry after 2 reads as shown above. I tried to gdb debug it
but got completely confused.



Ok. Hm. gdb could've helped, but only if source files were readily
available and set up in the proper directories, otherwise it wouldn't give
much, but confusion. :)


I had my source files setup properly and I put a sleep(60) in checkvpw.cc main to give me time to start gdb. I got confused because it was passing objects within objects as parameters and it was just too hard for me to follow.

pop3d itself doesn't read passwd.cdb, instead it's of course checkvpw
doing the work of authenticating the user. Deduction gives that the only
other real error source is input to checkvpw

That's my theory too but you state it so eloquently.

- what does the timestamp
look like in the popup and bincimap-up cases, respectively? Does either of
them send any "more data" after the timestamp which is terminated by \0 ?


//Peter


You lost me with the timestamp. I don't know what timestamp you mean.

These are the parameters passed to checkvpw from qmail-popup, along with the environment. I captured it with strace:

691 execve("/usr/local/bin/checkvpw", ["/usr/local/bin/checkvpw", "/var/qmail/bin/qmail-pop3d", "M
aildir"], ["PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bi
n", "PWD=/var/qmail/supervise/qmail-pop3d", "SHLVL=0", "PROTO=TCP", "TCPLOCALIP=10.200.1.2", "TCPLOC
ALPORT=110", "TCPLOCALHOST=0", "TCPREMOTEIP=10.100.10.11", "TCPREMOTEPORT=3987"]) = 0


And here are the parameters passed from bincimap-up:

1571 execve("/usr/local/bin/checkvpw", ["/usr/local/bin/checkvpw", "/var/qmail/bin/bincauthwrap", "
/var/qmail/bin/bincimapd", "Maildir"], ["PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/us
r/bin:/usr/sbin:/usr/X11R6/bin", "PWD=/var/qmail/supervise/bincimap", "SHLVL=0", "PROTO=TCP", "TCPLO
CALIP=10.200.1.2", "TCPLOCALPORT=143", "TCPLOCALHOST=qmail.zackynet.com", "TCPREMOTEIP=10.100.10.11"
, "TCPREMOTEPORT=3992", "BINCIMAP_LOGIN=AUTHENTICATE+1", "BINCIMAP_STATE=1", "BINCIMAP_USERID=zackyn
et-jztest", "BINCIMAP_IP=10.100.10.11", "BINCIMAP_GLOBALCONFIG_41757468656e7469636174696f6e::616c6c6
f7720706c61696e206175746820696e206e6f6e2073736c=796573", "BINCIMAP_GLOBALCONFIG_41757468656e74696361
74696f6e::617574682070656e616c7479=34", "BINCIMAP_GLOBALCONFIG_41757468656e7469636174696f6e::6469736
1626c65207374617274746c73=6e6f", "BINCIMAP_GLOBALCONFIG_4c6f67::656e7669726f6e6d656e7420697020766172
6961626c65=54435052454d4f54454950", "BINCIMAP_GLOBALCONFIG_4c6f67::697020656e7669726f6e6d656e7420766
1726961626c65=", "BINCIMAP_GLOBALCONFIG_4c6f67::74797065=6d756c74696c6f67", "BINCIMAP_GLOBALCONFIG_4
d61696c626f78::6175746f2063726561746520696e626f78=796573", "BINCIMAP_GLOBALCONFIG_4d61696c626f78::61
75746f20737562736372696265206d61696c626f786573=494e424f58", "BINCIMAP_GLOBALCONFIG_4d61696c626f78::6
465706f74=494d4150646972", "BINCIMAP_GLOBALCONFIG_4d61696c626f78::70617468=2e", "BINCIMAP_GLOBALCONF
IG_4d61696c626f78::74797065=4d61696c646972", "BINCIMAP_GLOBALCONFIG_4d61696c626f78::756d61736b=30303
0", "BINCIMAP_GLOBALCONFIG_53534c::63612066696c65=", "BINCIMAP_GLOBALCONFIG_53534c::63612070617468="
, "BINCIMAP_GLOBALCONFIG_53534c::636970686572206c697374=214144483a5243342b5253413a484947483a4d454449
554d3a4c4f573a4558503a2b53534c76323a2b455850", "BINCIMAP_GLOBALCONFIG_53534c::70656d2066696c65=2f766
1722f716d61696c2f636f6e74726f6c2f62696e63696d61702e70656d", "BINCIMAP_GLOBALCONFIG_53534c::766572696
6792070656572=6e6f", "BINCIMAP_GLOBALCONFIG_5365637572697479::6a61696c2067726f7570=6e6f626f6479", "B
INCIMAP_GLOBALCONFIG_5365637572697479::6a61696c2070617468=2f7661722f716d61696c2f7375706572766973652f
62696e63696d6170", "BINCIMAP_GLOBALCONFIG_5365637572697479::6a61696c2075736572=6e6f626f6479", "BINCI
MAP_GLOBALCONFIG_5365637572697479::76657273696f6e20696e206772656574696e67=", "BINCIMAP_GLOBALCONFIG_
53657373696f6e::617574682074696d656f7574=3630", "BINCIMAP_GLOBALCONFIG_53657373696f6e::69646c6520746
96d656f7574=31383630", "BINCIMAP_GLOBALCONFIG_53657373696f6e::7472616e73666572206275666665722073697a
65=31303234", "BINCIMAP_GLOBALCONFIG_53657373696f6e::7472616e736665722074696d656f7574=31323030"]) =
0


I don't know if this is what you are looking for. If there is something else I can show you, please let me know.

Thanks,
Joe Zacky




Reply via email to