From b73e4e36f5307316e2896d9731377f4252d0e444 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 1 Dec 2010 21:26:49 +0100 Subject: s3-waf: add pam configure checks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Autobuild-User: Günther Deschner Autobuild-Date: Mon Dec 6 17:34:45 CET 2010 on sn-devel-104 --- source3/wscript | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 2 deletions(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 3354ec16c1..b91c6fa41d 100644 --- a/source3/wscript +++ b/source3/wscript @@ -743,8 +743,75 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab); conf.DEFINE('HAVE_ICONV', 1) if Options.options.with_pam: - conf.CHECK_HEADERS('security/pam_appl.h security/pam_modules.h pam/pam_modules.h', together=True) - conf.CHECK_FUNCS_IN('pam_start', 'pam', checklibc=True, headers='security/pam_appl.h') + conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h') + if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'): + print "--with-pam=yes but pam_appl.h not found" + sys.exit(1) + conf.CHECK_FUNCS_IN('pam_get_data', 'pam', mandatory=True) + conf.CHECK_HEADERS('security/pam_modules.h pam/pam_modules.h') + if not conf.CONFIG_SET('HAVE_SECURITY_PAM_MODULES_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_MODULES_H'): + print "--with-pam=yes but pam_modules.h not found" + sys.exit(1) + conf.CHECK_HEADERS('security/pam_ext.h security/_pam_macros.h') + conf.CHECK_HEADERS('pam/pam_ext.h pam/_pam_macros.h') + conf.CHECK_FUNCS_IN('pam_vsyslog', 'pam') + conf.CHECK_CODE(''' +#if defined(HAVE_SECURITY_PAM_APPL_H) +#include +#elif defined(HAVE_PAM_PAM_APPL_H) +#include +#endif +pam_set_item(0, PAM_RHOST, 0); +''', + 'HAVE_PAM_RHOST', + lib='pam', + msg="Checking whether PAM_RHOST is available"); + conf.CHECK_CODE(''' +#if defined(HAVE_SECURITY_PAM_APPL_H) +#include +#elif defined(HAVE_PAM_PAM_APPL_H) +#include +#endif +pam_set_item(0, PAM_TTY, 0); +''', + 'HAVE_PAM_TTY', + lib='pam', + msg="Checking whether PAM_TTY is available"); + conf.CHECK_CODE(''' +#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; +''', + 'HAVE_PAM_RADIO_TYPE', + lib='pam', + msg="Checking whether PAM_RADIO_TYPE is available"); + conf.DEFINE('WITH_PAM', 1) + conf.DEFINE('WITH_PAM_MODULES', 1) seteuid = False if not seteuid: -- cgit