Package: python-cracklib
Version: 2.8.15-1
Severity: wishlist
Tags: patch

The Python binding for cracklib does not use the available
translations of cracklib. The attached patch (from cracklib's upstream
svn r152) fixes this behaviour.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-cracklib depends on:
ii  cracklib-runtime              2.8.15-1   runtime support for password check
ii  libc6                         2.10.1-7   GNU C Library: Shared libraries
ii  libcrack2                     2.8.15-1   pro-active password checker librar
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-support                1.0.4      automated rebuilding support for P
Author: Jan Dittberner <j...@dittberner.info>
Description: use translations in Python extension
 .
 * python/_cracklibmodule.c:
  - add calls to gettext functions to use cracklib's translations
--- a/python/_cracklibmodule.c
+++ b/python/_cracklibmodule.c
@@ -32,6 +32,7 @@
 #include <pthread.h>
 #endif
 #include <crack.h>
+#include <locale.h>
 
 #ifdef HAVE_PTHREAD_H
 static pthread_mutex_t cracklib_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -131,6 +132,9 @@ _cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs)
         free(dictfile);
     }
 
+       setlocale(LC_ALL, "");
+       textdomain("cracklib");
+
     LOCK();
     result = FascistCheck(candidate, dict ? dict : defaultdict);
     UNLOCK();

Attachment: signature.asc
Description: Digital signature

Reply via email to