summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--xtests/.cvsignore3
-rw-r--r--xtests/Makefile.am2
-rwxr-xr-xxtests/run-xtests.sh10
-rw-r--r--xtests/tst-pam_unix1.c2
5 files changed, 19 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e3504348..2a0a526c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-04 Thorsten Kukuk <kukuk@suse.de>
+
+ * 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 <thisisnotapipe@hotmail.com>.
+
2007-04-30 Thorsten Kukuk <kukuk@thkukuk.de>
* 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;
}