From 8ea3108a7885e160cbc6ef865c992c345ead76e8 Mon Sep 17 00:00:00 2001 From: Alexey Berezhok Date: Thu, 8 Feb 2024 18:24:51 +0300 Subject: [PATCH] Added support displaing of GOST Yescrypt --- ...d-support-displaing-of-GOST-Yescrypt.patch | 42 +++++++++++++++++++ SPECS/passwd.spec | 9 ++-- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 SOURCES/0001-Added-support-displaing-of-GOST-Yescrypt.patch diff --git a/SOURCES/0001-Added-support-displaing-of-GOST-Yescrypt.patch b/SOURCES/0001-Added-support-displaing-of-GOST-Yescrypt.patch new file mode 100644 index 0000000..472d27f --- /dev/null +++ b/SOURCES/0001-Added-support-displaing-of-GOST-Yescrypt.patch @@ -0,0 +1,42 @@ +From e4747f56c843f080373abe876f097849b58201d4 Mon Sep 17 00:00:00 2001 +From: Alexey Berezhok +Date: Thu, 8 Feb 2024 18:12:15 +0300 +Subject: [PATCH] Added support displaing of GOST Yescrypt + +--- + libuser.c | 3 +++ + po/ru.po | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/libuser.c b/libuser.c +index 06c6200..a37ba66 100644 +--- a/libuser.c ++++ b/libuser.c +@@ -300,6 +300,9 @@ pwdb_display_status(const char *username) + } else if (strncmp(current, "$6$", 3) == + 0) { + msg = _("Password set, SHA512 crypt."); ++ } else if (strncmp(current, "$gy$", 4) == ++ 0) { ++ msg = _("Password set, GOST Yescrypt crypt."); + } else { + msg = _("Password set, unknown crypt variant."); + } +diff --git a/po/ru.po b/po/ru.po +index 01c8fae..d65826c 100644 +--- a/po/ru.po ++++ b/po/ru.po +@@ -67,6 +67,10 @@ msgstr "Пароль задан, шифр SHA256" + msgid "Password set, SHA512 crypt." + msgstr "Пароль задан, шифр SHA512" + ++#: libuser.c:305 ++msgid "Password set, GOST Yescrypt crypt." ++msgstr "Пароль задан, шифр GOST Yescrypt" ++ + #: libuser.c:302 + msgid "Password set, unknown crypt variant." + msgstr "Пароль задан, шифр неизвестен" +-- +2.43.0 + diff --git a/SPECS/passwd.spec b/SPECS/passwd.spec index 0a6d98e..0b2eb87 100644 --- a/SPECS/passwd.spec +++ b/SPECS/passwd.spec @@ -7,13 +7,14 @@ Summary: An utility for setting or changing passwords using PAM Name: passwd Version: 0.80 -Release: 4%{?dist} +Release: 4%{?dist}.inferit License: BSD or GPL+ Group: System Environment/Base URL: https://pagure.io/passwd Source: https://releases.pagure.org/passwd/passwd-%{version}.autotoolized.tar.bz2 Patch0: passwd-0.80-manpage.patch Patch1: passwd-0.80-S-output.patch +Patch2: 0001-Added-support-displaing-of-GOST-Yescrypt.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: pam >= 1.0.90, /etc/pam.d/system-auth %if %{WITH_SELINUX} @@ -38,6 +39,7 @@ Modules) library. %setup -q -n %{name}-%{version} %patch0 -p1 -b .manpage %patch1 -p1 -b .S-output +%patch2 -p1 -b .GOST-Yescrypt %build %configure \ @@ -52,6 +54,7 @@ Modules) library. --without-audit %endif make DEBUG= RPM_OPT_FLAGS="$RPM_OPT_FLAGS" +msgfmt po/ru.po -o po/ru.gmo %install rm -rf $RPM_BUILD_ROOT @@ -77,8 +80,8 @@ done %{_mandir}/man1/passwd.1* %changelog -* Wed Jul 26 2023 MSVSphere Packaging Team - 0.80-4 -- Rebuilt for MSVSphere 8.8 +* Thu Feb 08 2024 Alexey Berezhok - 0.80-4.inferit +- Added support displaing of GOST Yescrypt * Mon Feb 07 2022 Jiri Kucera - 0.80-4 - Rebuild due to migrated tests