On Tue, 25 Nov 2003, Morten Grunnet Buhl wrote: >> should run as root. The jail is entered after checkpassword has been >> called and authentication succeeded. >- So that bincimapd is run as jail user and jail group right?
No, bincimap-up chroot()s into the jail path, and setuid/setgids to the jail user and jail group. bincimapd runs as the user that checkpassword runs as, which is typically the unix user or vpopmail. >> So your mail is located in /data/maildirs, okay. Could you show the full >> path (including new/, tmp/ and cur/) of one user's account? >- Sure ls -lR /var/maildirs/user > drwx------ 5 vmailer vmailer 512 Nov 25 18:28 INBOX > drwx------ 2 vmailer vmailer 512 Nov 25 04:23 cur > -rw------- 1 vmailer vmailer 29 Nov 25 15:28 maildirsize > drwx------ 2 vmailer vmailer 512 Nov 25 15:28 new > drwx------ 2 vmailer vmailer 512 Nov 25 15:28 tmp >its a bit messy since I implementet bincimap later. I hope the problem >is not here :) The path setting you should use is ".". checkpassword should then change to /var/maildirs/user before running bincimapd. >> I would check the full strace for "chdir" commands (please bzip2 -9 the >> output and post to the list if its not too large). >- Not a lot of thouse chdir's Ill attach that file. On line 92, this stub reads the user, password and timestamp from bincimap-up on file descriptor 3. I see the timestamp has a '\n' at the end, which isn't intended. But that's not relevant here ;-). On line 153, the checkpassword program exits, but strangely we don't see the reason. The wait4 on line 158 suggests that it exited due to a signal, but WTERMSIG is 117, which doesn't make much sense to me. The solution lies in the sources of the checkpassword program. A good place to start looking is where the setgroups() call is made. Something funny happens after that point, preventing bincimapd from being started. I don't have any chance to look at it right now, but I'm glad to help you or anyone who can help figure out this mystery. Andy :-) -- Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg Author of Binc IMAP | "It is better not to do something http://www.bincimap.org/ | than to do it poorly."
