aboutsummaryrefslogtreecommitdiff
path: root/tests/tst-pam_start_confdir.c
Commit message (Collapse)AuthorAgeFilesLines
* build: consistently include config.h unconditionallyDmitry V. Levin2024-08-281-2/+0
| | | | | | | | Given that in most places config.h is included unconditionally, there is no point in keeping remaining HAVE_CONFIG_H checks. Public header files do not use config.h and therefore are not affected by this change anyway.
* tests: free handles via pam_end()Christian Göttsche2023-08-071-0/+6
| | | | | | Destroy the pam handles via pam_end() to release all associated resources. This allows to run the test-suite with sanitizers and validates the resource cleanup in pam_end() and callees.
* tests: fix -Wmaybe-uninitialized warningsDmitry V. Levin2021-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the following class of compilation warnings reported by gcc 11: tst-pam_end.c: In function ‘main’: tst-pam_end.c:55:12: error: ‘conv’ may be used uninitialized [-Werror=maybe-uninitialized] 55 | retval = pam_start (service, user, &conv, &pamh); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from tst-pam_end.c:41: ../libpam/include/security/pam_appl.h:23:1: note: by argument 3 of type ‘const struct pam_conv *’ to ‘pam_start’ declared here 23 | pam_start(const char *service_name, const char *user, | ^~~~~~~~~ tst-pam_end.c:49:19: note: ‘conv’ declared here 49 | struct pam_conv conv; | ^~~~ * tests/tst-pam_end.c (main): Initialize conv variable. * tests/tst-pam_fail_delay.c: Likewise. * tests/tst-pam_get_item.c: Likewise. * tests/tst-pam_getenvlist.c: Likewise. * tests/tst-pam_set_data.c: Likewise. * tests/tst-pam_set_item.c: Likewise. * tests/tst-pam_start.c: Likewise. * tests/tst-pam_start_confdir.c: Likewise.
* New API call pam_start_confdir()Tomas Mraz2020-03-061-0/+99
To load PAM stack configurations from specified directory