From 1ab205ce396b5560d35e7f3ef8c6e3cb77ec45e8 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Mon, 24 Mar 2014 22:58:07 -0700 Subject: [PATCH] Fix CDB krb5-strength-wordlist check for no overwrite behavior We now decline to overwrite an existing file, so adjust the test suite to remove the generated file between tests. --- tests/tools/wordlist-cdb-t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tools/wordlist-cdb-t b/tests/tools/wordlist-cdb-t index 034a83f..d6fde6a 100755 --- a/tests/tools/wordlist-cdb-t +++ b/tests/tools/wordlist-cdb-t @@ -47,6 +47,7 @@ ok_program 'Database contains non-ASCII password' 0 '1' \ cdb -q "$tmpdir/wordlist.cdb" 'عربى' # Regenerate the database, filtering out short passwords. +rm "$tmpdir/wordlist.cdb" ok_program 'Database generation with no short passwords' 0 '' \ "$makelist" -c "$tmpdir/wordlist.cdb" -l 8 "$tmpdir/wordlist" ok_program 'Database still contains password' 0 '1' \ @@ -55,6 +56,7 @@ ok_program 'Database does not contain one' 100 '' \ cdb -q "$tmpdir/wordlist.cdb" one # Regenerate the database, filtering out non-ASCII words. +rm "$tmpdir/wordlist.cdb" ok_program 'Database generation with no non-ASCII' 0 '' \ "$makelist" -c "$tmpdir/wordlist.cdb" -a "$tmpdir/wordlist" ok_program 'Database still contains password' 0 '1' \ @@ -63,6 +65,7 @@ ok_program 'Database does not contain non-ASCII password' 100 '' \ cdb -q "$tmpdir/wordlist.cdb" 'عربى' # Regenerate the database, filtering out long passwords. +rm "$tmpdir/wordlist.cdb" ok_program 'Database generation with no long passwords' 0 '' \ "$makelist" -c "$tmpdir/wordlist.cdb" -L 10 "$tmpdir/wordlist" ok_program 'Database still contains bitterbane' 0 '1' \ @@ -71,6 +74,7 @@ ok_program 'Database does not contain happenstance' 100 '' \ cdb -q "$tmpdir/wordlist.cdb" happenstance # Regenerate the database, filtering out words starting with b or ending in d. +rm "$tmpdir/wordlist.cdb" ok_program 'Database generation with no b passwords' 0 '' \ "$makelist" -c "$tmpdir/wordlist.cdb" -x '\Ab' -x '.*d' "$tmpdir/wordlist" ok_program 'Database does not contain bitterbane' 100 '' \ -- 2.39.2