From 9e17b0516d2b640d34cbb50933bd065e65bfab9d Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 27 May 2014 23:05:08 +0200 Subject: PAM: Fix compilation of pam_test_client with openpam linuxpam and openpam use different functions for text based conversation. Reviewed-by: Sumit Bose --- src/sss_client/pam_test_client.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/sss_client/pam_test_client.c b/src/sss_client/pam_test_client.c index c9cbffaf4..29d1fcbf0 100644 --- a/src/sss_client/pam_test_client.c +++ b/src/sss_client/pam_test_client.c @@ -27,12 +27,26 @@ #include #include -#include +#ifdef HAVE_SECURITY_PAM_MISC_H +# include +#elif defined(HAVE_SECURITY_OPENPAM_H) +# include +#endif + +#ifdef HAVE_SECURITY_PAM_MISC_H static struct pam_conv conv = { misc_conv, NULL }; +#elif defined(HAVE_SECURITY_OPENPAM_H) +static struct pam_conv conv = { + openpam_ttyconv, + NULL +}; +#else +# error "Missing text based pam conversation function" +#endif int main(int argc, char *argv[]) { -- cgit