creating my own auth_module for saslauthd

Dan White dwhite at olp.net
Tue Apr 13 15:05:51 EDT 2010


On 13/04/10 17:58 +0200, francis joseph wrote:
>I did but saslauthd still says: set_auth_mech   : unknown authentication mechanism: radius
>In fact if we take a look in Makefile.am and Makefile.in all the auth_mechanisms .c and .h files are referreced although when you compile only 4 of them are being used by saslatuhd (pam rimap shadow ...). So this shows that to install a new mechanism you have to work out with Cyrus dependencies files.
>
>The problem is to find where Cyrus check the dependencies like if got unix -> enable shadow, if got ldap -> auth_ldap enable.
>
>I have seen some referrences to some file in /deps/md5.Po and maybe i need to write a radius.Po file,  but i can't find that folder neither a .Po file in cyrus folder.

This worked for me:

cd saslauthd
cp auth_getpwent.c auth_dan.c
cp auth_getpwent.h auth_dan.h
sed -i 's/auth_getpwent/auth_dan/g' auth_dan.c
sed -i 's/auth_getpwent/auth_dan/g' auth_dan.h

I edited Makefile.am and added this to saslauthd_SOURCES:
auth_dan.c auth_dan.h

Edited mechanisms.c, and added this just above END PUBLIC DEPENDENCIES:
#include "auth_dan.h"

and also include this near the bottom of the file (just prior to the entry
with all zeros):
     {   "dan",          0,                      auth_dan },

Then did:

aclocal -I ../cmulocal -I ../config
autoheader 
autoconf 
automake --add-missing --include-deps

cd ..   (to the top level of the cyrus source)
./configure
cd saslauthd
make
./saslauthd -v
saslauthd 2.1.24
authentication mechanisms: getpwent kerberos5 pam rimap shadow dan

./saslauthd -d -a dan
(started without errors)

-- 
Dan White


More information about the Cyrus-sasl mailing list