[28250] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Use system dictionary for db2 tests again

daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Feb 19 16:53:46 2014

Date: Wed, 19 Feb 2014 16:53:41 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201402192153.s1JLrf3C011279@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/dba768e873d3ae34cfb2ff9d9c2d3644981f23a5
commit dba768e873d3ae34cfb2ff9d9c2d3644981f23a5
Author: Greg Hudson <ghudson@mit.edu>
Date:   Tue Feb 18 01:14:01 2014 -0500

    Use system dictionary for db2 tests again
    
    The built-in word list is not long enough for all of the libdb2 tests
    to run properly.  Revert d21a86e47a7cda29225013e08d060095b94b2ee7 and
    go back to using the system dictionary if we find one.  However, omit
    any lines from the chosen word list which contain non-alphabetical
    characters.
    
    ticket: 7860

 src/plugins/kdb/db2/libdb2/test/run.test |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/plugins/kdb/db2/libdb2/test/run.test b/src/plugins/kdb/db2/libdb2/test/run.test
index 81db7f7..d99b42d 100644
--- a/src/plugins/kdb/db2/libdb2/test/run.test
+++ b/src/plugins/kdb/db2/libdb2/test/run.test
@@ -15,6 +15,14 @@ main()
 
 	if [ \! -z "$WORDLIST" -a -f "$WORDLIST" ]; then
 		DICT=$WORDLIST
+	elif [ -f /usr/local/lib/dict/words ]; then
+		DICT=/usr/local/lib/dict/words
+	elif [ -f /usr/share/dict/words ]; then
+		DICT=/usr/share/dict/words
+	elif [ -f /usr/dict/words ]; then
+		DICT=/usr/dict/words
+	elif [ -f /usr/share/lib/dict/words ]; then
+		DICT=/usr/share/lib/dict/words
 	elif [ -f $srcdir/../test/dictionary ]; then
 		DICT=`cd $srcdir/../test && pwd`/dictionary
 	else
@@ -63,10 +71,11 @@ main()
 }
 
 getnwords() {
-	# Delete blank lines because the db code appears not to
-	# like empty keys.  On Debian Linux, $DICT appears to contain
-	# some non-ASCII characters, and "rev" chokes on them.
-	sed -e '/^$/d' < $DICT | cat -v | sed -e ${1}q
+	# Delete blank lines because the db code appears not to like
+	# empty keys.  Omit lines with non-alphanumeric characters to
+	# avoid shell metacharacters and non-ASCII characters which
+	# could cause 'rev' to choke.
+	LC_ALL=C sed -e '/^$/d' -e '/[^A-Za-z]/d' < $DICT | sed -e ${1}q
 }
 
 # Take the first hundred entries in the dictionary, and make them
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post