]> eyrie.org Git - kerberos/krb5-strength.git/blob - cracklib/mkdict
Add license statement to RPM spec file
[kerberos/krb5-strength.git] / cracklib / mkdict
1 #!/bin/sh
2
3 ###
4 # This program is copyright Alec Muffett 1993. The author disclaims all
5 # responsibility or liability with respect to it's usage or its effect
6 # upon hardware or computer systems, and maintains copyright as set out
7 # in the "LICENCE" document which accompanies distributions of Crack v4.0
8 # and upwards.
9 ###
10
11 # Modified as part of the krb5-strength project as follows:
12 #
13 # 2016-11-06  Russ Allbery <eagle@eyrie.org>
14 #   - Force C locale when sorting to avoid creating a corrupt dictionary.
15
16 ### in case of explosion, invoke "sort" with "-T" option pointing to a lot
17 ### of free space in a directory somewhere.
18
19 # Force C locale, since that's what packer expects.
20 LC_ALL=C; export LC_ALL
21
22 SORT="sort"
23 ###SORT="sort -T /tmp"
24
25 cat $* |
26         tr '[A-Z]' '[a-z]' |
27         tr -cd '\012[a-z][0-9]' |
28         $SORT |
29         uniq |
30         grep -v '^#' |
31         grep -v '^$'