From: Thorsten Kukuk Date: Fri, 4 May 2007 11:36:08 +0000 (+0000) Subject: Relevant BUGIDs: X-Git-Tag: Linux-PAM-0_99_8_0~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b33ec050402db86919da97c720dacaf280681e6;p=linux-pam 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 . --- diff --git a/ChangeLog b/ChangeLog index e3504348..2a0a526c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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 . + 2007-04-30 Thorsten Kukuk * modules/pam_limits/limits.conf: Address space limit is KB. 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; }