aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-02-19 03:07:16 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-02-19 03:07:16 +0100
commit0fad676f16281641b6d720443b98844885294a9b (patch)
tree59249465ac5e4ca754ccb303ec09e0ebc4febd41
parentAdd support for SELinux session. (diff)
downloadpambase-0fad676f16281641b6d720443b98844885294a9b.tar.gz
pambase-0fad676f16281641b6d720443b98844885294a9b.tar.bz2
pambase-0fad676f16281641b6d720443b98844885294a9b.zip
Add support for FreeBSD's pam_login_access module (like pam_access).pambase-2008021920080219
-rw-r--r--openpam-conf6
-rw-r--r--system-login.in3
2 files changed, 9 insertions, 0 deletions
diff --git a/openpam-conf b/openpam-conf
index d01f7f1..718b8a0 100644
--- a/openpam-conf
+++ b/openpam-conf
@@ -1,3 +1,9 @@
#if defined(HAVE_CRACKLIB)
# error "pam_cracklib is only supported with Linux-PAM"
#endif
+
+// OpenPAM only provides basic modules, it's FreeBSD that provides the
+// extended modules, so check for FreeBSD building first.
+#ifdef __FreeBSD__
+# define HAVE_LOGIN_ACCESS
+#endif
diff --git a/system-login.in b/system-login.in
index 0ae6ceb..d4e750d 100644
--- a/system-login.in
+++ b/system-login.in
@@ -8,6 +8,9 @@ auth include system-auth
#if HAVE_ACCESS
account required pam_access.so DEBUG
#endif
+#ifdef HAVE_LOGIN_ACCESS
+account required pam_login_access.so
+#endif
account include system-auth
#if HAVE_TALLY
account required pam_tally.so file=/var/log/faillog onerr=succeed DEBUG