From 7b33ec050402db86919da97c720dacaf280681e6 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 4 May 2007 11:36:08 +0000 Subject: Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- 2007-05-04 Thorsten Kukuk * xtests/run-xtests.sh: Use SRCDIR to find PAM config files. * xtests/Makefile.am:Call run-xtests.sh with srcdir as first argument. Based on patch by Bernard Leak . --- xtests/.cvsignore | 3 +++ xtests/Makefile.am | 2 +- xtests/run-xtests.sh | 10 +++++++--- xtests/tst-pam_unix1.c | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) (limited to 'xtests') diff --git a/xtests/.cvsignore b/xtests/.cvsignore index c59c99ef..4254282e 100644 --- a/xtests/.cvsignore +++ b/xtests/.cvsignore @@ -7,3 +7,6 @@ tst-pam_dispatch2 tst-pam_dispatch3 tst-pam_dispatch4 tst-pam_cracklib1 +tst-pam_unix1 +tst-pam_unix2 +tst-pam_unix3 diff --git a/xtests/Makefile.am b/xtests/Makefile.am index 86b6a403..dd7ba801 100644 --- a/xtests/Makefile.am +++ b/xtests/Makefile.am @@ -22,4 +22,4 @@ XTESTS = tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 \ noinst_PROGRAMS = $(XTESTS) xtests: $(XTESTS) run-xtests.sh - $(srcdir)/run-xtests.sh ${XTESTS} + "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh index ce49fcda..e05e45e2 100755 --- a/xtests/run-xtests.sh +++ b/xtests/run-xtests.sh @@ -1,5 +1,9 @@ #!/bin/bash +SRCDIR=$1 +shift 1 +[ -z "${SRCDIR}" ] && SRCDIR='.' + if test `id -u` -ne 0 ; then echo "You need to be root to run the tests" exit 1 @@ -12,9 +16,9 @@ pass=0 all=0 for testname in $XTESTS ; do - install -m 644 $testname.pamd /etc/pam.d/$testname - if test -x ./$testname.sh ; then - ./$testname.sh > /dev/null + install -m 644 "${SRCDIR}"/$testname.pamd /etc/pam.d/$testname + if test -x "${SRCDIR}"/$testname.sh ; then + "${SRCDIR}"/$testname.sh > /dev/null else ./$testname > /dev/null fi diff --git a/xtests/tst-pam_unix1.c b/xtests/tst-pam_unix1.c index 01238638..7b884997 100644 --- a/xtests/tst-pam_unix1.c +++ b/xtests/tst-pam_unix1.c @@ -106,7 +106,7 @@ main(int argc, char *argv[]) if (retval != PAM_AUTH_ERR) { if (debug) - fprintf (stderr, "pam_unix1: pam_athenticate returned %d\n", retval); + fprintf (stderr, "pam_unix1: pam_authenticate returned %d\n", retval); return 1; } -- cgit v1.2.3