courier-imap is the IMAP engine from the courier mail server. It provides POP3, POP3-SSL, IMAP, and IMAP-SSL services for my mail servers.
Early versions of courier-imap included their own authentication routines as part of the code. When version 4 was released, the authentication code was split into a separate package called courier-authlib. This allowed people who were familiar with non-standard authentication methods to release updates to the authentication code without having to update courier-imap itself.
Running courier-imap under daemontools
Running courier-authlib under daemontools
Running courierpassd under daemontools
Building Courier-IMAP RPMs without FAM
I have encountered a problem installing courier-authlib-0.59.3 on several CentOS 4 and CentOS 5 machines. The problem is in authvchkpw.c, the function auth_vchkpw_login() is called from auth_vchkpw(), before being declared- which means that at the time the function is called, the compiler doesn't know the types of the paramaters. The compiler makes a guess, but that guess ends up being incorrect.
At first I thought this might be something relating to the versions of gcc which are used on CentOS, but when I realized that I could fix it by simply defining the function before calling it (which is something I always do in my own code anyway) I figured it made more sense to just switch the auth_vchkpw_login() and auth_vchkpw() functions around.
The patch below fixes the issue by reversing the order of the two functions within the file. It also updates the courier-authlib.spec file so that the patch is applied while building RPM files.
File: | courier-authlib-0.59.3-auth_vchkpw_login.patch |
Size: | 2,335 bytes |
Date: | 2007-09-14 09:05:21 +0000 |
MD5: | cfc70641b8603d436db1707f2dd45c51 |
SHA-1: | 8e89286d0662d58b8c3639e0b29903135ad3899f |
RIPEMD-160: | 073870b76472245acd1a9f68375b8e69da4acad3 |
PGP Signature: | courier-authlib-0.59.3-auth_vchkpw_login.patch.asc |
To use the patch to build RPMs, download the patch and the original courier-authlib-0.59.3 source code package, into your ~/rpm/SOURCES directory. Extract the courier-authlib.spec file from the original source package, and move it to your ~/rpm/SPECS directory. Then build the package using a normal "rpmbuild -ba" command on the .spec file. The process looks like this:
$ cd ~/rpm/SOURCES
$ wget
http://prdownloads.sourceforge.net/courier/courier-authlib-0.59.3.tar.bz2
...
$ wget
http://qmail.jms1.net/courier/courier-authlib-0.59.3-auth_vchkpw_login.patch
...
$ tar xjf courier-authlib-0.59.3.tar.bz2 courier-authlib-0.59.3/courier-authlib.spec
$ mv courier-authlib-0.59.3/courier-authlib.spec ../SPECS
$ rmdir courier-authlib-0.59.3
$ cd ../SPECS
$ rpmbuild -ba courier-authlib.spec