summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2005-08-18 11:13:30 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2005-08-18 11:13:30 +0000
commitd0fdfbbb6df637df2049129a12fd51dd313937e3 (patch)
treeaf321381af8b405ffc01c1ce5850dcc25e153891
parent61453cd289e5bcf6f0c87ede494fa54e4e282456 (diff)
Relevant BUGIDs: none
Purpose of commit: new feature Commit summary: --------------- Use modules.map as linker version map for all PAM modules Use /var/run for debug output instead of /tmp (Patches from ALT Linux/OWL)
-rw-r--r--config.h.in2
-rw-r--r--configure.in4
-rw-r--r--doc/modules/pam_userdb.sgml4
-rw-r--r--libpam/include/security/_pam_macros.h4
-rw-r--r--modules/modules.map11
-rw-r--r--modules/pam_access/Makefile.am5
-rw-r--r--modules/pam_cracklib/Makefile.am5
-rw-r--r--modules/pam_debug/Makefile.am5
-rw-r--r--modules/pam_deny/Makefile.am5
-rw-r--r--modules/pam_env/Makefile.am5
-rw-r--r--modules/pam_filter/Makefile.am5
-rw-r--r--modules/pam_ftp/Makefile.am5
-rw-r--r--modules/pam_group/Makefile.am5
-rw-r--r--modules/pam_issue/Makefile.am5
-rw-r--r--modules/pam_lastlog/Makefile.am5
-rw-r--r--modules/pam_limits/Makefile.am5
-rw-r--r--modules/pam_listfile/Makefile.am5
-rw-r--r--modules/pam_localuser/Makefile.am5
-rw-r--r--modules/pam_mail/Makefile.am5
-rw-r--r--modules/pam_mkhomedir/Makefile.am5
-rw-r--r--modules/pam_motd/Makefile.am5
-rw-r--r--modules/pam_nologin/Makefile.am5
-rw-r--r--modules/pam_permit/Makefile.am5
-rw-r--r--modules/pam_pwdb/Makefile.am5
-rw-r--r--modules/pam_radius/Makefile.am5
-rw-r--r--modules/pam_rhosts/Makefile.am5
-rw-r--r--modules/pam_rootok/Makefile.am5
-rw-r--r--modules/pam_securetty/Makefile.am5
-rw-r--r--modules/pam_selinux/Makefile.am9
-rw-r--r--modules/pam_shells/Makefile.am5
-rw-r--r--modules/pam_stress/Makefile.am6
-rw-r--r--modules/pam_succeed_if/Makefile.am5
-rw-r--r--modules/pam_tally/Makefile.am5
-rw-r--r--modules/pam_time/Makefile.am5
-rw-r--r--modules/pam_umask/Makefile.am5
-rw-r--r--modules/pam_unix/Makefile.am5
-rw-r--r--modules/pam_userdb/Makefile.am5
-rw-r--r--modules/pam_userdb/README2
-rw-r--r--modules/pam_warn/Makefile.am5
-rw-r--r--modules/pam_wheel/Makefile.am5
-rw-r--r--modules/pam_xauth/Makefile.am5
41 files changed, 162 insertions, 45 deletions
diff --git a/config.h.in b/config.h.in
index c7b6d13f..0e3c0e40 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,6 +1,6 @@
/* config.h.in. Generated from configure.in by autoheader. */
-/* lots of stuff gets written to /tmp/pam-debug.log */
+/* lots of stuff gets written to /var/run/pam-debug.log */
#undef DEBUG
/* Define to the type of elements in the array set by `getgroups'. Usually
diff --git a/configure.in b/configure.in
index a1645372..3f636c12 100644
--- a/configure.in
+++ b/configure.in
@@ -147,12 +147,12 @@ if test "$LIBPRELUDE_CONFIG" != "no" ; then
LIBPRELUDE_CFLAGS="$LIBPRELUDE_CFLAGS -DPRELUDE=1"
fi
-dnl lots of debugging information goes to /tmp/pam-debug.log
+dnl lots of debugging information goes to /var/run/pam-debug.log
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug],
[specify you are building with debugging on]),
WITH_DEBUG=yes ; AC_DEFINE([DEBUG],,
- [lots of stuff gets written to /tmp/pam-debug.log]),
+ [lots of stuff gets written to /var/run/pam-debug.log]),
WITH_DEBUG=no)
AC_SUBST(WITH_DEBUG)
diff --git a/doc/modules/pam_userdb.sgml b/doc/modules/pam_userdb.sgml
index 155a2668..facf223e 100644
--- a/doc/modules/pam_userdb.sgml
+++ b/doc/modules/pam_userdb.sgml
@@ -105,13 +105,13 @@ username/password pair in more than a database.
This is a normal ftp configuration file (usually placed as <tt>/etc/pam.d/ftp</tt>
on most systems) that will accept for login users whose username/password pairs are
-provided in the <tt>/tmp/dbtest.db</tt> file:
+provided in the <tt>/etc/dbtest.db</tt> file:
<tscreen>
<verb>
#%PAM-1.0
auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
-auth sufficient pam_userdb.so icase db=/tmp/dbtest
+auth sufficient pam_userdb.so icase db=/etc/dbtest
auth required pam_pwdb.so shadow nullok try_first_pass
auth required pam_shells.so
account required pam_pwdb.so
diff --git a/libpam/include/security/_pam_macros.h b/libpam/include/security/_pam_macros.h
index e328d989..f7da10a7 100644
--- a/libpam/include/security/_pam_macros.h
+++ b/libpam/include/security/_pam_macros.h
@@ -73,11 +73,11 @@ do { \
* You have been warned :-) - CG
*
* to get automated debugging to the log file, it must be created manually.
- * _PAM_LOGFILE must exist, mode 666
+ * _PAM_LOGFILE must exist and be writable to the programs you debug.
*/
#ifndef _PAM_LOGFILE
-#define _PAM_LOGFILE "/tmp/pam-debug.log"
+#define _PAM_LOGFILE "/var/run/pam-debug.log"
#endif
static void _pam_output_debug_info(const char *file, const char *fn
diff --git a/modules/modules.map b/modules/modules.map
new file mode 100644
index 00000000..2234aa40
--- /dev/null
+++ b/modules/modules.map
@@ -0,0 +1,11 @@
+{
+ global:
+ pam_sm_acct_mgmt;
+ pam_sm_authenticate;
+ pam_sm_chauthtok;
+ pam_sm_close_session;
+ pam_sm_open_session;
+ pam_sm_setcred;
+ local: *;
+};
+
diff --git a/modules/pam_access/Makefile.am b/modules/pam_access/Makefile.am
index 9d7327de..f4c86be1 100644
--- a/modules/pam_access/Makefile.am
+++ b/modules/pam_access/Makefile.am
@@ -12,9 +12,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/ \
-DPAM_ACCESS_CONFIG=\"$(SCONFIGDIR)/access.conf\"
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam @LIBNSL@
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_access.la
diff --git a/modules/pam_cracklib/Makefile.am b/modules/pam_cracklib/Makefile.am
index 1ba84053..e512927e 100644
--- a/modules/pam_cracklib/Makefile.am
+++ b/modules/pam_cracklib/Makefile.am
@@ -11,9 +11,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
if HAVE_LIBCRACK
securelib_LTLIBRARIES = pam_cracklib.la
diff --git a/modules/pam_debug/Makefile.am b/modules/pam_debug/Makefile.am
index 79d5f028..2fffe11e 100644
--- a/modules/pam_debug/Makefile.am
+++ b/modules/pam_debug/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_debug.la
diff --git a/modules/pam_deny/Makefile.am b/modules/pam_deny/Makefile.am
index fd1d8624..27af916c 100644
--- a/modules/pam_deny/Makefile.am
+++ b/modules/pam_deny/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_deny.la
diff --git a/modules/pam_env/Makefile.am b/modules/pam_env/Makefile.am
index 1e375885..264d2c96 100644
--- a/modules/pam_env/Makefile.am
+++ b/modules/pam_env/Makefile.am
@@ -12,9 +12,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/ \
-DDEFAULT_CONF_FILE=\"$(SCONFIGDIR)/pam_env.conf\"
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_env.la
diff --git a/modules/pam_filter/Makefile.am b/modules/pam_filter/Makefile.am
index 9d2585a5..f5af98c1 100644
--- a/modules/pam_filter/Makefile.am
+++ b/modules/pam_filter/Makefile.am
@@ -13,9 +13,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
include_HEADERS=pam_filter.h
diff --git a/modules/pam_ftp/Makefile.am b/modules/pam_ftp/Makefile.am
index 0e65b9fa..c31b98db 100644
--- a/modules/pam_ftp/Makefile.am
+++ b/modules/pam_ftp/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_ftp.la
diff --git a/modules/pam_group/Makefile.am b/modules/pam_group/Makefile.am
index 7846d6b1..85d0e5ad 100644
--- a/modules/pam_group/Makefile.am
+++ b/modules/pam_group/Makefile.am
@@ -12,9 +12,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/ \
-DPAM_GROUP_CONF=\"$(SCONFIGDIR)/group.conf\"
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_group.la
diff --git a/modules/pam_issue/Makefile.am b/modules/pam_issue/Makefile.am
index c987b4d7..08ad17d1 100644
--- a/modules/pam_issue/Makefile.am
+++ b/modules/pam_issue/Makefile.am
@@ -9,8 +9,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_issue.la
diff --git a/modules/pam_lastlog/Makefile.am b/modules/pam_lastlog/Makefile.am
index ddb8a21d..6c73191e 100644
--- a/modules/pam_lastlog/Makefile.am
+++ b/modules/pam_lastlog/Makefile.am
@@ -9,8 +9,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_lastlog.la
diff --git a/modules/pam_limits/Makefile.am b/modules/pam_limits/Makefile.am
index 20bc2dfa..facfa374 100644
--- a/modules/pam_limits/Makefile.am
+++ b/modules/pam_limits/Makefile.am
@@ -12,9 +12,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/ \
-DLIMITS_FILE=\"$(SCONFIGDIR)/limits.conf\"
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_limits.la
diff --git a/modules/pam_listfile/Makefile.am b/modules/pam_listfile/Makefile.am
index cdc30c75..fe383e78 100644
--- a/modules/pam_listfile/Makefile.am
+++ b/modules/pam_listfile/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_listfile.la
diff --git a/modules/pam_localuser/Makefile.am b/modules/pam_localuser/Makefile.am
index ef173508..595fb5ce 100644
--- a/modules/pam_localuser/Makefile.am
+++ b/modules/pam_localuser/Makefile.am
@@ -13,8 +13,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_localuser.la
diff --git a/modules/pam_mail/Makefile.am b/modules/pam_mail/Makefile.am
index 1a0f1bc0..a584644a 100644
--- a/modules/pam_mail/Makefile.am
+++ b/modules/pam_mail/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_mail.la
diff --git a/modules/pam_mkhomedir/Makefile.am b/modules/pam_mkhomedir/Makefile.am
index 11c238dd..4a35b183 100644
--- a/modules/pam_mkhomedir/Makefile.am
+++ b/modules/pam_mkhomedir/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_mkhomedir.la
diff --git a/modules/pam_motd/Makefile.am b/modules/pam_motd/Makefile.am
index 9e2faa41..859e4419 100644
--- a/modules/pam_motd/Makefile.am
+++ b/modules/pam_motd/Makefile.am
@@ -9,8 +9,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_motd.la
diff --git a/modules/pam_nologin/Makefile.am b/modules/pam_nologin/Makefile.am
index a2549346..4fe59239 100644
--- a/modules/pam_nologin/Makefile.am
+++ b/modules/pam_nologin/Makefile.am
@@ -13,8 +13,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_nologin.la
diff --git a/modules/pam_permit/Makefile.am b/modules/pam_permit/Makefile.am
index 9d6868c6..b1acac72 100644
--- a/modules/pam_permit/Makefile.am
+++ b/modules/pam_permit/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_permit.la
diff --git a/modules/pam_pwdb/Makefile.am b/modules/pam_pwdb/Makefile.am
index 330ce3d2..62f9d705 100644
--- a/modules/pam_pwdb/Makefile.am
+++ b/modules/pam_pwdb/Makefile.am
@@ -16,9 +16,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/ \
-DCHKPWD_HELPER=\"$(sbindir)/$(CHKPWD)\"
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam @LIBCRYPT@ @LIBPWDB@
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
if HAVE_LIBPWDB
securelib_LTLIBRARIES = pam_pwdb.la
diff --git a/modules/pam_radius/Makefile.am b/modules/pam_radius/Makefile.am
index c5886589..7020904d 100644
--- a/modules/pam_radius/Makefile.am
+++ b/modules/pam_radius/Makefile.am
@@ -13,9 +13,12 @@ noinst_HEADERS = pam_radius.h
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
if HAVE_LIBPWDB
securelib_LTLIBRARIES = pam_radius.la
diff --git a/modules/pam_rhosts/Makefile.am b/modules/pam_rhosts/Makefile.am
index 63f170b7..a27e3608 100644
--- a/modules/pam_rhosts/Makefile.am
+++ b/modules/pam_rhosts/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_rhosts_auth.la
diff --git a/modules/pam_rootok/Makefile.am b/modules/pam_rootok/Makefile.am
index 39cd4f4a..97432956 100644
--- a/modules/pam_rootok/Makefile.am
+++ b/modules/pam_rootok/Makefile.am
@@ -14,8 +14,11 @@ AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
if HAVE_LIBSELINUX
AM_CFLAGS += -DWITH_SELINUX
endif
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam @LIBSELINUX@
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_rootok.la
diff --git a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am
index cfa1611c..17dbf691 100644
--- a/modules/pam_securetty/Makefile.am
+++ b/modules/pam_securetty/Makefile.am
@@ -13,8 +13,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_securetty.la
diff --git a/modules/pam_selinux/Makefile.am b/modules/pam_selinux/Makefile.am
index a94f533e..dd62255e 100644
--- a/modules/pam_selinux/Makefile.am
+++ b/modules/pam_selinux/Makefile.am
@@ -14,11 +14,16 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/libpam_misc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam @LIBSELINUX@
-pam_selinux_check_LDFLAGS = -L$(top_builddir)/libpam_misc -lpam_misc
+pam_selinux_check_LDFLAGS = -L$(top_builddir)/libpam_misc -lpam_misc
+
+if HAVE_VERSIONING
+ pam_selinux_la_LDFLAGS = -avoid-version -module \
+ -Wl,--version-script=../modules.map
+endif
if HAVE_LIBSELINUX
securelib_LTLIBRARIES = pam_selinux.la
diff --git a/modules/pam_shells/Makefile.am b/modules/pam_shells/Makefile.am
index 2fdb8888..a639c21c 100644
--- a/modules/pam_shells/Makefile.am
+++ b/modules/pam_shells/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_shells.la
diff --git a/modules/pam_stress/Makefile.am b/modules/pam_stress/Makefile.am
index ebc76a12..5daf06ee 100644
--- a/modules/pam_stress/Makefile.am
+++ b/modules/pam_stress/Makefile.am
@@ -11,8 +11,10 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
-
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_stress.la
diff --git a/modules/pam_succeed_if/Makefile.am b/modules/pam_succeed_if/Makefile.am
index 1b07d473..483d3dbe 100644
--- a/modules/pam_succeed_if/Makefile.am
+++ b/modules/pam_succeed_if/Makefile.am
@@ -13,8 +13,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_succeed_if.la
diff --git a/modules/pam_tally/Makefile.am b/modules/pam_tally/Makefile.am
index 47f490b0..a95a5bb6 100644
--- a/modules/pam_tally/Makefile.am
+++ b/modules/pam_tally/Makefile.am
@@ -16,7 +16,10 @@ AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
AM_LDFLAGS = -L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
-pam_tally_la_LDFLAGS = -avoid-version -module
+pam_tally_la_LDFLAGS = -no-undefined -avoid-version -module
+if HAVE_VERSIONING
+ pam_tally_la_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_tally.la
sbin_PROGRAMS = pam_tally
diff --git a/modules/pam_time/Makefile.am b/modules/pam_time/Makefile.am
index 95245fde..40389b76 100644
--- a/modules/pam_time/Makefile.am
+++ b/modules/pam_time/Makefile.am
@@ -12,9 +12,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/ \
-DPAM_TIME_CONF=\"$(SCONFIGDIR)/time.conf\"
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_time.la
secureconf_DATA = time.conf
diff --git a/modules/pam_umask/Makefile.am b/modules/pam_umask/Makefile.am
index 8884b5e2..768c1123 100644
--- a/modules/pam_umask/Makefile.am
+++ b/modules/pam_umask/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_umask.la
diff --git a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am
index d7d61b5a..e8d646a1 100644
--- a/modules/pam_unix/Makefile.am
+++ b/modules/pam_unix/Makefile.am
@@ -24,9 +24,12 @@ if HAVE_LIBCRACK
AM_CFLAGS += -D"USE_CRACKLIB"
endif
-pam_unix_la_LDFLAGS = -avoid-version -module \
+pam_unix_la_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
@LIBCRACK@ @LIBNSL@
+if HAVE_VERSIONING
+ pam_unix_la_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_unix.la
diff --git a/modules/pam_userdb/Makefile.am b/modules/pam_userdb/Makefile.am
index 0c7da8bf..3c87f1aa 100644
--- a/modules/pam_userdb/Makefile.am
+++ b/modules/pam_userdb/Makefile.am
@@ -11,9 +11,12 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam @LIBDB@ @LIBCRYPT@
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
if HAVE_LIBDB
securelib_LTLIBRARIES = pam_userdb.la
diff --git a/modules/pam_userdb/README b/modules/pam_userdb/README
index fc56cfa0..8b4f6760 100644
--- a/modules/pam_userdb/README
+++ b/modules/pam_userdb/README
@@ -51,7 +51,7 @@ MODULE SERVICES PROVIDED:
auth _authentication and _setcred (blank)
EXAMPLE USE:
- auth sufficient pam_userdb.so icase db=/tmp/dbtest.db
+ auth sufficient pam_userdb.so icase db=/etc/dbtest.db
AUTHOR:
Cristian Gafton <gafton@redhat.com>
diff --git a/modules/pam_warn/Makefile.am b/modules/pam_warn/Makefile.am
index cedc3ef8..1b78f7a0 100644
--- a/modules/pam_warn/Makefile.am
+++ b/modules/pam_warn/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_warn.la
diff --git a/modules/pam_wheel/Makefile.am b/modules/pam_wheel/Makefile.am
index cd1374ca..42121d05 100644
--- a/modules/pam_wheel/Makefile.am
+++ b/modules/pam_wheel/Makefile.am
@@ -11,8 +11,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_wheel.la
diff --git a/modules/pam_xauth/Makefile.am b/modules/pam_xauth/Makefile.am
index e3bf78f9..31a9d3eb 100644
--- a/modules/pam_xauth/Makefile.am
+++ b/modules/pam_xauth/Makefile.am
@@ -13,8 +13,11 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-I$(top_srcdir)/modules/pammodutil/include/
-AM_LDFLAGS = -avoid-version -module \
+AM_LDFLAGS = -no-undefined -avoid-version -module \
-L$(top_builddir)/modules/pammodutil -lpammodutil \
-L$(top_builddir)/libpam -lpam
+if HAVE_VERSIONING
+ AM_LDFLAGS += -Wl,--version-script=../modules.map
+endif
securelib_LTLIBRARIES = pam_xauth.la