aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStefan Schubert <schubi@suse.de>2022-11-16 18:37:14 +0100
committerThorsten Kukuk <5908016+thkukuk@users.noreply.github.com>2022-12-12 10:15:12 +0100
commitd71de05146d03c271bd5507724d24d1ad17c2be5 (patch)
treee536e38bf8809dbe89c6d4a4532a1e0b41032cd1 /configure.ac
parente4917734c63ef6e887b3c4760771a14f75b9eb1f (diff)
downloadpam-d71de05146d03c271bd5507724d24d1ad17c2be5.tar.gz
pam-d71de05146d03c271bd5507724d24d1ad17c2be5.tar.bz2
pam-d71de05146d03c271bd5507724d24d1ad17c2be5.zip
pam_shells: Use the vendor directory as fallback for a distribution provided default config if there is no one in /etc.
If pam will be compiled with the option --enable-vendordir=<vendor_dir> and NOT defined --disable-econf, the files which define valid login shells will be parsed in following order: - <vendor_dir>/shells - <vendor_dir>/shells.d/* - /etc/shells.d/shells But all files in <vendor_dir> will be ingnored if the user has defined his own file /etc/shells. This commit solves issue: https://github.com/linux-pam/linux-pam/issues/498
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 2f74d1b4..0892049e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -520,8 +520,7 @@ AC_ARG_ENABLE([econf],
AS_HELP_STRING([--disable-econf], [do not use libeconf]),
[WITH_ECONF=$enableval], WITH_ECONF=yes)
if test "$WITH_ECONF" = "yes" ; then
- PKG_CHECK_MODULES([ECONF], [libeconf], [],
- [AC_CHECK_LIB([econf],[econf_readDirs],[ECONF_LIBS="-leconf"],[ECONF_LIBS=""])])
+ AC_CHECK_LIB([econf],[econf_readDirsWithCallback],[ECONF_LIBS="-leconf"],[ECONF_LIBS=""])
if test -n "$ECONF_LIBS" ; then
ECONF_CFLAGS="-DUSE_ECONF=1 $ECONF_CFLAGS"
fi
@@ -535,7 +534,11 @@ if test -n "$enable_vendordir"; then
[Directory for distribution provided configuration files])
AC_DEFINE_UNQUOTED([VENDOR_SCONFIGDIR], ["$enable_vendordir/security"],
[Directory for PAM modules distribution provided configuration files])
- STRINGPARAM_VENDORDIR="--stringparam vendordir '$enable_vendordir' --stringparam profile.condition 'with_vendordir'"
+ if test "$WITH_ECONF" = "yes" ; then
+ STRINGPARAM_VENDORDIR="--stringparam vendordir '$enable_vendordir' --stringparam profile.condition 'with_vendordir;with_vendordir_and_with_econf'"
+ else
+ STRINGPARAM_VENDORDIR="--stringparam vendordir '$enable_vendordir' --stringparam profile.condition 'with_vendordir;with_vendordir_and_without_econf"
+ fi
else
STRINGPARAM_VENDORDIR="--stringparam profile.condition 'without_vendordir'"
fi