aboutsummaryrefslogtreecommitdiff
path: root/libpam/pam_modutil_searchkey.c
Commit message (Collapse)AuthorAgeFilesLines
* libpam: do not include config.h right before pam_private.hDmitry V. Levin2024-08-191-2/+0
| | | | | | As the first header included by pam_private.h is config.h, there is no need to include config.h explicitly right before pam_private.h
* libpam_internal: introduce pam_econf_readconfigStefan Schubert2024-07-021-4/+8
| | | | | | | Use this new function instead of econf_readDirs() and econf_readDirsWithCallback(). Co-authored-by: Dmitry V. Levin <ldv@strace.io>
* treewide: remove unused definesTobias Stoeckmann2024-01-131-2/+0
| | | | | | These are leftovers from fgets usages. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* treewide: assume getline existsDmitry V. Levin2023-12-121-22/+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.
* libpam: cast to unsigned char for character handling functionChristian Göttsche2023-08-071-2/+2
| | | | | | | | Character handling functions, like isspace(3), expect a value representable as unsigned char or equal to EOF. Otherwise the behavior is undefined. See https://wiki.sei.cmu.edu/confluence/display/c/STR37-C.+Arguments+to+character-handling+functions+must+be+representable+as+an+unsigned+char
* Fix miscellaneous const issuesTomas Mraz2020-01-201-1/+1
| | | | | | | | | | * libpam/pam_modutil_searchkey.c: Avoid assigning empty string literal to non-const char *. * modules/pam_filter/pam_filter.c: Avoid using const char **. * modules/pam_mkhomedir/pam_mkhomedir.c: Properly cast out const for execve(). * modules/pam_namespace/pam_namespace.c: Properly cast out const from pam data. * modules/pam_tally2/pam_tally2.c: String literal must be assigned to const char *.
* Add support for a vendor directory and libeconf (#136)Thorsten Kukuk2019-09-161-0/+37
| | | | | | | | | | With this, it is possible for Linux distributors to store their supplied default configuration files somewhere below /usr, while /etc only contains the changes made by the user. The new option --enable-vendordir defines where Linux-PAM should additional look for pam.d/*, login.defs and securetty if this files are not in /etc. libeconf is a key/value configuration file reading library, which handles the split of configuration files in different locations and merges them transparently for the application.
* Move the duplicated search_key function to pam_modutil.Tomas Mraz2018-12-111-0/+91
* libpam/pam_modutil_searchkey.c: New source file with pam_modutil_search_key(). * libpam/Makefile.am: Add the pam_modutil_searchkey.c. * libpam/include/security/pam_modutil.h: Add the pam_modutil_search_key() prototype. * libpam/libpam.map: Add the pam_modutil_search_key() into a new version. * modules/pam_faildelay/pam_faildelay.c: Drop search_key() and use pam_modutil_search_key(). * modules/pam_umask/pam_umask.c: Likewise. * modules/pam_unix/support.c: Likewise.