Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2003 10:23:06 +0100
From:      Olivier <olinether@blacktrap.net>
To:        freebsd-current@freebsd.org
Subject:   Getting an OpenPAM module to work on 5.0-RELEASE
Message-ID:  <20030209102306.A6880@naboo.blacktrap.net>

next in thread | raw e-mail | index | archive | help
Hi, 

I'm trying to write a MySQL authentication PAM module to be used with
Cyrus-imapd2 and salsauthd, since pam-mysql is broken wrt OpenPAM.
I started from the base modules source and added mysql code in it. The problem
is to get the compiled shared library to work. 

The authentication always fail, not even loading the module with this error :
saslauthd[94536]: in openpam_load_module(): no pam_sql.so found
saslauthd[94536]: DEBUG: auth_pam: pam_start failed: failed to load module
saslauthd[94536]: AUTHFAIL: user=oli service=imap realm= [PAM start error]

I kept the structure of the pam_unix OpenPAM module and am using the following
Makefile :

LIB         = pam_sql
SHLIB_NAME  = pam_sql.so
SRCS        = pam_sql.c
CFLAGS      += -I/usr/local/include
DPADD       = ${LIBCRYPT}
LDADD       = -lcrypt
.include <bsd.lib.mk>

'make' and make 'install' work fine, and put a pam_sql.so and a 'libpam_sql.a'
file in /usr/lib. 

I tried every variation of this line in my /etc/pam.d/imap file to no avail :
auth       required    pam_sql.so  no_warn

I always get the same kind of error, even when specifying the full path to the
module in the /etc/pam.d/imap file. Looking at the source code for the 
openpam_load_module() and openpam_dynamic() functions revealed nothing weird.

What is it I am doing wrong? I will be glad to provide more info if needed. 
Thanks a lot in advance for any ideas.

(Please Cc: to me since I am not currently subscribed to -current)

Olivier

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030209102306.A6880>