projects
/
mirror
/
userdir-ldap-cgi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make selection a link
[mirror/userdir-ldap-cgi.git]
/
password-qualify-check
diff --git
a/password-qualify-check
b/password-qualify-check
index
8853f46
..
08e90dc
100755
(executable)
--- a/
password-qualify-check
+++ b/
password-qualify-check
@@
-7,10
+7,7
@@
# Copyright (c) 2008 Peter Palfrader
import sys, tempfile, os
# Copyright (c) 2008 Peter Palfrader
import sys, tempfile, os
-try:
- import crack as cracklib
-except ImportError:
- import cracklib
+import cracklib
def cleanup(dir):
if not dir.startswith('/tmp/pwcheck-'):
def cleanup(dir):
if not dir.startswith('/tmp/pwcheck-'):
@@
-58,6
+55,11
@@
except ValueError, e:
# and against a dictionary created from the ldap info on this user
if len(ldapwords) > 0:
# and against a dictionary created from the ldap info on this user
if len(ldapwords) > 0:
+ # squeeze's cracklib-packer complains about '*' on input - it
+ # says 'skipping line: 1'
+ while '*' in ldapwords:
+ ldapwords.remove('*')
+
tmpdir = tempfile.mkdtemp('', 'pwcheck-')
F = open(tmpdir+'/wordlist', "w")
for w in ldapwords:
tmpdir = tempfile.mkdtemp('', 'pwcheck-')
F = open(tmpdir+'/wordlist', "w")
for w in ldapwords: