YAaaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
What i did was copy the imap.sample that came with the package to imap had tried that once before but had to rm -R the existing dir first
It works so i guess back to square one got 127.0.0.1 143 to bind correctly which is great better than great splendorific. Now i would like to setup the imaps service to listen on the outside interface to hostname computerking.ca and the inside interface to 192.168.0.1-100 is this possible???


Wait a minute if i am thinking clearly if port 143 is binded to 127.0.0.1 if someone tries to login on 143 from somewhere other than localhost they will be unable to connect right???? and if i just leave port 933 at 0 it will be open to all addresses which should be fine right it is secured with ssl anyway?????? am i missing something usually when something seems to easy it is. This seems to easy am i leavening a security hole open somewhere?????

HUGE THANKS TO EVERYONE ON THIS LIST



Andreas Aardal Hanssen wrote:

Thanks, Ryan! This does give some important clues. Your error is pretty obscure, but I think we may have found it.

On Thu, 10 Jun 2004, RYAN vAN GINNEKEN wrote:


Ok folks new day new deal found the bincimap pid and did the ktrace
thing that you instructed me to so here is the output of that file. Not
only am i going to get bincimap to work but looks like I am going to
learn a few tricks along the way. Thanks



No prob. Now to decipher this output.



9091 bincimap-up GIO fd 0 read 24 bytes
"1 LOGIN rmvg Aishiteru\r
"



Okay, bincimap-up read your login command.



9091 bincimap-up GIO fd 4 wrote 4 bytes
"rmvg"
9091 bincimap-up GIO fd 4 wrote 1 byte
"\0"
9091 bincimap-up GIO fd 4 wrote 9 bytes
"Aishiteru"
9091 bincimap-up GIO fd 4 wrote 1 byte
"\0"
9091 bincimap-up GIO fd 4 wrote 25 bytes
"Thu Jun 10 13:38:39 2004
"
9091 bincimap-up GIO fd 4 wrote 1 byte
"\0"




After forking off a child process, it wrote the correct data to it.



9095 bincimap-up RET fork 0



This marks the start of the child process, soon to become checkpassword.



9095 bincimap-up CALL execve(0xbfbffd02,0xbfbffbd4,0x80ab000)
9095 bincimap-up NAMI "/usr/local/bin/checkpassword"
9095 bincimap-up NAMI "/usr/libexec/ld-elf.so.1"
9095 checkpassword RET execve 0



Okay so here, /usr/local/bin/checkpassword has been executed.
Now after a whole lot of lines, we finally reach this point. Note the number to the left is the pid, so we know it's the same process.




9095 checkpassword GIO fd 3 read 41 bytes
"rmvg\0Aishiteru\0Thu Jun 10 13:38:39 2004
\0"
9095 checkpassword GIO fd 3 read 0 bytes
""



checkpassword read the username and password. So now we know that checkpassword is working properly. Now follows a whole bunch of lines that in short show that checkpassword reads the password database.


Now:



9095 checkpassword NAMI "/home/rmvg"
9095 checkpassword RET chdir 0



So checkpassword accepted your password, and changed into the /home/rmvg directory. But now comes the strange part:



9095 checkpassword CALL execve(0x804ad40,0xbfbff3c0,0x804ada0)
9095 checkpassword NAMI "/usr/local/sbin/ "
9095 checkpassword RET execve -1 errno 2 No such file or directory
9095 checkpassword CALL execve(0x804ad40,0xbfbff3c0,0x804ada0)
9095 checkpassword NAMI "/usr/local/bin/ "
9095 checkpassword RET execve -1 errno 2 No such file or directory



This pattern is repeated for all PATH entries, is my guess. It seems that
checkpassword thinks its first argument is a blank string, or perhaps
there's a funny invisible character after checkpassword. In any case, it tries to execute the program " " (four blanks), which doesn't exist. So checkpassword does this:




9095 checkpassword CALL exit(0x6f)



It exits 111.



9091 bincimap-up RET select 1



So we're back to bincimap-up again,



9091 bincimap-up GIO fd 2 wrote 97 bytes
"9091 1 [EMAIL PROTECTED]:] <rmvg> authentication failed:
server retu\
rned 111 (internal error)\r
"



And this line basically shows bincimap-up printing the internal error message to the logs.


Now we're getting somewhere! In your run file, put everything in one line. So don't break lines with the '\' character. Instead of this:

a b c \
 d e \
 f g h

Do this:

a b c d e f g h

(If you follow me). You'll get one very long line. Then one by one, remove all spaces between two words and replace them with a single space. So if you had this:

exec tcpserver -ad -s -f 0 143 bincimap-up  -- \
/usr/local/bin/checkpassword     bincimapd

Then replace it with this:

exec tcpserver -ad -s -f 0 143 bincimap-up -- /usr/local/bin/checkpassword bincimapd

Notice that there are no more than one space between each item. Especially after checkpassword, before bincimapd, make sure there is one one single space.

Try it out! Let's see if it works.

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."




Reply via email to