From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
Date: Wed, 30 Nov 2016 22:02:20 +0100
Subject: Link the module with the PAM library

Missing this link didn't cause immediate trouble, because the module is
usually loaded by code that already linked against the PAM library.  But
we actually use symbols from there, so make this dependency explicit.
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 74ed65a..7f5c228 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ pamexec_LTLIBRARIES = pam_mysql.la
 pam_mysql_la_SOURCES = pam_mysql.c
 pam_mysql_la_LDFLAGS = -module -avoid-version
 pam_mysql_la_CPPFLAGS = $(openssl_CFLAGS)
-pam_mysql_la_LIBADD   = $(openssl_LIBS)
+pam_mysql_la_LIBADD   = $(openssl_LIBS) -lpam
 
 EXTRA_DIST = \
 	INSTALL.pam-mysql \
