From c7e3a2dc319cc6504356be7fa7970917404a69b5 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 10 Dec 2009 19:29:24 +0800 Subject: s3: check for PAM_RADIO_TYPE. Signed-off-by: Bo Yang --- nsswitch/pam_winbind.c | 4 +--- source3/configure.in | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index 2e6520c1ce..51346a8670 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -807,8 +807,7 @@ static int wbc_auth_error_to_pam_error(struct pwb_context *ctx, return pam_winbind_request_log(ctx, ret, username, fn); } -/* PAM_RADIO_TYPE is linux-only. */ -#ifdef LINUX +#if defined(HAVE_PAM_RADIO_TYPE) static bool _pam_winbind_change_pwd(struct pwb_context *ctx) { struct pam_message msg, *pmsg; @@ -846,7 +845,6 @@ static bool _pam_winbind_change_pwd(struct pwb_context *ctx) } #endif - /** * send a password expiry message if required * diff --git a/source3/configure.in b/source3/configure.in index fc9e09b4af..0bd10068bb 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -4500,6 +4500,39 @@ if test x"${try_pam}" != x"no";then AC_MSG_RESULT([$create_pam_modules]) fi # try_pam != no +################################################# +# check for PAM_RADIO_TYPE +AC_TRY_COMPILE([ +#if (!defined(LINUX)) + +#define PAM_EXTERN extern +#if defined(HAVE_SECURITY_PAM_APPL_H) +#include +#elif defined(HAVE_PAM_PAM_APPL_H) +#include +#endif + +#endif + +#if defined(HAVE_SECURITY_PAM_MODULES_H) +#include +#elif defined(HAVE_PAM_PAM_MODULES_H) +#include +#endif + +#if defined(HAVE_SECURITY__PAM_MACROS_H) +#include +#elif defined(HAVE_PAM__PAM_MACROS_H) +#include +#endif + +#ifdef HAVE_SECURITY_PAM_EXT_H +#include +#endif +], +[int i; i = PAM_RADIO_TYPE; ], +AC_DEFINE(HAVE_PAM_RADIO_TYPE, 1, [Define to 1 if PAM_RADIO_TYPE is available]),[]) + ################################################# # check for pam_smbpass support PAM_MODULES="" -- cgit