summaryrefslogtreecommitdiff
path: root/tests/tst-pam_get_item.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Use PAM_ARRAY_SIZEDmitry V. Levin2020-03-191-5/+5
| | | | | | | | | | | | | | | | | | | | | Replace all instances of sizeof(x) / sizeof(*x) with PAM_ARRAY_SIZE(x) which is less error-prone and implements an additional type check. * libpam/pam_handlers.c: Include "pam_inline.h". (_pam_open_config_file): Use PAM_ARRAY_SIZE. * modules/pam_exec/pam_exec.c: Include "pam_inline.h". (call_exec): Use PAM_ARRAY_SIZE. * modules/pam_namespace/pam_namespace.c: Include "pam_inline.h". (filter_mntopts): Use PAM_ARRAY_SIZE. * modules/pam_timestamp/hmacfile.c: Include "pam_inline.h". (testvectors): Use PAM_ARRAY_SIZE. * modules/pam_xauth/pam_xauth.c: Include "pam_inline.h". (run_coprocess, pam_sm_open_session): Use PAM_ARRAY_SIZE. * tests/tst-pam_get_item.c: Include "pam_inline.h". (main): Use PAM_ARRAY_SIZE. * tests/tst-pam_set_item.c: Likewise. * xtests/tst-pam_pwhistory1.c: Likewise. * xtests/tst-pam_time1.c: Likewise.
* Relevant BUGIDs:Thorsten Kukuk2008-12-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Purpose of commit: new feature Commit summary: --------------- 2008-12-10 Thorsten Kukuk <kukuk@thkukuk.de> * doc/man/pam_item_types_ext.inc.xml: Document PAM_AUTHTOK_TYPE. * libpam/pam_end.c (pam_end): Free authtok_type. * tests/tst-pam_get_item.c: Add PAM_AUTHTOK_TYPE as test case. * tests/tst-pam_set_item.c: Likewise. * libpam/pam_start.c (pam_start): Initialize xdisplay, xauth and authtok_type. * libpam/pam_get_authtok.c (pam_get_authtok): Rename "type" to "authtok_type". * modules/pam_cracklib/pam_cracklib.8.xml: Replace "type=" with "authtok_type=". * doc/man/pam_get_authtok.3.xml: Document authtok_type argument. * modules/pam_cracklib/pam_cracklib.c (pam_sm_chauthtok): Set type= argument as PAM_AUTHTOK_TYPE item. * libpam/pam_get_authtok.c (pam_get_authtok): If no type argument given, use PAM_AUTHTOK_TYPE item. * libpam/pam_item.c (pam_get_item): Fetch PAM_AUTHTOK_TYPE item. (pam_set_item): Store PAM_AUTHTOK_TYPE item. * libpam/pam_private.h: Add authtok_type to pam_handle. * libpam/include/security/_pam_types.h (PAM_AUTHTOK_TYPE): New.
* Relevant BUGIDs:Thorsten Kukuk2006-08-301-0/+4
| | | | | | | | | | | | | | Purpose of commit: cleanup/bugfix Commit summary: --------------- 2006-08-30 Thorsten Kukuk <kukuk@thkukuk.de> * xtests/Makefile.am: Move shell code to execute tests from here ... * xtests/run-xtests.sh: ... to here. * xtests/*.c: Include config.h. * tests/*.c: Likewise.
* Relevant BUGIDs:Thorsten Kukuk2006-03-121-0/+129
Purpose of commit: new feature Commit summary: --------------- Add lot of tests for make check