aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-11-04WIPmaster-fixAndreas Schneider1-1/+4
2020-10-23cmake: Remove configure check for pam_modutil_search_keyAndreas Schneider2-4/+0
This was just temporary for openSUSE Tumbleweed. Signed-off-by: Andreas Schneider <asn@samba.org>
2020-10-23Revert "pwrap: Add back pso_copy for openSUSE Tumbleweed"Andreas Schneider1-125/+0
Tumbleweed has pam 1.4.0 now! This reverts commit 97fdcec92ee34cf061222e3d12c2624ec7ab4ff7.
2020-03-26Bump version to 1.1.3Andreas Schneider2-1/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-03-25cmake: Fix paths in pkgconfig and cmake config filesAndreas Schneider3-5/+5
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-03-24Bump version to 1.1.2Andreas Schneider2-1/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-03-24doc: Fix manpage installationAndreas Schneider1-5/+5
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-03-24Bump version to 1.1.1Andreas Schneider2-2/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24gitlab-ci: Work around a Python 3.8 bugAndreas Schneider1-2/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24gitlab-ci: Add ubuntu targetAndreas Schneider1-0/+19
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24pwrap: Add back pso_copy for openSUSE TumbleweedAndreas Schneider1-0/+125
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24cmake: Check for pam_modutil_search_keyAndreas Schneider2-0/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24pwrap: Use PSO_COPY_READ_SIZE in pso_copy()Andreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24Revert "pwrap: Fix pso_copy to work with libpam.so.0.84.2"Andreas Schneider1-27/+4
This reverts commit 047e9fb616d21e202add9f16347cea2084444104. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24pwrap: Create two pwrap_init() functionsAndreas Schneider1-13/+132
One for pam_start() and one for pam_start_confdir() support. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24pwrap: Log the return code of pam_start()Andreas Schneider1-13/+18
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24pwrap: Improve debug message in p_rmdirs_at()Andreas Schneider1-1/+11
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24pwrap: Initialize pointers with NULL in p_rmdirs_at()Andreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24tests: Define PAM_AUTH_ERROR in init functionAndreas Schneider1-6/+8
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-24tests: Workaround an off-by-one error in FreeBSDAndreas Schneider1-0/+20
https://www.openpam.org/wiki/Errata/2019-02-22 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-20Bump version to 1.1.0Andreas Schneider2-10/+22
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-20Rename ChangeLog fileAndreas Schneider1-0/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-20gitingore: Ignore compile databaseAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-20tests: Fix pypamtest_test.py on BSDAndreas Schneider1-1/+7
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-20pwrap: Set up a pthread_atfork() handler to not delete or config directoryAndreas Schneider1-0/+37
Python3 has some strange behavior. It forks a child which then exits. This child calls the destructor which deletes our /tmp/pam.X directory. As we later try to bind the symbol the directory is gone and we detected and error which results in exit(-1). Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-20pwrap: Move the constructor to the end of the source fileAndreas Schneider1-13/+13
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-20pwrap: Set initialised to false in the destructorAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19doc: Add generated pam_chatty.8 man pageBastien Nocera2-0/+98
And install it. Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19doc: Add pam_chatty man page sourceBastien Nocera1-0/+46
Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19modules: Remove duplicated discard_const* macrosBastien Nocera1-8/+0
They were already defined a couple of lines above. Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19tests: Add test for verbose PAM modulesBastien Nocera1-0/+5
Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19tests: Add service file for chatty moduleBastien Nocera2-0/+4
So we can test it. Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19modules: Add pam_chatty moduleBastien Nocera2-1/+164
Add a simple PAM module that will output "num_lines" lines of PAM info and/or error output. Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19python: Fix crash when the PAM module outputs too much dataBastien Nocera1-2/+2
This code expected each input (whether echo on or echo off input), to generate at most one info or error output, which is obviously not correct. A PAM module with external inputs can throw dozens of messages and warnings even if the only expected input is a password. Allocate those placeholder arrays to be as big as possible to accomodate chatty PAM modules. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14245 Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19python: Add failure testBastien Nocera1-0/+5
We only had successful pam tests, add a failing one, and check that it fails. Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19python: Fix typosBastien Nocera2-3/+3
Signed-off-by: Bastien Nocera <hadess@hadess.net> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19pwrap: Add support for pam_start_confdir()Andreas Schneider1-1/+47
This allows us to not do some ugly binary editing hacks to libpam.so. https://github.com/linux-pam/linux-pam/commit/7a84910896d5579bd9c016696224d7d69a307bd9 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19cmake: Add a check for pam_start_confdir()Andreas Schneider2-0/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-03-19cmake: Add link to compile databaseAndreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31gitlab-ci: Setup CI for pam_wrapperAndreas Schneider1-0/+210
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Do not run python tests with AddressSanitizerAndreas Schneider1-13/+24
It will complain about python malloc and fail. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Write new cmake config filesAndreas Schneider5-28/+18
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Use GNUInstallDirsAndreas Schneider8-143/+23
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Use target_include_directories()Andreas Schneider4-19/+21
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Support running the tests with AddressSanitizerAndreas Schneider1-19/+43
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Add AddressSanitizer and UndefinedSanitizerAndreas Schneider1-0/+24
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Update add_cmocka_test()Andreas Schneider2-8/+138
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Look for cmocka 1.1.0 at leastAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Move compiler flags to new fileAndreas Schneider3-13/+22
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-01-31cmake: Improve checks for compiler flagsAndreas Schneider9-86/+175
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>