From owner-freebsd-current Sun Feb 9 1:23: 7 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ABCD37B410 for ; Sun, 9 Feb 2003 01:23:05 -0800 (PST) Received: from naboo.blacktrap.net (212.68.218.22.brutele.be [212.68.218.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96F8243FBD for ; Sun, 9 Feb 2003 01:23:03 -0800 (PST) (envelope-from olinether@blacktrap.net) Received: from naboo.blacktrap.net (localhost [127.0.0.1]) by naboo.blacktrap.net (8.12.3/8.12.3) with ESMTP id h199N9Lc006885; Sun, 9 Feb 2003 10:23:09 +0100 (CET) (envelope-from olinether@naboo.blacktrap.net) Received: (from olinether@localhost) by naboo.blacktrap.net (8.12.3/8.12.3/Submit) id h199N8VO006884; Sun, 9 Feb 2003 10:23:08 +0100 (CET) Date: Sun, 9 Feb 2003 10:23:06 +0100 From: Olivier To: freebsd-current@freebsd.org Subject: Getting an OpenPAM module to work on 5.0-RELEASE Message-ID: <20030209102306.A6880@naboo.blacktrap.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 '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