diff --git a/debian/patches/debian/Warn-when-badname-and-variants-are-given.patch b/debian/patches/debian/Warn-when-badname-and-variants-are-given.patch index 7751eb47..464040eb 100644 --- a/debian/patches/debian/Warn-when-badname-and-variants-are-given.patch +++ b/debian/patches/debian/Warn-when-badname-and-variants-are-given.patch @@ -80,7 +80,7 @@ index bbc9859..5446f35 100644 case 'c': if (!VALID (optarg)) { diff --git a/src/usermod.c b/src/usermod.c -index e8c9da6..dc88776 100644 +index e26f011..f0f6234 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -396,7 +396,7 @@ usage (int status) diff --git a/debian/patches/debian/configure.ac-align-exec_prefix-with-prefix.patch b/debian/patches/debian/configure.ac-align-exec_prefix-with-prefix.patch index b75584d7..a8b5f729 100644 --- a/debian/patches/debian/configure.ac-align-exec_prefix-with-prefix.patch +++ b/debian/patches/debian/configure.ac-align-exec_prefix-with-prefix.patch @@ -9,7 +9,7 @@ Reported as https://github.com/shadow-maint/shadow/issues/1229 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index b3dd34d..bbda154 100644 +index 7727d1c..b5114e8 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_SUBST([LIBSUBID_ABI], [libsubid_abi]) diff --git a/debian/patches/debian/lib-chkhash.c-is_valid_hash-Accept-as-the-hash.patch b/debian/patches/debian/lib-chkhash.c-is_valid_hash-Accept-as-the-hash.patch deleted file mode 100644 index 461368fb..00000000 --- a/debian/patches/debian/lib-chkhash.c-is_valid_hash-Accept-as-the-hash.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Alejandro Colomar -Date: Wed, 7 Jan 2026 23:44:26 +0100 -Subject: lib/chkhash.c: is_valid_hash(): Accept '*' as the hash - -This is widely accepted as an invalid hash, to remove password access -for an account (that is, no passwords will match the "hash"). - -Fixes: c44f1e096a19 (2025-07-20; "chpasswd: Check hash before write when using -e") -Closes: -Closes: -Reported-by: Chris Hofstaedtler -Cc: vinz -Signed-off-by: Alejandro Colomar ---- - lib/chkhash.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/chkhash.c b/lib/chkhash.c -index 4bf98f8..46b3863 100644 ---- a/lib/chkhash.c -+++ b/lib/chkhash.c -@@ -8,6 +8,7 @@ - #include - - #include "string/strcmp/strprefix.h" -+#include "string/strcmp/streq.h" - - /* - * match_regex - return true if match, false if not -@@ -42,6 +43,9 @@ is_valid_hash(const char *hash) - - hash = strprefix(hash, "!") ?: hash; - -+ if (streq(hash, "*")) -+ return true; -+ - // Minimum hash length - if (strlen(hash) < 13) - return false; diff --git a/debian/patches/series b/debian/patches/series index e18febf1..95409933 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,5 +8,3 @@ 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 -upstream/lib-chkhash.c-is_valid_hash-Accept-a-leading.patch -debian/lib-chkhash.c-is_valid_hash-Accept-as-the-hash.patch diff --git a/debian/patches/upstream/lib-chkhash.c-is_valid_hash-Accept-a-leading.patch b/debian/patches/upstream/lib-chkhash.c-is_valid_hash-Accept-a-leading.patch deleted file mode 100644 index 325331ed..00000000 --- a/debian/patches/upstream/lib-chkhash.c-is_valid_hash-Accept-a-leading.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Alejandro Colomar -Date: Wed, 7 Jan 2026 23:39:53 +0100 -Subject: lib/chkhash.c: is_valid_hash(): Accept a leading '!' - -A leading '!' means that the account is locked. - -Fixes: c44f1e096a19 (2025-07-20; "chpasswd: Check hash before write when using -e") -Link: -Link: -Reported-by: Chris Hofstaedtler -Cc: vinz -Signed-off-by: Alejandro Colomar ---- - lib/chkhash.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/lib/chkhash.c b/lib/chkhash.c -index 6687050..4bf98f8 100644 ---- a/lib/chkhash.c -+++ b/lib/chkhash.c -@@ -7,6 +7,7 @@ - #include - #include - -+#include "string/strcmp/strprefix.h" - - /* - * match_regex - return true if match, false if not -@@ -37,6 +38,10 @@ match_regex(const char *pattern, const char *string) - bool - is_valid_hash(const char *hash) - { -+ const char *p; -+ -+ hash = strprefix(hash, "!") ?: hash; -+ - // Minimum hash length - if (strlen(hash) < 13) - return false;