Control: tags -1 pending On 1/12/23 08:10, Bas Couwenberg wrote:
The attached patch resolves the issue by using python3-passlib which has a pure Python implementation to fall back on when the crypt module is not available.
I've uploaded a 0-day NMU with the patch from this issue. The changes are attached and pushed to the repo on Salsa: https://salsa.debian.org/debian/dovecot/-/commits/debian/1%252.3.19.1+dfsg1-2.1 Kind Regards, Bas -- GPG Key ID: 4096R/6750F10AE88D4AF1 Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
diff --git a/debian/changelog b/debian/changelog index 14c1e62e2..22c9a9ce8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +dovecot (1:2.3.19.1+dfsg1-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * [b02ebc9] Don't use deprecated crypt module. + (closes: #1028513) + + -- Bas Couwenberg <sebas...@debian.org> Fri, 20 Jan 2023 07:01:26 +0100 + dovecot (1:2.3.19.1+dfsg1-2) unstable; urgency=medium [ Christian Göttsche ] diff --git a/debian/tests/control b/debian/tests/control index 106e5d04a..496cfcc0b 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -11,4 +11,4 @@ Restrictions: needs-root, breaks-testbed, allow-stderr Tests: testmails Restrictions: needs-root, breaks-testbed -Depends: dovecot-imapd, dovecot-pop3d, lsb-release, python3 +Depends: dovecot-imapd, dovecot-pop3d, lsb-release, python3, python3-passlib diff --git a/debian/tests/testmails b/debian/tests/testmails index 71ae3caab..3329809b5 100755 --- a/debian/tests/testmails +++ b/debian/tests/testmails @@ -1,6 +1,5 @@ #!/usr/bin/python3 -import crypt import grp import imaplib import os @@ -13,6 +12,8 @@ import subprocess import sys import unittest +from passlib.hash import des_crypt + def random_string(length): '''Return a random string, consisting of ASCII letters, with given @@ -57,7 +58,7 @@ class TestUser: self.salt = random_string(2) self.password = random_string(8) - self.crypted = crypt.crypt(self.password, self.salt) + self.crypted = des_crypt.using(salt=self.salt).hash(self.password) subprocess.check_call(['useradd', '-p', self.crypted, '-m', login])