From d44d58db86a4e616f13fdfc35d5e3b80a188cc8f Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Wed, 7 Jan 2026 11:08:05 +0100 Subject: [PATCH] chpasswd: Disable broken hash check, bug #1124835 --- .../chpasswd-Disable-broken-hash-check.patch | 34 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 35 insertions(+) create mode 100644 debian/patches/debian/chpasswd-Disable-broken-hash-check.patch diff --git a/debian/patches/debian/chpasswd-Disable-broken-hash-check.patch b/debian/patches/debian/chpasswd-Disable-broken-hash-check.patch new file mode 100644 index 00000000..d4b4625d --- /dev/null +++ b/debian/patches/debian/chpasswd-Disable-broken-hash-check.patch @@ -0,0 +1,34 @@ +From: Chris Hofstaedtler +Date: Wed, 7 Jan 2026 11:07:34 +0100 +Subject: chpasswd: Disable broken hash check + +See Debian bug #1124835. +--- + src/chpasswd.c | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/src/chpasswd.c b/src/chpasswd.c +index ea96dc7..8d24ae6 100644 +--- a/src/chpasswd.c ++++ b/src/chpasswd.c +@@ -574,20 +574,6 @@ int main (int argc, char **argv) + #endif /* USE_PAM */ + { + +- /* +- * Prevent adding a non valid hash to /etc/shadow and +- * potentialy lock account +- */ +- +- if (eflg) { +- if (!is_valid_hash(newpwd)) { +- fprintf (stderr, +- _("%s: (line %jd, user %s) invalid password hash\n"), +- Prog, line, name); +- errors = true; +- continue; +- } +- } + const struct spwd *sp; + struct spwd newsp; + const struct passwd *pw; diff --git a/debian/patches/series b/debian/patches/series index 95409933..b0e00872 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ debian/Adapt-login.defs-for-Debian.patch debian/Stop-building-programs-we-do-not-install.patch debian/Warn-when-badname-and-variants-are-given.patch debian/configure.ac-align-exec_prefix-with-prefix.patch +debian/chpasswd-Disable-broken-hash-check.patch