aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* build: drop autotools supportDmitry V. Levin2024-10-231-818/+0
| | | | There is no point in supporting two different build systems.
* configure.ac: fix installation of pam_namespace service fileDmitry V. Levin2024-08-271-4/+5
| | | | | | | | Commit 95b464f8417d ("configure.ac: add --with-systemdunitdir option") aka v1.5.2~51 introduced a regression: if --with-systemdunitdir is not specified, then the pam_namespace service file is no longer installed. Fixes: 95b464f8417d ("configure.ac: add --with-systemdunitdir option")
* build: rename VENDOR_SCONFIGDIR config.h macro to VENDOR_SCONFIG_DIRDmitry V. Levin2024-08-261-1/+1
| | | | | ... for the same reason SCONFIGDIR config.h macro was renamed to SCONFIG_DIR.
* build: rename SCONFIGDIR config.h macro to SCONFIG_DIRDmitry V. Levin2024-08-251-1/+1
| | | | | | | This way it is visibly different from the configure variable SCONFIGDIR, which is helpful, because their values are slightly different: the macro is quoted while the configure variable is not quoted, and this difference may cause problems with other build systems.
* doc: remove unused custom-html.xslDmitry V. Levin2024-08-241-2/+0
| | | | | | | | | | * doc/custom-html.xsl.in: Remove. * configure.ac: Do not generate doc/custom-html.xsl file. * doc/.gitignore: Remove custom-html.xsl. * doc/Makefile.am (DISTCLEANFILES): Remove custom-html.xsl. (EXTRA_DIST): Remove custom-html.xsl.in. Complements: cf2fc5ff7b4a ("doc: Update PAM documentation from DockBook 4 to DocBook 5")
* build: parametrize libtool subdirectoryDmitry V. Levin2024-08-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Unhardcode ".libs" subdirectory where libtool stores shared objects, as other build systems doesn't necessarily use it. * configure.ac (AC_DEFINE_UNQUOTED): Add LTDIR. * modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c: Replace ".libs/" with LTDIR. * modules/pam_debug/tst-pam_debug-retval.c: Likewise. * modules/pam_deny/tst-pam_deny-retval.c: Likewise. * modules/pam_echo/tst-pam_echo-retval.c: Likewise. * modules/pam_env/tst-pam_env-retval.c: Likewise. * modules/pam_faildelay/tst-pam_faildelay-retval.c: Likewise. * modules/pam_faillock/tst-pam_faillock-retval.c: Likewise. * modules/pam_listfile/tst-pam_listfile-retval.c: Likewise. * modules/pam_localuser/tst-pam_localuser-retval.c: Likewise. * modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c: Likewise. * modules/pam_nologin/tst-pam_nologin-retval.c: Likewise. * modules/pam_permit/tst-pam_permit-retval.c: Likewise. * modules/pam_pwhistory/tst-pam_pwhistory-retval.c: Likewise. * modules/pam_rootok/tst-pam_rootok-retval.c: Likewise. * modules/pam_sepermit/tst-pam_sepermit-retval.c: Likewise. * modules/pam_succeed_if/tst-pam_succeed_if-retval.c: Likewise. * modules/pam_time/tst-pam_time-retval.c: Likewise. * modules/pam_warn/tst-pam_warn-retval.c: Likewise.
* Include pam_i18n.h where i18n definitions are requiredDmitry V. Levin2024-08-211-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Do not include <libintl.h> and other i18n stuff via config.h which is included into every compilation unit, include "pam_i18n.h" explicitly where necessary. * configure.ac (AH_BOTTOM): Remove. * libpam/pam_get_authtok.c: Include "pam_i18n.h". * libpam/pam_item.c: Likewise. * libpam/pam_strerror.c: Likewise. * libpam_misc/misc_conv.c: Likewise. * modules/pam_exec/pam_exec.c: Likewise. * modules/pam_faillock/main.c: Likewise. * modules/pam_faillock/pam_faillock.c: Likewise. * modules/pam_lastlog/pam_lastlog.c: Likewise. * modules/pam_limits/pam_limits.c: Likewise. * modules/pam_mail/pam_mail.c: Likewise. * modules/pam_mkhomedir/pam_mkhomedir.c: Likewise. * modules/pam_pwhistory/pam_pwhistory.c: Likewise. * modules/pam_selinux/pam_selinux.c: Likewise. * modules/pam_selinux/pam_selinux_check.c: Likewise. * modules/pam_timestamp/pam_timestamp.c: Likewise. * modules/pam_unix/pam_unix_acct.c: Likewise. * modules/pam_unix/pam_unix_passwd.c: Likewise. * modules/pam_userdb/pam_userdb.c: Likewise.
* Fix includedir in pkgconfig filesDmitry V. Levin2024-08-181-0/+4
| | | | | | | | The includedir variable in pkgconfig files used to erroneously contain "security" subsirectory, e.g. /usr/include/security, which led to Cflags tag containing wrong -I compiler option, e.g. -I/usr/include/security. Fixes: b4f0e2e1f7a1 ("Add pkgconfig files for provided libraries")
* configure.ac: do not use AC_TYPE_{UID,OFF,PID,SIZE}_TDmitry V. Levin2024-08-151-4/+0
| | | | | | | | These macros provide fallback definitions for uid_t, gid_t, off_t, pid_t, and size_t types which are defined in standard headers anyway. * configure.ac (AC_TYPE_UID_T, AC_TYPE_OFF_T, AC_TYPE_PID_T, AC_TYPE_SIZE_T): Remove.
* configure.ac: do not use AM_PROG_CC_C_ODmitry V. Levin2024-08-141-1/+0
| | | | | | | According to the GNU Automake manual, this macro is obsolescent, and its explicit use should no longer be required. * configure.ac (AM_PROG_CC_C_O): Remove.
* configure.ac: do not use AC_PROG_LN_SDmitry V. Levin2024-08-141-1/+0
| | | | | | | Given that LN_S defined by AC_PROG_LN_S is not used, there is no point in using this macro. * configure.ac (AC_PROG_LN_S): Remove.
* configure.ac: do not use AC_PROG_MAKE_SETDmitry V. Levin2024-08-141-1/+0
| | | | | | | | Given that SET_MAKE defined by AC_PROG_MAKE_SET has never been used directly, and AM_INIT_AUTOMAKE that needs this also calls AC_PROG_MAKE_SET itself, there is no point in using this macro. * configure.ac (AC_PROG_MAKE_SET): Remove.
* configure.ac: do not use AC_PROG_GCC_TRADITIONALDmitry V. Levin2024-08-141-1/+0
| | | | | | | | According to the GNU Autoconf manual, this macro is obsolescent, since current versions of the GNU C compiler fix the header files automatically when installed. * configure.ac (AC_PROG_GCC_TRADITIONAL): Remove.
* configure.ac: do not use AC_FUNC_MEMCMPDmitry V. Levin2024-08-141-1/+0
| | | | | | | According to the GNU Autoconf manual, this macro is obsolescent, as current systems have a working 'memcmp'. * configure.ac (AC_FUNC_MEMCMP): Remove.
* configure.ac: do not use AC_C_CONSTDmitry V. Levin2024-08-141-1/+0
| | | | | | | According to the GNU Autoconf manual, this macro is obsolescent, as current C compilers support 'const'. * configure.ac (AC_C_CONST): Remove.
* configure.ac: do not use AC_TYPE_GETGROUPSDmitry V. Levin2024-08-141-1/+0
| | | | | | | Given that GETGROUPS_T defined by AC_TYPE_GETGROUPS has never been checked, there is no point in using this macro. * configure.ac (AC_TYPE_GETGROUPS): Remove.
* configure.ac: do not use AC_STRUCT_TMDmitry V. Levin2024-08-141-1/+0
| | | | | | | | Given that TM_IN_SYS_TIME that might be defined by AC_STRUCT_TM has never been checked, there is no point in using this obsolescent macro. * configure.ac (AC_STRUCT_TM): Remove.
* configure.ac: do not use AC_HEADER_SYS_WAITDmitry V. Levin2024-08-141-3/+0
| | | | | | | Given that <sys/wait.h> is included unconditionally, there is no point in using AC_HEADER_SYS_WAIT. * configure.ac (AC_HEADER_SYS_WAIT): Remove.
* configure.ac: do not use AC_HEADER_DIRENTDmitry V. Levin2024-08-141-1/+0
| | | | | | | Given that <dirent.h> is included unconditionally, there is no point in using AC_HEADER_DIRENT. * configure.ac (AC_HEADER_DIRENT): Remove.
* configure.ac: do not check for lastlog.h, utmp.h, and utmpx.hDmitry V. Levin2024-08-131-3/+0
| | | | | | | | | Given that utmp.h is included unconditionally in other modules, and neither utmpx.h nor lastlog.h is used nowadays, remove obsolete checks. * configure.ac (AC_CHECK_HEADERS): Remove lastlog.h, utmp.h, and utmpx.h. * modules/pam_lastlog/pam_lastlog.c: Include <utmp.h> unconditionally.
* configure.ac: fix typo in the help message for --enable-lastlogFiras Khalil Khana2024-08-071-1/+1
|
* pam_econf_readconfig: add econf_readConfigWithCallback supportStefan Schubert2024-07-021-0/+25
| | | | | | Check for econf_readConfigWithCallback() and use it if available. Co-authored-by: Dmitry V. Levin <ldv@strace.io>
* Prepare for 1.6.1 releaseDmitry V. Levin2024-04-091-1/+1
| | | | | | | | * configure.ac (AC_INIT): Raise version to 1.6.1. * po/Linux-PAM.pot (Project-Id-Version): Likewise. * NEWS: Update. Resolves: https://github.com/linux-pam/linux-pam/issues/774
* configure.ac: do not check for headers that are included unconditionallyDmitry V. Levin2024-04-071-4/+1
| | | | | | | * configure.ac (AC_HEADER_STDC, AC_HEADER_TIME): Remove. (AC_CHECK_HEADERS): Remove fcntl.h, limits.h, malloc.h, sys/file.h, sys/ioctl.h, sys/time.h, syslog.h, net/if.h, termio.h, unistd.h, sys/fsuid.h, and inittypes.h.
* build: fail if requested nis headers are missingTobias Stoeckmann2024-03-031-3/+6
| | | | | | | Failing if a feature is directly requested is default by now. Do the same for --enable-nis=yes. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* libpam_internal: supply debug functionalityTobias Stoeckmann2024-01-241-2/+3
| | | | | | | | | | Move function bodies from headers into dedicated object files stored in libpam_internal. This library won't be installed. Keep the debug function body in header, even though disabled when building Linux-PAM, to stay API compatible with previous versions. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* configure: fail if specified option cannot be satisfiedChristian Göttsche2024-01-221-7/+15
| | | | | | | | | | | | The options whether to build with support for libprelude, libaudit, libselinux, or libeconf are set to enable-if-available. These options also have a configure flag `--enable-foo`, which currently fall back to the feature being disabled if not available. Change these feature flags to fail if specified explicitly and the required dependencies cannot be satisfied. Prompted by #728 and #746
* build: correctly set WITH_SELINUX conditionalTobias Stoeckmann2024-01-191-1/+1
| | | | | | | | | | | React on actual test if SELinux is available, not just if SELinux should be tested for. Currently the supposedly disabled binaries are still installed even if SELinux is not available. Fixes: cb9f88ba944d ("pam_unix: build unix_update only with SELinux enabled") Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* Prepare for 1.6.0 releaseDmitry V. Levin2024-01-171-1/+1
| | | | | | | | * configure.ac (AC_INIT): Raise version to 1.6.0. * po/Linux-PAM.pot (Project-Id-Version): Likewise. * NEWS: Update. Resolves: https://github.com/linux-pam/linux-pam/issues/690
* configure: require libsystemd on --enable-logindChristian Göttsche2024-01-161-2/+4
| | | | | | | Fail if --enable-logind is specified while libsystemd cannot be found, so the feature is reliably enabled on request. Complements: v1.5.3~26 ("Y2038: use logind instead of utmp")
* treewide: strictly separate builddir and srcdirTobias Stoeckmann2024-01-121-2/+3
| | | | | | | | | | Building outside of source directory fails if --disable-doc is not explicitly chosen. This happens because generated files are sometimes expected in the source directory, where they won't exist. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* pam_unix: build unix_update only with SELinux enabledChristian Göttsche2024-01-081-0/+1
| | | | | The helper unix_update(8) is only called from code enabled when SELinux support is enabled.
* libpam: use getrandom if possibleTobias Stoeckmann2024-01-051-1/+1
| | | | | | | | Use getrandom to retrieve random numbers for delay calculation. If it fails or is not available, keep using current algorithm. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* configure.ac: remove unneeded function checksTobias Stoeckmann2024-01-031-6/+4
| | | | | | | Even if these checks reveal that a function does not exist, there are no corresponding HAVE_* or ac_cv_func_* checks in source files. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* pam_timestamp: prefer getrandom(2) when availableBenny Baumann2023-12-191-0/+5
| | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Add sys/random.h. (AC_CHECK_FUNCS): Add getrandom. * modules/pam_timestamp/hmac_openssl_wrapper.c [HAVE_SYS_RANDOM_H]: Include <sys/random.h>. (generate_key) [HAVE_GETRANDOM]: Call getrandom(2) before trying to open /dev/urandom.
* treewide: assume getline existsDmitry V. Levin2023-12-121-1/+1
| | | | | | | | | | | | | | | | Apparently, getline is being used unconditionally in pam_namespace and pam_sepermit. In pam_namespace, it is being used since 2006 when the module was introduced in the first place. Let's assume getline is universally available and let's use it unconditionally in other cases, too. * configure.ac (AC_CHECK_FUNCS): Remove getline and getdelim. * libpam/pam_modutil_searchkey.c (pam_modutil_search_key): Use getline unconditionally. * modules/pam_pwhistory/opasswd.c (check_old_pass, save_old_pass): Likewise. * modules/pam_shells/pam_shells.c (perform_check): Likewise.
* pam_canonicalize_user: new module to canonicalize user nameDmitry V. Levin2023-11-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | This module uses the name of the user obtained via pam_get_user(3) as a key to query the password database, and replaces PAM_USER with the pw_name value that has been returned. The main usage scenario is systems where a user name is used in several distinct authentication systems, some of them being case sensitive while others are not. * configure.ac (AC_CONFIG_FILES): Add modules/pam_canonicalize_user/Makefile. * doc/sag/pam_canonicalize_user.xml: New file. * doc/sag/Linux-PAM_SAG.xml: Add a reference to pam_canonicalize_user.xml. * modules/Makefile.am (SUBDIRS): Add pam_canonicalize_user. * modules/pam_canonicalize_user/Makefile.am: New file. * modules/pam_canonicalize_user/README.xml: New file. * modules/pam_canonicalize_user/pam_canonicalize_user.8.xml: New file. * modules/pam_canonicalize_user/pam_canonicalize_user.c: New file. * modules/pam_canonicalize_user/tst-pam_canonicalize_user: New file.
* libpam: use close_range() to close file descriptorsIker Pedrosa2023-10-251-0/+1
| | | | | | | | | | | | * configure.ac: check whether close_range() is available in the system. * libpam/pam_modutil_sanitize.c: use close_range() to close all file descriptors. If the interface isn't available use the previous approach. Link: https://github.com/linux-pam/linux-pam/pull/276 Resolves: https://issues.redhat.com/browse/RHEL-5099 Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
* pam_start.c: call bindtextdomain() to expose Linux-PAM localesSergei Trofimovich2023-08-251-0/+1
| | | | | | Without the change locales are not visible to applications using PAM if PAM library is installed into a --prefix= different from the default one.
* pam_userdb: enable GDBM supportIker Pedrosa2023-07-171-2/+8
| | | | | | | | * configure.ac: add `gdbm` option to `enable-db` * modules/pam_userdb/pam_userdb.c: conditionally provide database access depending on the database technology Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
* configure.ac: add --enable-examples optionPino Toscano2023-05-111-0/+5
| | | | | | | | Allow the user to not build the examples through --disable-examples (enabled by default); this can be useful: - when cross-compiling, as the examples are not useful - in distribution builds, not building stuff that is not used in any way
* Prepare for 1.5.3 releaseDmitry V. Levin2023-04-291-1/+1
| | | | | * configure.ac (AC_INIT): Raise version to 1.5.3. * NEWS: Update.
* build: fix --enable-opensslStefan Schubert2023-04-201-6/+10
| | | | | | | * Make.xml.rules.in: Avoid conflicting profile.condition settings. * configure.ac: Likewise. Resolves: https://github.com/linux-pam/linux-pam/issues/553
* configure: Disable NIS if header files are missingThorsten Kukuk2023-04-061-2/+8
| | | | | | configure.ac: Disable NIS if RPC or YP header files are missing modules/pam_unix/support.c: Use HAVE_NIS to check for header file presence modules/pam_unix/pam_unix_passwd.c: Use HAVE_NIS, too
* libpam: introduce secure memory erasure helpersChristian Göttsche2023-02-281-0/+1
| | | | | | | | | | Avoid compiler optimizations to elide the memory erasure by using a secure method: either memset_explicit() [C23], bzero_explicit() [glibc 2.25] or a manual memory barrier. Since the current helpers _pam_overwrite*() and _pam_drop_reply() are publicly exported, create new ones in "pam_inline.h" and deprecate the old ones.
* Y2038: use logind instead of utmpThorsten Kukuk2023-02-281-0/+11
| | | | | | | | | | | | | The struct utmp from glibc uses on many 64bit architectures a 32bit time_t for compatibility with a 32bit userland, which means utmp will not survive the year 2038 (32bit time_t overflow). Use the data from logind instead of utmp. * configure.ac: Add option --enable-logind * modules/pam_issue/Makefile.am: Add CFLAGS/LIBS for logind support * modules/pam_issue/pam_issue.c: Use sd_get_sessions instead of utmp * modules/pam_timestamp/Makefile.am: Add CFLAGS/LIBS for logind support * modules/pam_timestamp/pam_timestamp.c: query logind for login time
* pam_lastlog: deprecate it and disable by defaultThorsten Kukuk2023-02-151-4/+15
| | | | | | | | | | | | pam_lastlog uses utmp, wtmp, btmp and lastlog. None of them is Y2038 safe, even on 64bit architectures. Most 64bit architectures use 32bit time_t for compat reasons with 32bit userland. Additionally, all relevant tools for which pam_lastlog would make sense already have their own support for all four files, so this module will most likely only create duplicate entries. * configure.ac: don't build pam_lastlog by default. * ci/run-build-and-tests.sh: enable pam_lastlog.
* build: use <vendordir>/security directory for installation if it has been setStefan Schubert2023-02-071-0/+3
| | | | | | | | | Otherwise the corresponding files are still installed in /etc/security. * configure.ac (AC_SUBST): Add VENDOR_SCONFIGDIR. (AM_CONDITIONAL): Add HAVE_VENDORDIR. * modules/*/Makefile.am (secureconfdir): Set to VENDOR_SCONFIGDIR if HAVE_VENDORDIR has been set, otherwise to SCONFIGDIR.
* pam_unix: don't link against yppasswd_xdr if NIS is disabledThorsten Kukuk2023-01-311-0/+1
| | | | | | | | | * configure.ac: Define HAVE_NIS if NIS is enabled. * modules/pam_unix/Makefile.am: Don't link against yppasswd_xdr.c if NIS is disabled. * modules/pam_unix/pam_unix_passwd.c: Don't redefine HAVE_NIS. Resolves: https://github.com/linux-pam/linux-pam/issues/523
* doc: Update PAM documentation from DockBook 4 to DocBook 5Stefan Schubert2022-12-161-12/+21
| | | | | | | | | | | | | | | | | | | | Changed files -------------- Make.xml.rules.in: - Using RNG file instead of DTD file for checking XML files. - Taking the correct stylesheet for README files. doc/sag/Makefile.am, doc/adg/Makefile.am, doc/mwg/Makefile.am: - Using RNG file instead of DTD file for checking XML files. configure.ac: - Adding a new option for selecting RNG check file (-enable-docbook-rng) - Switching stylesheets to docbook 5 - Checking DocBook 5 environment instead of DocBook 4 environment *.xml: Update from DockBook 4 to DocBook 5