source: openpam/trunk/t/Makefile.am @ 943

Last change on this file since 943 was 943, checked in by Dag-Erling Smørgrav, 2 years ago

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@…> for discovering and
reporting the bug.

  • Property svn:eol-style set to native
  • Property svn:keywords set to OpenPAM=%I
File size: 710 bytes
Line 
1# $OpenPAM: Makefile.am 943 2019-02-20 13:23:51Z des $
2
3if WITH_TEST
4
5AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/libpam \
6        $(CRYB_TEST_CFLAGS)
7
8AM_TESTS_ENVIRONMENT = \
9        PAM_RETURN_SO=$(abs_top_builddir)/modules/pam_return/.libs/pam_return.so
10
11# tests
12TESTS =
13TESTS += t_openpam_ctype
14TESTS += t_openpam_dispatch
15TESTS += t_openpam_readword
16TESTS += t_openpam_readlinev
17TESTS += t_pam_env
18check_PROGRAMS = $(TESTS)
19
20# libt - common support code
21check_LIBRARIES = libt.a
22libt_a_SOURCES = t_pam_conv.c t_pam_err.c
23noinst_HEADERS = t_pam_conv.h t_pam_err.h
24
25# link with libpam and test framework
26LDADD = $(CRYB_TEST_LIBS) libt.a
27if WITH_SYSTEM_LIBPAM
28LDADD += $(SYSTEM_LIBPAM)
29else
30LDADD += $(top_builddir)/lib/libpam/libpam.la
31endif
32
33endif
Note: See TracBrowser for help on using the repository browser.