The --with-modules-dir configure option never quite worked, and became

even more badly broken when the dynamic loader was rewritten in March.
Reimplement it the way it was always meant to work (but never did):

If --with-modules-dir was specified, modules will be installed in that
directory and the dynamic loader will look for them there.  If it was
not specified, modules will be installed in libdir and the dynamic
loader will use the standard search path (/usr/lib:/usr/local/lib).  In
both cases, a policy file can still name a module by its full path.


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@690 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2013-08-15 13:22:51 +00:00
parent c9387115d9
commit 5847a34802
7 changed files with 38 additions and 15 deletions

View File

@ -24,6 +24,9 @@ OpenPAM ?????????? 2013-??-??
subsequent text as well. This went unnoticed because none of the
unit tests for quoted strings had any text preceding the opening
quote.
- BUGFIX: make --with-modules-dir work the way it was meant to work
(but never did).
============================================================================
OpenPAM Micrampelis 2012-05-26

View File

@ -48,14 +48,12 @@ AC_ARG_WITH([modules-dir],
[OpenPAM modules directory]),
[AS_IF([test x"$withval" != x"no"], [
OPENPAM_MODULES_DIR="$withval"
], [
OPENPAM_MODULES_DIR="$libdir"
])],
[OPENPAM_MODULES_DIR="$libdir"])
AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
"${OPENPAM_MODULES_DIR%/}/",
[OpenPAM modules directory])
AC_DEFINE_UNQUOTED(OPENPAM_MODULES_DIR,
"${OPENPAM_MODULES_DIR%/}",
[OpenPAM modules directory])
])])
AC_SUBST(OPENPAM_MODULES_DIR)
AM_CONDITIONAL([CUSTOM_MODULES_DIR], [test x"$OPENPAM_MODULES_DIR" != x""])
AC_ARG_WITH([doc],
AC_HELP_STRING([--without-doc], [do not build documentation]),

View File

@ -135,7 +135,11 @@ const char *openpam_policy_path[] = {
};
const char *openpam_module_path[] = {
#ifdef OPENPAM_MODULES_DIRECTORY
OPENPAM_MODULES_DIRECTORY,
#else
"/usr/lib",
"/usr/local/lib",
#endif
NULL
};

View File

@ -1,9 +1,13 @@
# $Id$
pkglibdir = @OPENPAM_MODULES_DIR@
if CUSTOM_MODULES_DIR
moduledir = @OPENPAM_MODULES_DIR@
else
moduledir = $(libdir)
endif
AM_CPPFLAGS = -I$(top_srcdir)/include
pkglib_LTLIBRARIES = pam_deny.la
module_LTLIBRARIES = pam_deny.la
pam_deny_la_SOURCES = pam_deny.c
pam_deny_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ \

View File

@ -1,9 +1,15 @@
# $Id$
pkglibdir = @OPENPAM_MODULES_DIR@
if CUSTOM_MODULES_DIR
moduledir = @OPENPAM_MODULES_DIR@
else
moduledir = $(libdir)
endif
AM_CPPFLAGS = -I$(top_srcdir)/include
pkglib_LTLIBRARIES = pam_oath.la
module_LTLIBRARIES = pam_oath.la
pam_oath_la_SOURCES = pam_oath.c
pam_oath_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ \
-export-symbols-regex '^pam_sm_'
pam_oath_la_LIBADD = \

View File

@ -1,9 +1,13 @@
# $Id$
pkglibdir = @OPENPAM_MODULES_DIR@
if CUSTOM_MODULES_DIR
moduledir = @OPENPAM_MODULES_DIR@
else
moduledir = $(libdir)
endif
AM_CPPFLAGS = -I$(top_srcdir)/include
pkglib_LTLIBRARIES = pam_permit.la
module_LTLIBRARIES = pam_permit.la
pam_permit_la_SOURCES = pam_permit.c
pam_permit_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ \

View File

@ -1,9 +1,13 @@
# $Id$
pkglibdir = @OPENPAM_MODULES_DIR@
if CUSTOM_MODULES_DIR
moduledir = @OPENPAM_MODULES_DIR@
else
moduledir = $(libdir)
endif
AM_CPPFLAGS = -I$(top_srcdir)/include
pkglib_LTLIBRARIES = pam_unix.la
module_LTLIBRARIES = pam_unix.la
pam_unix_la_SOURCES = pam_unix.c
pam_unix_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ \