Dag-Erling Smørgrav
e0e3406a78
Enable FALLBACK_TO_OTHER since we don't use (or need) a policy.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@946 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-22 12:38:53 +00:00
Dag-Erling Smørgrav
bb68996306
Bump copyright years.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@944 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-22 09:49:12 +00:00
Dag-Erling Smørgrav
9bdf428c5a
Fix an off-by-one bug in pam_getenv() which was inadvertantly
...
introduced when pam_getenv() was (needlessly) rewritten as part of
r913. Rewrite pam_getenv() again (but correctly, this time) to reduce
the number of times we iterate over the same string. Add a few unit
tests for pam_{get,put,set}env(), including one which would have
caught the bug.
Credit goes to Tim Creech <tcreech@tcreech.com> for discovering and
reporting the bug.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@943 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-20 13:23:51 +00:00
Dag-Erling Smørgrav
a501f2af85
Use pkg-config / pkgconf to locate libcryb-test.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@940 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2019-02-20 12:21:40 +00:00
Dag-Erling Smørgrav
9cd25f7e7d
Switch from $Id$ to $OpenPAM$.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@938 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-30 21:34:42 +00:00
Dag-Erling Smørgrav
919a1250d4
Bump copyright year.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@935 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-04-26 21:04:10 +00:00
Dag-Erling Smørgrav
e7f32a97b0
Adapt to newer versions of the Cryb test framework.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@926 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-03-23 13:42:56 +00:00
Dag-Erling Smørgrav
812256e9d1
Add missing #include.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@925 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-23 08:03:22 +00:00
Dag-Erling Smørgrav
a823b423ca
Switch to using the cryb.to project's test framework.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@922 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-02-19 19:28:30 +00:00
Dag-Erling Smørgrav
e936857588
Newer versions of clang take __nonnull__ annotations into account not only
...
when compiling code that calls the function, but also when compiling the
function itself. This means that NULL checks in the function trigger
condition-always-false warnings. We have a choice between disabling these
warnings, removing the __nonnull__ annotations, or removing the NULL checks.
We prefer to keep the annotations and warnings and remove the checks. In
all cases, passing NULL to the function in question will result in a
segmentation fault, which is often easier to debug than an error return,
especially when most of these checks were for the PAM handle, which can only
be NULL if the caller ignored an error return from pam_start().
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@913 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-21 15:11:12 +00:00
Dag-Erling Smørgrav
c75883564d
Move OATH development to a branch. OATH will soon disappear entirely
...
from this repository as Cryb takes over.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@907 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2017-01-18 09:39:01 +00:00
Dag-Erling Smørgrav
da26321ba8
Spell the GCC pragmas correctly.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@891 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-09-19 10:04:25 +00:00
Dag-Erling Smørgrav
26fbccde77
Bump dates if required on files modified in 2014 or later.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@890 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 16:22:09 +00:00
Dag-Erling Smørgrav
aa6768d765
Fix props
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@888 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-11 16:19:57 +00:00
Dag-Erling Smørgrav
ddfa63ca38
Disable coverage analysis of tests and test infrastructure.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@883 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-09 18:42:28 +00:00
Dag-Erling Smørgrav
310b5ee125
Partially revert r871 until a better solution can be found, as it only
...
works if the file already exists.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@880 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2016-01-09 17:52:39 +00:00
Dag-Erling Smørgrav
d4aad88c97
Add a table-driven test which leverages the pam_return module to test
...
various code paths in openpam_dispatch().
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@874 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2015-12-01 19:40:01 +00:00
Dag-Erling Smørgrav
b3cd4386fa
In t_fopen(), resolve the full path to the file before opening it.
...
In t_fprintf(), immediately flush the file after writing to it.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@871 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2015-12-01 19:21:50 +00:00
Dag-Erling Smørgrav
75781c2e7c
Don't forget to distribute t_pam_conv.h
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@867 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2015-10-23 09:10:04 +00:00
Dag-Erling Smørgrav
37b1f12e58
Deconstify across the board to dodge -Wcast-qual until we convert to the far
...
superior cryb.to test framework.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@866 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2015-07-31 00:03:02 +00:00
Dag-Erling Smørgrav
38c6ca93b2
Start writing tests for openpam_dispatch(). The first is a regression test
...
for the bug fixed in r802.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@863 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2015-07-30 23:44:31 +00:00
Dag-Erling Smørgrav
653950434c
Fully fix the input overflow bug and add a test case for it.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@861 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2015-03-19 00:42:58 +00:00
Dag-Erling Smørgrav
a1f83b0b30
Add unit tests for RFC 3986 percent encoding / decoding.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@857 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2015-03-19 00:06:32 +00:00
Dag-Erling Smørgrav
273bae0b16
Oops - the line count is incremented by the line continuation, not by
...
the word that precedes it.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@837 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-10-28 17:50:17 +00:00
Dag-Erling Smørgrav
16ae1d5b87
Further improve the line continuation tests.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@836 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-10-28 17:47:55 +00:00
Dag-Erling Smørgrav
1e3740645e
Add a test case for line continuation within whitespace, similar to
...
the corresponding test in t_openpam_readword.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@835 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-10-28 13:48:00 +00:00
Dag-Erling Smørgrav
ac54af0d69
Add configure options to build as much as possible using the system
...
libpam and / or liboath. Doing so disables building the corresponding
library and its documentation, but still builts the corresponding tools
and modules and runs the unit tests.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@834 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-10-28 10:25:58 +00:00
Dag-Erling Smørgrav
e6dc9378f7
staticize t_plan
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@830 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-10-24 08:49:47 +00:00
Dag-Erling Smørgrav
e956efb61f
Better tests for line continuation.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@828 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-10-23 08:25:08 +00:00
Dag-Erling Smørgrav
05630b94be
Spell the name of the University of Oslo in English.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@799 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-07-10 17:16:48 +00:00
Dag-Erling Smørgrav
b61b6f9c74
Add a test for lines containing more words than will fit in
...
openpam_readword()'s initial allocation.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@793 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-17 14:27:03 +00:00
Dag-Erling Smørgrav
4614107c94
Missed one
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@791 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-17 14:10:33 +00:00
Dag-Erling Smørgrav
f7e8328354
Additional tests for various end-of-line / end-of-file corner cases,
...
and for comments that aren't comments.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@790 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-17 14:08:31 +00:00
Dag-Erling Smørgrav
ebdefa45ca
Fix buffer overflow in the b64complete test case by increasing the size
...
of the buffer used in tests.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@783 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-10 11:13:05 +00:00
Dag-Erling Smørgrav
6c087dd523
Add test vectors which encode to the complete alphabet.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@778 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-09 14:10:06 +00:00
Dag-Erling Smørgrav
d60017fe80
Additional tests (which also fail) for unexpected padding.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@775 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-09 12:04:56 +00:00
Dag-Erling Smørgrav
c5265319ff
Completely rewrite the test suite for the RFC 4648 encoding / decoding
...
functions and add many new tests, several of which fail.
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@773 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-09 11:49:08 +00:00
Dag-Erling Smørgrav
01809a1b48
Switch from uint8_t to char.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@772 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-09 11:45:05 +00:00
Dag-Erling Smørgrav
576e1e6b1c
Add tests for base{32,64}_decode(). Both are broken.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@769 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-06 12:32:29 +00:00
Dag-Erling Smørgrav
56f7cf21f5
Make stdout line-buffered so verbose output is easier to read.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@768 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-03-06 12:31:31 +00:00
Dag-Erling Smørgrav
58921adbab
Add complete coverage for the classification macros in openpam_ctype.h.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@760 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2014-02-26 16:22:32 +00:00
Dag-Erling Smørgrav
429089e868
Add missing #include
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@658 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-06 22:59:15 +00:00
Dag-Erling Smørgrav
26d543d484
__unused is a FreeBSDism, use OPENPAM_UNUSED().
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@657 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-06 22:59:05 +00:00
Dag-Erling Smørgrav
0ba869e872
Test cases for base 32 and 64 encoders
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@653 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-05 18:54:22 +00:00
Dag-Erling Smørgrav
7ab83ce826
Support tests that require arguments
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@651 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-05 18:11:59 +00:00
Dag-Erling Smørgrav
a9a5497d3f
Reorganize:
...
- move libpam into lib/libpam
- move the OATH code into lib/liboath
- move oath.h into include/security
- update all pointers
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@646 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-05 17:49:06 +00:00
Dag-Erling Smørgrav
a9c6523c52
If setlogmask(3) is available, suppress logging during tests.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@640 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-04 10:38:45 +00:00
Dag-Erling Smørgrav
b21442245a
Add test cases that mix quoted and unquoted text.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@633 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-03 22:57:21 +00:00
Dag-Erling Smørgrav
1a070e2544
Fix usage string
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@632 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-03-03 20:26:34 +00:00
Dag-Erling Smørgrav
f70250359e
Use AM_CPPFLAGS instead of INCLUDES.
...
git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@620 185d5e19-27fe-0310-9dcf-9bff6b9f3609
2013-02-24 18:51:10 +00:00