Hi, Caskey!
On Sat, 1 Mar 2003, Caskey Dickson wrote:
>Hello all. The hard part of the copy patch is done. I haven't gone down
>and worked on the link into new/, but the delivery to tmp/ is completely
>rewritten to make use of posix syscalls and stack based buffers instead
>of new/delete'd ones. The size is determined at runtime by querying
>the OS.
>The patch is 200 lines long so it's here:
>http://www.technocage.com/~caskey/bincimap/copyA-1.0.24.patch
I found a comment here:
/* even if errno is EINTR we have no way of knowing the number
* of bytes actually written so we must abort, on systems with
* safe interruption of reads, we wouldn't get EINTR anyway. --cld
*/
The man page in RedHat Linux 8.0 for write states this:
EINTR The call was interrupted by a signal before any data was writ-
ten.
On Solaris:
EINTR A signal was caught during the write operation and no data
was transferred.
Are you sure it's right to abort the operation even if errno == EINTR?
>When I go over the second half of the copy command, that'll go up as copyB.
Great. I'll be moving COPY into Maildir today too :). It'll really just be
a move of the whole function with only a few tweaks here and there, so go
ahead and work on the 1.0.24 tree and I'll merge the patch.
>The other two patches I have for the io bug which is not strictly necessary
>if Andreas has already rewritten the code and my change to enable the
>setuid and setgid to be toggled off are here:
>http://www.technocage.com/~caskey/bincimap/configs-1.0.24.patch
>http://www.technocage.com/~caskey/bincimap/io-1.0.24.patch
Okay - looking at these now.
>As a side note for those doing testing, try this:
>Edit the default config and turn off chroot, setgid, setuid and set
>the logger to 'stderr'. Then create a test homedir/maildir like so:
>[EMAIL PROTECTED] ~/ $ mkdir -p binctest/home/Maildir/{cur,new,tmp}
>Then run the server using your new config and a faked checkpassword:
>[EMAIL PROTECTED] ~/ $ tcpserver localhost 14300 --conf=./bincimap.conf
>/usr/bin/printf '%s\n%s\n' user.user /home/user/binctest/home
>That will enable any client to connect locally and make testing binc code
>easier without having to actually install it on a system as root. The
>bogus checkpassword using printf will simply authenticate any username/password
>into the test maildir.
>Copy a few sample messages from an existing maildir into the Maildir/new and
>you're good to go.
Heh - I created a bogus local user on my machine with a short simple
password, and ran
./configure --prefix=`pwd` --sysconfdir=`pwd`/conf
Symlinked src/auth/ binaries to src/ and src/ to bin/. :)
Andy
--
Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg
Author of Binc IMAP | Nil desperandum