mod_auth_mysql Patch

One thing that has always bugged me about mod_auth_mysql for Apache is that it requires you to create a table with a single username/groupname combo for each user's group memberships like so.

username groupname
janedoe users
janedoe administrators
johndoe users

ProFTPD has a really nice feature that will accept either one row per user/membership or a comma seperated list of users for each group like so.

groupname usernames
users janedoe, johndoe
administrators janedoe

Well I finally got off my butt (figuratively of course) and patched mod_auth_mysql to mimic this behavior. Go get my patch and apply it to the source. The patch is against 3.0.0 and I have no intention of testing it on any older version. I will continue to maintain this patch until its incorporated into the main tree as this is pretty much a critical feature for me.

To build and install this on my Gentoo server I used the following commands, YMMV:

apxs2 -c -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c
apxs2 -i mod_auth_mysql.la