summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/pam_smbpass/wscript_build13
-rw-r--r--source3/wscript4
-rw-r--r--source3/wscript_build7
3 files changed, 18 insertions, 6 deletions
diff --git a/source3/pam_smbpass/wscript_build b/source3/pam_smbpass/wscript_build
new file mode 100644
index 0000000000..39e615e811
--- /dev/null
+++ b/source3/pam_smbpass/wscript_build
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+if bld.CONFIG_SET('HAVE_PAM_START'):
+ bld.SAMBA_LIBRARY('pamsmbpass',
+ source='''pam_smb_auth.c
+ pam_smb_passwd.c
+ pam_smb_acct.c
+ support.c''',
+ deps='''tdb talloc pam libwbclient cap ASN1_UTIL PARAM LIB_NONSMBD PASSDB GROUPDB SMBLDAP
+ LIBSAMBA LIBTSOCKET''',
+ cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
+ realname='pam_smbpass.so',
+ )
diff --git a/source3/wscript b/source3/wscript
index d9b4646db0..706b932dbf 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -660,6 +660,10 @@ return 0;
if conf.env.with_iconv:
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')
+
seteuid = False
if not seteuid:
seteuid = conf.CHECK_CODE('''
diff --git a/source3/wscript_build b/source3/wscript_build
index c44485fffe..183eac1a69 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -944,12 +944,6 @@ SMBFILTER_SRC = '''utils/smbfilter.c'''
WINBIND_WINS_NSS_SRC = '''../nsswitch/wins.c ${PARAM_SRC}
${LIB_NONSMBD_SRC} ${LIBSMB_ERR_SRC} ${LIBNMB_SRC}'''
-PAM_SMBPASS_SRC_0 = '''pam_smbpass/pam_smb_auth.c pam_smbpass/pam_smb_passwd.c
- pam_smbpass/pam_smb_acct.c pam_smbpass/support.c ../lib/util/asn1.c'''
-PAM_SMBPASS_SRC = '''${PAM_SMBPASS_SRC_0} ${PARAM_SRC} ${LIB_NONSMBD_SRC} ${PASSDB_SRC} ${GROUPDB_SRC} \
- ${SMBLDAP_SRC} ${LIBSAMBA_SRC} \
- ${LIBTSOCKET_SRC}'''
-
WBINFO_SRC = '''../nsswitch/wbinfo.c'''
WINBIND_NSS_SRC = '''${WBCOMMON_SRC} ${LIBREPLACE_SRC}'''
@@ -1619,6 +1613,7 @@ bld.RECURSE('auth')
bld.RECURSE('passdb')
bld.RECURSE('winbindd')
bld.RECURSE('libgpo/gpext')
+bld.RECURSE('pam_smbpass')
bld.ENFORCE_GROUP_ORDERING()
bld.CHECK_PROJECT_RULES()