pam_wrapper.git
6 years agoBump version to 1.0.5 pam_wrapper-1.0.5
Andreas Schneider [Thu, 22 Feb 2018 14:46:12 +0000 (15:46 +0100)]
Bump version to 1.0.5

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agopwrap: Use a more unique name for pamdir
Nikos Mavrogiannopoulos [Mon, 19 Feb 2018 20:23:23 +0000 (21:23 +0100)]
pwrap: Use a more unique name for pamdir

Parallel builds fail quite predictable when using libpam_wrapper.
It seems that the temporary directory used are created sequentially
and that caused issues like:

PWRAP_ERROR(8157) - pwrap_load_lib_handle: Failed to dlopen library: /tmp/pam.0/lib/libpam.so.0: cannot open shared object file: No such file or directory

When a directory was cleaned up, incorrectly. I have not pin-pointed
the race condition, but this patch starts from a random letter (using
the PID of the process) in the temporary directory name, providing
better assurances of uniqueness.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agocmake: Build python2 and python3 modules if possible
Andreas Schneider [Mon, 12 Feb 2018 11:01:22 +0000 (12:01 +0100)]
cmake: Build python2 and python3 modules if possible

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agocmake: Improve PAM_WRAPPER_LOACATION
Andreas Schneider [Wed, 22 Nov 2017 14:27:44 +0000 (15:27 +0100)]
cmake: Improve PAM_WRAPPER_LOACATION

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 years agopam_wrapper: Use a constant string format specifier in test
Uri Simchoni [Wed, 22 Nov 2017 20:48:23 +0000 (20:48 +0000)]
pam_wrapper: Use a constant string format specifier in test

This fixes a warning about non-constant format specifier.
clang 4.0.0 warns against non-constant format specifier since
it cannot validate the format against the parameters.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agopam_wrapper: use uintptr_t as base for const-discarding
Uri Simchoni [Sun, 19 Nov 2017 13:08:30 +0000 (13:08 +0000)]
pam_wrapper: use uintptr_t as base for const-discarding

Seems like HAVE_INTPTR_T is not available on FreeBSD. Use
the uintptr_t-base const discarding to avoid picky compiler
warnings (other places in Samba also use uintptr_t).

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agopam_wrapper: #ifdef-out unused functions
Uri Simchoni [Wed, 22 Nov 2017 14:23:26 +0000 (15:23 +0100)]
pam_wrapper: #ifdef-out unused functions

When pam_vsyslog is not available, avoid building functions
that are being used to wrap it, in order to avoid picky
compiler warnings.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agopypamtest: Fix Python 2.6 compatibility
Lumir Balhar [Fri, 13 Oct 2017 13:36:15 +0000 (15:36 +0200)]
pypamtest: Fix Python 2.6 compatibility

PyErr_NewExceptionWithDoc() isn't available in Python 2.6 so it can
be used only in higher versions of Python.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agoBump version to 1.0.4 pam_wrapper-1.0.4
Andreas Schneider [Mon, 15 May 2017 14:37:44 +0000 (16:37 +0200)]
Bump version to 1.0.4

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
6 years agopwrap: Do not leak srcfd on error
Andreas Schneider [Tue, 11 Apr 2017 06:39:44 +0000 (08:39 +0200)]
pwrap: Do not leak srcfd on error

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
6 years agopam_wrapper: Fix the build without pam_vsyslog
Volker Lendecke [Mon, 1 May 2017 15:57:27 +0000 (17:57 +0200)]
pam_wrapper: Fix the build without pam_vsyslog

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoBump version to 1.0.3 pam_wrapper-1.0.3
Andreas Schneider [Thu, 6 Apr 2017 07:55:29 +0000 (09:55 +0200)]
Bump version to 1.0.3

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agodoc: Document PAM_WRAPPER_USE_SYSLOG variable
Andreas Schneider [Thu, 6 Apr 2017 09:51:32 +0000 (11:51 +0200)]
doc: Document PAM_WRAPPER_USE_SYSLOG variable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agopwrap: Do not log to syslog by default but use our logging
Andreas Schneider [Thu, 6 Apr 2017 09:47:37 +0000 (11:47 +0200)]
pwrap: Do not log to syslog by default but use our logging

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agopwrap: Do an early return in pwrap_vlog if log level doesn't match
Andreas Schneider [Thu, 6 Apr 2017 10:08:54 +0000 (12:08 +0200)]
pwrap: Do an early return in pwrap_vlog if log level doesn't match

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agopwrap: Add pwrap_vlog() functions
Andreas Schneider [Thu, 6 Apr 2017 09:41:12 +0000 (11:41 +0200)]
pwrap: Add pwrap_vlog() functions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agopwrap: Remove useless break
Andreas Schneider [Thu, 6 Apr 2017 07:56:15 +0000 (09:56 +0200)]
pwrap: Remove useless break

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agolibpamtest: Do not declare variable in for-loop
Andreas Schneider [Thu, 6 Apr 2017 07:15:07 +0000 (09:15 +0200)]
libpamtest: Do not declare variable in for-loop

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agopypamtest: Add sanity checks in new_conv_list()
Andreas Schneider [Thu, 6 Apr 2017 07:13:40 +0000 (09:13 +0200)]
pypamtest: Add sanity checks in new_conv_list()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agopypamtest: Do not use variable declaration in for-loop
Andreas Schneider [Thu, 6 Apr 2017 07:09:53 +0000 (09:09 +0200)]
pypamtest: Do not use variable declaration in for-loop

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agocmake: Add Python 3.6 if we look for the python library
Andreas Schneider [Thu, 30 Mar 2017 06:46:44 +0000 (08:46 +0200)]
cmake: Add Python 3.6 if we look for the python library

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agopwrap: Do not discard const value
Andreas Schneider [Wed, 29 Mar 2017 14:16:18 +0000 (16:16 +0200)]
pwrap: Do not discard const value

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agocmake: Remove unused define
Andreas Schneider [Wed, 29 Mar 2017 13:53:20 +0000 (15:53 +0200)]
cmake: Remove unused define

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agocmake: Do not check for pam_(v)syslog twice
Andreas Schneider [Wed, 29 Mar 2017 13:51:06 +0000 (15:51 +0200)]
cmake: Do not check for pam_(v)syslog twice

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agoBump version to 1.0.2 pam_wrapper-1.0.2
Andreas Schneider [Tue, 24 May 2016 06:00:48 +0000 (08:00 +0200)]
Bump version to 1.0.2

Signed-off-by: Andreas Schneider <asn@samba.org>
7 years agopwrap: Disable audit on BSD
Andreas Schneider [Mon, 9 May 2016 07:51:00 +0000 (09:51 +0200)]
pwrap: Disable audit on BSD

This allows us to use pam_wrapper on BSD

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agomodules: Add the path where we install the helper PAM modules to the .pc file
Jakub Hrozek [Fri, 6 May 2016 10:00:10 +0000 (12:00 +0200)]
modules: Add the path where we install the helper PAM modules to the .pc file

A test needs to often know where are the helper pam modules
(pam_get_items.so and pam_set_items.so). This patch adds a new variable
to the pkg-config file that lets the user of pam_wrapper query the path
like this:
    $ pkg-config --variable=modules pam_wrapper
    /usr/lib64/pam_wrapper

And use that variable to define their own service files.

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agolibpamtest: Only reply in conversation for echo_on and echo_off
Jakub Hrozek [Thu, 5 May 2016 13:53:46 +0000 (15:53 +0200)]
libpamtest: Only reply in conversation for echo_on and echo_off

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
8 years agoBump version to 1.0.1 pam_wrapper-1.0.1
Andreas Schneider [Mon, 18 Jan 2016 08:18:56 +0000 (09:18 +0100)]
Bump version to 1.0.1

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopwrap: Fix a possible timing issue in p_copy()
Andreas Schneider [Fri, 15 Jan 2016 14:20:24 +0000 (15:20 +0100)]
pwrap: Fix a possible timing issue in p_copy()

Do not rely on stat before open - it is racy.
Open directly and treat failure appropriately.

CID: 47518

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopwrap: Improve p_rmdirs() do avoid timing issues
Jakub Hrozek [Fri, 15 Jan 2016 11:55:51 +0000 (12:55 +0100)]
pwrap: Improve p_rmdirs() do avoid timing issues

When calling stat and rmdir, we could run into timing issues that the
stat information is incorrect till we are actually running the rmdir()
command. So we open the directory and have the handle open to avoid
that we work on outdated information. It is unlikely but Coverity
complains and we thought better fix it.

CID: 47519

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopwrap: Remove superfloues lstat()
Andreas Schneider [Fri, 15 Jan 2016 10:11:50 +0000 (11:11 +0100)]
pwrap: Remove superfloues lstat()

There is no need to check if the file exists, just try to open it.

CID: 47520

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopwrap: Make sure we have a terminating null byte
Andreas Schneider [Fri, 15 Jan 2016 10:44:14 +0000 (11:44 +0100)]
pwrap: Make sure we have a terminating null byte

This is just to silence Coverity.

CID: 47508

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopam_matrix: Set a secure umask before calling mkstemp()
Andreas Schneider [Fri, 15 Jan 2016 10:38:00 +0000 (11:38 +0100)]
pam_matrix: Set a secure umask before calling mkstemp()

CID: 47516

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopwrap: Return EPROTONOSUPPORT in audit_open()
Andreas Schneider [Thu, 14 Jan 2016 16:04:33 +0000 (17:04 +0100)]
pwrap: Return EPROTONOSUPPORT in audit_open()

I don't know why but returning EINVAL doesn't work. It treats it as
success and tries to write to it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agocmake: Link python module against the python library
Andreas Schneider [Thu, 14 Jan 2016 16:04:07 +0000 (17:04 +0100)]
cmake: Link python module against the python library

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agocmake: Do not require a C++ compiler
Andreas Schneider [Thu, 14 Jan 2016 12:46:01 +0000 (13:46 +0100)]
cmake: Do not require a C++ compiler

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoInitial release of pam_wrapper 1.0.0
Andreas Schneider [Wed, 13 Jan 2016 08:42:09 +0000 (09:42 +0100)]
Initial release of pam_wrapper 1.0.0

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopam_matrix: Call umask before mkstemp()
Andreas Schneider [Wed, 13 Jan 2016 09:57:44 +0000 (10:57 +0100)]
pam_matrix: Call umask before mkstemp()

Without calling umask() we create and use insecure temporary files that
can leave application and system data vulnerable to attack. Unlikely in
a module created for testing, but better fix it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopwrap: Make sure pam_library is null-terminated
Andreas Schneider [Wed, 13 Jan 2016 09:54:36 +0000 (10:54 +0100)]
pwrap: Make sure pam_library is null-terminated

We initialize the array with 0. So do not pass the full size of the
array to make sure the last byte is a null byte.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agolibpamtest: Make sure ri is not used uninitialized
Andreas Schneider [Wed, 13 Jan 2016 09:50:05 +0000 (10:50 +0100)]
libpamtest: Make sure ri is not used uninitialized

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopwrap: Wrap audit_open() to fix sshd
Andreas Schneider [Fri, 18 Dec 2015 10:10:53 +0000 (11:10 +0100)]
pwrap: Wrap audit_open() to fix sshd

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agoCoverity: Remove deadcode
Jakub Hrozek [Wed, 16 Dec 2015 14:17:42 +0000 (15:17 +0100)]
Coverity: Remove deadcode

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agoCoverity: Fix memory leak in libpamtest on error
Jakub Hrozek [Wed, 16 Dec 2015 14:20:48 +0000 (15:20 +0100)]
Coverity: Fix memory leak in libpamtest on error

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopython: Remove dead code in test_result_list_concat()
Andreas Schneider [Wed, 16 Dec 2015 14:19:56 +0000 (15:19 +0100)]
python: Remove dead code in test_result_list_concat()

There is a NULL check already above and the XDECREF does not set the
object to NULL.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agotests: Fix a possible memory leak in pwrap_conv()
Andreas Schneider [Wed, 16 Dec 2015 14:16:36 +0000 (15:16 +0100)]
tests: Fix a possible memory leak in pwrap_conv()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agotests: Do not dreference key before NULL check in string_in_list()
Andreas Schneider [Wed, 16 Dec 2015 14:13:59 +0000 (15:13 +0100)]
tests: Do not dreference key before NULL check in string_in_list()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agocmake: Link pam_wrapper to libdl
Andreas Schneider [Wed, 16 Dec 2015 14:02:43 +0000 (15:02 +0100)]
cmake: Link pam_wrapper to libdl

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agodoc: Also install pam_matrix manpage
Jakub Hrozek [Wed, 16 Dec 2015 12:40:13 +0000 (13:40 +0100)]
doc: Also install pam_matrix manpage

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agocmake: Install pypamtest
Andreas Schneider [Wed, 16 Dec 2015 09:48:14 +0000 (10:48 +0100)]
cmake: Install pypamtest

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agocmake: Find the python executable and site libs
Andreas Schneider [Wed, 16 Dec 2015 09:36:22 +0000 (10:36 +0100)]
cmake: Find the python executable and site libs

This is needed to find the PYTHON_SITELIB directory for module
installation.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agocmake: Add FindPythonSiteLibs.cmake
Andreas Schneider [Wed, 16 Dec 2015 09:29:29 +0000 (10:29 +0100)]
cmake: Add FindPythonSiteLibs.cmake

This adds support do discover PYTHON_SITELIB location.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agocmake: Use python_add_module function
Andreas Schneider [Wed, 16 Dec 2015 09:16:32 +0000 (10:16 +0100)]
cmake: Use python_add_module function

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopwrap: Do not close negative fds in p_copy()
Andreas Schneider [Wed, 16 Dec 2015 14:24:13 +0000 (15:24 +0100)]
pwrap: Do not close negative fds in p_copy()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopwrap: Fix a resource leak in p_rmdirs()
Andreas Schneider [Wed, 16 Dec 2015 14:22:09 +0000 (15:22 +0100)]
pwrap: Fix a resource leak in p_rmdirs()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopwrap: Add more debug messages if something goes wrong
Andreas Schneider [Fri, 18 Dec 2015 09:50:47 +0000 (10:50 +0100)]
pwrap: Add more debug messages if something goes wrong

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopwrap: Do not fail on EOL in pwrap_clean_stale_dirs()
Andreas Schneider [Fri, 18 Dec 2015 09:50:29 +0000 (10:50 +0100)]
pwrap: Do not fail on EOL in pwrap_clean_stale_dirs()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopwrap: Close the pidfile in pwrap_init()
Andreas Schneider [Fri, 18 Dec 2015 09:49:00 +0000 (10:49 +0100)]
pwrap: Close the pidfile in pwrap_init()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopwrap: Add log message for directory cleanup
Andreas Schneider [Fri, 18 Dec 2015 09:26:14 +0000 (10:26 +0100)]
pwrap: Add log message for directory cleanup

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopy: Fix strict aliasing rules in initpypamtest()
Andreas Schneider [Thu, 10 Dec 2015 16:36:09 +0000 (17:36 +0100)]
py: Fix strict aliasing rules in initpypamtest()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopy: Fix strict aliasing rules in set_pypamtest_exception()
Andreas Schneider [Thu, 10 Dec 2015 16:35:51 +0000 (17:35 +0100)]
py: Fix strict aliasing rules in set_pypamtest_exception()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopy: Make sure we do not use failed uninitialized
Andreas Schneider [Thu, 10 Dec 2015 16:32:18 +0000 (17:32 +0100)]
py: Make sure we do not use failed uninitialized

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agopy: Make sure we do not dereference a NULL pointer
Andreas Schneider [Thu, 10 Dec 2015 16:30:57 +0000 (17:30 +0100)]
py: Make sure we do not dereference a NULL pointer

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agolibpamtest: Do not call pam_end() if tc is not set
Andreas Schneider [Thu, 10 Dec 2015 16:13:52 +0000 (17:13 +0100)]
libpamtest: Do not call pam_end() if tc is not set

This fixes a build warning.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agolibpamtest: Make sure reply is initialized
Andreas Schneider [Thu, 10 Dec 2015 16:10:55 +0000 (17:10 +0100)]
libpamtest: Make sure reply is initialized

Fixes a build warning

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotests: Do not run python test if python is not present
Andreas Schneider [Thu, 10 Dec 2015 16:03:46 +0000 (17:03 +0100)]
tests: Do not run python test if python is not present

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctest: Drop ctest results via https
Andreas Schneider [Thu, 10 Dec 2015 15:03:49 +0000 (16:03 +0100)]
ctest: Drop ctest results via https

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agotests: Fix printf attribute warnings
Andreas Schneider [Wed, 25 Nov 2015 15:53:01 +0000 (16:53 +0100)]
tests: Fix printf attribute warnings

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agopam_matrix: Add OpenPAM (BSD) support
Andreas Schneider [Fri, 20 Nov 2015 14:03:25 +0000 (15:03 +0100)]
pam_matrix: Add OpenPAM (BSD) support

Includes:
    - pwrap: Fix errno if ENODATA is not available
    - nwrap: Add FTW return values if not defined
    - pwrap: Add support for BSD prompt and strerror functions
    - pwrap: Add detection for pam_syslog and pam_vsyslog

8 years agocmake: Add cmake config files for libpamtest
Andreas Schneider [Wed, 11 Nov 2015 15:37:12 +0000 (16:37 +0100)]
cmake: Add cmake config files for libpamtest

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agocmake: Ignore build directories
Andreas Schneider [Wed, 11 Nov 2015 15:29:03 +0000 (16:29 +0100)]
cmake: Ignore build directories

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agocmake: Set correct versions for libraries
Andreas Schneider [Wed, 11 Nov 2015 15:28:38 +0000 (16:28 +0100)]
cmake: Set correct versions for libraries

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agopython: Support python2
Andreas Schneider [Tue, 10 Nov 2015 14:53:08 +0000 (15:53 +0100)]
python: Support python2

8 years agolibpamtest: Add Python bindings
Jakub Hrozek [Wed, 4 Nov 2015 15:59:41 +0000 (16:59 +0100)]
libpamtest: Add Python bindings

So far only for Python3

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

8 years agopwrap: Add pamtest_strerror()
Jakub Hrozek [Thu, 5 Nov 2015 21:20:53 +0000 (22:20 +0100)]
pwrap: Add pamtest_strerror()

8 years agoImprove build
Andreas Schneider [Thu, 5 Nov 2015 20:12:10 +0000 (21:12 +0100)]
Improve build

8 years agos/PAM_WRAPPER_CONFDIR/PAM_WRAPPER_SERVICEDIR
Andreas Schneider [Tue, 3 Nov 2015 15:05:39 +0000 (16:05 +0100)]
s/PAM_WRAPPER_CONFDIR/PAM_WRAPPER_SERVICEDIR

8 years agoSQ into clean stale dirs
Jakub Hrozek [Wed, 25 Nov 2015 15:12:09 +0000 (16:12 +0100)]
SQ into clean stale dirs

8 years agopwrap: Clean stale dirs
Andreas Schneider [Tue, 3 Nov 2015 14:44:32 +0000 (15:44 +0100)]
pwrap: Clean stale dirs

8 years agolibpamtest: Handle NULL passwords in libpamtest
Jakub Hrozek [Mon, 2 Nov 2015 19:59:28 +0000 (20:59 +0100)]
libpamtest: Handle NULL passwords in libpamtest

8 years agolibpamtest: add documentation, change macros to look better
Andreas Schneider [Mon, 2 Nov 2015 15:51:26 +0000 (16:51 +0100)]
libpamtest: add documentation, change macros to look better

8 years agotests: Also test pam_vprompt
Jakub Hrozek [Fri, 30 Oct 2015 10:40:18 +0000 (11:40 +0100)]
tests: Also test pam_vprompt

8 years agopwrap: Build on FreeBSD
Jakub Hrozek [Fri, 30 Oct 2015 09:10:01 +0000 (10:10 +0100)]
pwrap: Build on FreeBSD

With this patch, pam_wrapper builds on FreeBSD, but doesn't work (yet)

8 years agodocs: Add man pages for modules
Jakub Hrozek [Thu, 29 Oct 2015 18:02:27 +0000 (19:02 +0100)]
docs: Add man pages for modules

8 years agoMore libpamtest tests
Jakub Hrozek [Wed, 28 Oct 2015 13:44:05 +0000 (14:44 +0100)]
More libpamtest tests

8 years agoAssorted small fixes and leak plugs
Jakub Hrozek [Wed, 28 Oct 2015 13:27:15 +0000 (14:27 +0100)]
Assorted small fixes and leak plugs

8 years agoDon't use pam_prompt
Jakub Hrozek [Wed, 28 Oct 2015 13:28:33 +0000 (14:28 +0100)]
Don't use pam_prompt

8 years agoTest ECHO_ON in libpamtest
Jakub Hrozek [Wed, 28 Oct 2015 12:29:13 +0000 (13:29 +0100)]
Test ECHO_ON in libpamtest

8 years agoDon't use pam_prompt in pam_matrix
Jakub Hrozek [Wed, 28 Oct 2015 11:50:22 +0000 (12:50 +0100)]
Don't use pam_prompt in pam_matrix

8 years agotests: more libpamtest tests
Jakub Hrozek [Wed, 28 Oct 2015 10:57:04 +0000 (11:57 +0100)]
tests: more libpamtest tests

8 years agoRename pwrap_pam to Matrix
Jakub Hrozek [Wed, 28 Oct 2015 10:12:29 +0000 (11:12 +0100)]
Rename pwrap_pam to Matrix

8 years agopamtest: Capture info and error messages from conversation
Jakub Hrozek [Sat, 24 Oct 2015 15:43:30 +0000 (17:43 +0200)]
pamtest: Capture info and error messages from conversation

8 years agopwrap: Add pam_get_items.so and pam_set_items.so
Jakub Hrozek [Tue, 20 Oct 2015 13:47:48 +0000 (15:47 +0200)]
pwrap: Add pam_get_items.so and pam_set_items.so

8 years agopwrap: Export service directory in environment variable
Jakub Hrozek [Tue, 20 Oct 2015 11:05:35 +0000 (13:05 +0200)]
pwrap: Export service directory in environment variable

8 years agoAdd Travis YAML file
Jakub Hrozek [Tue, 13 Oct 2015 06:59:54 +0000 (08:59 +0200)]
Add Travis YAML file

8 years agoUse find_library to find libpam.0
Jakub Hrozek [Thu, 15 Oct 2015 10:14:28 +0000 (12:14 +0200)]
Use find_library to find libpam.0

8 years agoconvert pam_wrapper tests to libpamtest
Jakub Hrozek [Fri, 9 Oct 2015 14:15:51 +0000 (16:15 +0200)]
convert pam_wrapper tests to libpamtest

8 years agopamtest: Add libpamtest
Jakub Hrozek [Fri, 9 Oct 2015 13:39:11 +0000 (15:39 +0200)]
pamtest: Add libpamtest

8 years agopwrap: wrap pam_syslog
Jakub Hrozek [Thu, 1 Oct 2015 19:30:14 +0000 (21:30 +0200)]
pwrap: wrap pam_syslog

8 years agopwrap: Allow more directories
Andreas Schneider [Thu, 1 Oct 2015 18:33:12 +0000 (20:33 +0200)]
pwrap: Allow more directories