aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_env/tst-pam_env-retval.c
Commit message (Collapse)AuthorAgeFilesLines
* HALF WORK: MAX_PATHdevYuqian Yang2025-03-011-2/+5
|
* build: rename VENDOR_SCONFIGDIR config.h macro to VENDOR_SCONFIG_DIRDmitry V. Levin2024-08-261-2/+2
| | | | | ... for the same reason SCONFIGDIR config.h macro was renamed to SCONFIG_DIR.
* build: parametrize libtool subdirectoryDmitry V. Levin2024-08-221-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* pam_env: allow escaping of escape characterTobias Stoeckmann2024-01-121-2/+2
| | | | | | Otherwise it is not possible to add \ into an environment variable. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* pam_env: extend test for escaped newlinesTobias Stoeckmann2024-01-051-1/+3
| | | | | | | | This covers the _assemble_line functionality, which slightly differs from _pam_assemble_line in libpam, i.e. does not replace the backslash with a blank. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* pam_env: allow very long variable expansionsTobias Stoeckmann2024-01-051-3/+4
| | | | | | | | Variable expansion can exceed the maximum line length allowed in an environment configuration file. Since PAM environment variables already support arbitrary lengths, allow them in pam_env as well. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* pam_env: fix memory leakTobias Stoeckmann2024-01-011-1/+1
| | | | | | | | | If DEFAULT or OVERRIDE is supplied multiple times in a line then memory leaks can occur. Adjusted test case (compile with address sanitizer to see failure). Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* pam_env: do not assume in tests that VENDORDIR is /usr/etcDmitry V. Levin2023-02-041-13/+35
| | | | | | | * modules/pam_env/tst-pam_env-retval.c: Include <errno.h> and <libgen.h>. [VENDORDIR] (dir, dir_usr, dir_usr_etc): Remove. [VENDORDIR] (mkdir_p, rmdir_p): New functions. (setup, cleanup) [VENDORDIR]: Use them.
* pam_env: do not hardcode /usr/etc into testsDmitry V. Levin2023-02-031-12/+18
| | | | | | | | * modules/pam_env/tst-pam_env-retval.c: Replace /usr/etc/security with VENDOR_SCONFIGDIR, /usr/etc with VENDORDIR. Do not define and use VENDORDIR based variables unless VENDORDIR is defined. Fixes: 6135c45347b6 ("pam_env: Use vendor specific pam_env.conf and environment as fallback")
* pam_env: Use vendor specific pam_env.conf and environment as fallbackStefan Schubert2022-12-141-0/+60
| | | | | | | | | | | | Use the vendor directory as fallback for a distribution provided default config if there is no one in /etc. * Makefile.am: Add libeconf setting. * pam_env.c: Take care about the fallback configuration in the vendor directory. * pam_env.8.xml: Add description for the vendor directory. * pam_env.conf.5.xml: Add description for the vendor directory. * tst-pam_env-retval.c: Add tests for libeconf. * configure.ac: Add ECONF settings for building man pages.
* pam_env: add a test of return valuesStefan Schubert2022-03-111-0/+199
* modules/pam_env/tst-pam_env-retval.c: New file. * modules/pam_env/Makefile.am (TESTS): Add $(check_PROGRAMS). (check_PROGRAMS, tst_pam_env_retval_LDADD): New variables. Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>