diff --git a/backport-do-not-substract-from-UT_NAMESIZE-for-length-check.patch b/backport-do-not-substract-from-UT_NAMESIZE-for-length-check.patch new file mode 100644 index 0000000000000000000000000000000000000000..2712269af36682b30bfb9ea1e0a56ebddc00442d --- /dev/null +++ b/backport-do-not-substract-from-UT_NAMESIZE-for-length-check.patch @@ -0,0 +1,29 @@ +From f894632f15f48ad9075b19dc763622a991ff8d0b Mon Sep 17 00:00:00 2001 +From: Michal Hlavinka +Date: Wed Nov 6 11:54:15 2024 +0100 +Subject: [PATCH] do not substract from UT_NAMESIZE for length check + +--- + lib/user.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/user.c b/lib/user.c +index 42f0c53..6b1cf7a 100644 +--- a/lib/user.c ++++ b/lib/user.c +@@ -223,10 +223,10 @@ lu_name_allowed(struct lu_ent *ent, struct lu_error **error) + lu_error_new(error, lu_error_name_bad, _("name is too short")); + return FALSE; + } +- if (len > UT_NAMESIZE - 1) { ++ if (len > UT_NAMESIZE) { + lu_error_new(error, lu_error_name_bad, + _("name is too long (%zu > %d)"), len, +- UT_NAMESIZE - 1); ++ UT_NAMESIZE); + return FALSE; + } + for (i = 0; sdata[i] != '\0'; i++) { +-- +2.43.0 + diff --git a/libuser.spec b/libuser.spec index e4f67927d4e8ab7f2af7421fbe9f9b604c0d2bac..eb9770f64f62b96402d1dc6cdbdea87b34484028 100644 --- a/libuser.spec +++ b/libuser.spec @@ -1,11 +1,12 @@ Name: libuser Version: 0.64 -Release: 2 +Release: 3 Summary: A user and group account administration library License: LGPLv2+ URL: https://pagure.io/libuser Source: http://releases.pagure.org/libuser/libuser-%{version}.tar.gz +Patch6000: backport-do-not-substract-from-UT_NAMESIZE-for-length-check.patch Patch9000: add-sm3-crypt-support.patch BuildRequires: cyrus-sasl-devel, linuxdoc-tools, pam-devel, popt-devel, gcc @@ -101,6 +102,9 @@ python3 -c "import libuser" %{_mandir}/man5/* %changelog +* Wed Aug 27 2025 jinshuaiyu - 0.64-3 +- backport upstream patch + * Mon Apr 29 2024 fuanan - 0.64-2 - Added 'Buildarch: noarch' to the help subpackage