From 960fa481bedbe8485b1be18ba7b61481eeff32ed Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 18 Dec 2014 15:15:42 +1300 Subject: [PATCH] Add test for incorrect password Signed-off-by: Andrew Bartlett --- tests/kdc/check-kdc.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/kdc/check-kdc.in b/tests/kdc/check-kdc.in index 6fa9e49ff..308e231a7 100644 --- a/tests/kdc/check-kdc.in +++ b/tests/kdc/check-kdc.in @@ -268,6 +268,7 @@ fi echo foo > ${objdir}/foopassword +echo notfoo > ${objdir}/notfoopassword echo Starting kdc ; > messages.log env MallocStackLogging=1 MallocStackLoggingNoCompact=1 MallocErrorAbort=1 MallocLogFile=${objdir}/malloc-log \ @@ -289,6 +290,12 @@ trap "kill -9 ${kdcpid} ${kpasswddpid}; echo signal killing kdc kpasswdd; exit 1 ec=0 +echo "Getting client initial tickets with wrong password"; > messages.log +${kinit} --password-file=${objdir}/notfoopassword \ + foo@${R} 2>kinit-log.tmp && \ + { ec=1 ; eval "${testfailed}"; } +grep 'Password incorrect' kinit-log.tmp > /dev/null || \ + { ec=1 ; eval "${testfailed}"; } echo "Getting client initial tickets"; > messages.log ${kinit} --password-file=${objdir}/foopassword foo@$R || \ { ec=1 ; eval "${testfailed}"; } -- 2.11.4.GIT