[Pkg-cracklib-commits] r49 - in cracklib2/trunk/debian: . patches
jandd-guest at alioth.debian.org
jandd-guest at alioth.debian.org
Mon Sep 15 18:46:22 UTC 2008
Author: jandd-guest
Date: 2008-09-15 18:46:21 +0000 (Mon, 15 Sep 2008)
New Revision: 49
Modified:
cracklib2/trunk/debian/changelog
cracklib2/trunk/debian/patches/04-improved-python-binding.patch
Log:
fix for #499013
Modified: cracklib2/trunk/debian/changelog
===================================================================
--- cracklib2/trunk/debian/changelog 2008-09-10 21:31:00 UTC (rev 48)
+++ cracklib2/trunk/debian/changelog 2008-09-15 18:46:21 UTC (rev 49)
@@ -1,3 +1,9 @@
+svn cracklib2 (2.8.12-7) unstable; urgency=low
+
+ * fixes global name 'default_dictpath' is not defined (Closes: #499013)
+
+ -- Jan Dittberner <jan at dittberner.info> Mon, 15 Sep 2008 20:45:25 +0200
+
cracklib2 (2.8.12-6) unstable; urgency=low
* add debian/libcrack2.symbols containing versioned symbols for
Modified: cracklib2/trunk/debian/patches/04-improved-python-binding.patch
===================================================================
--- cracklib2/trunk/debian/patches/04-improved-python-binding.patch 2008-09-10 21:31:00 UTC (rev 48)
+++ cracklib2/trunk/debian/patches/04-improved-python-binding.patch 2008-09-15 18:46:21 UTC (rev 49)
@@ -328,18 +328,18 @@
+ c = 0
+ else:
+ c = old[i - 1]
-+
++
+ if j == 0 or len(new) <= i:
+ d = 0
+ else:
+ d = new[j - 1]
-+
++
+ return c != d
+
+
+def distcalculate(distances, old, new, i, j):
+ tmp = 0
-+
++
+ if distances[i][j] != -1:
+ return distances[i][j]
+
@@ -360,7 +360,7 @@
+ distances = [ [] for i in range(m + 1) ]
+ for i in range(m + 1):
+ distances[i] = [ -1 for j in range(n + 1) ]
-+
++
+ for i in range(m + 1):
+ distances[i][0] = i
+ for j in range(n + 1):
@@ -379,7 +379,7 @@
+def similar(old, new):
+ if distance(old, new) >= diff_ok:
+ return 0
-+
++
+ if len(new) >= (len(old) * 2):
+ return 0
+
@@ -427,12 +427,12 @@
+ size = size - digits
+ elif digits < (dig_credit * -1):
+ return 1
-+
++
+ if up_credit >= 0:
+ size = size - uppers
+ elif uppers < (up_credit * -1):
+ return 1
-+
++
+ if low_credit >= 0:
+ size = size - lowers
+ elif lowers < (low_credit * -1):
@@ -445,18 +445,15 @@
+
+ if len(new) < size:
+ return 1
-+
++
+ return 0
+
+
+def VeryFascistCheck(new, old = None, dictpath = None):
-+ if dictpath == None:
-+ dictpath = default_dictpath
-+
+ if old != None:
+ if new == old:
+ raise ValueError, "is the same as the old one"
-+
++
+ oldmono = old.lower()
+ newmono = new.lower()
+ wrapped = old + old
@@ -467,9 +464,12 @@
+ raise ValueError, "is rotated"
+ if similar(oldmono, newmono):
+ raise ValueError, "is too similar to the old one"
-+
-+ FascistCheck(new, dictpath)
+
++ if dictpath == None:
++ FascistCheck(new)
++ else:
++ FascistCheck(new, dictpath)
++
+ if palindrome(new):
+ raise ValueError, "is a palindrome"
+ if simple(new):
More information about the Pkg-cracklib-commits
mailing list