From 9bd91a2a3350861f3d27bb9e920ea3390104189b Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 11 Dec 2023 16:18:23 +0300 Subject: [PATCH] import kbd-2.0.4-11.el8 --- .../kbd-2.0.4-vlock-stdin-closed-inf-loop.patch | 15 +++++++++++++++ SPECS/kbd.spec | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 SOURCES/kbd-2.0.4-vlock-stdin-closed-inf-loop.patch diff --git a/SOURCES/kbd-2.0.4-vlock-stdin-closed-inf-loop.patch b/SOURCES/kbd-2.0.4-vlock-stdin-closed-inf-loop.patch new file mode 100644 index 0000000..638b6e3 --- /dev/null +++ b/SOURCES/kbd-2.0.4-vlock-stdin-closed-inf-loop.patch @@ -0,0 +1,15 @@ +diff -up kbd-2.0.4/src/vlock/auth.c.orig kbd-2.0.4/src/vlock/auth.c +--- kbd-2.0.4/src/vlock/auth.c.orig 2016-12-19 16:01:51.000000000 +0100 ++++ kbd-2.0.4/src/vlock/auth.c 2023-03-20 09:34:06.010036016 +0100 +@@ -140,9 +140,9 @@ int get_password(pam_handle_t *pamh, con + fflush(stdout); + /* + * EOF encountered on read? +- * If not on VT, check stdin. ++ * Check stdin. + */ +- if (is_vt || isatty(STDIN_FILENO)) { ++ if (isatty(STDIN_FILENO)) { + /* Ignore error. */ + sleep(SHORT_DELAY); + break; diff --git a/SPECS/kbd.spec b/SPECS/kbd.spec index 4e62781..20db2a8 100644 --- a/SPECS/kbd.spec +++ b/SPECS/kbd.spec @@ -1,6 +1,6 @@ Name: kbd Version: 2.0.4 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Tools for configuring the console (keyboard, virtual terminals, etc.) Group: System Environment/Base @@ -30,6 +30,8 @@ Patch5: kbd-1.15.5-loadkeys-search-path.patch Patch6: kbd-2.0.2-unicode-start-font.patch # Patch7: fixes issues found by static analysis, bz 1602566 Patch7: kbd-2.0.4-covscan-fixes.patch +# Patch8: fixes vlock when console or terminal is closed abruptly, bz 2178798 +Patch8: kbd-2.0.4-vlock-stdin-closed-inf-loop.patch BuildRequires: bison, flex, gettext, pam-devel, check-devel BuildRequires: console-setup, xkeyboard-config @@ -73,6 +75,7 @@ cp -fp %{SOURCE6} . %patch5 -p1 -b .loadkeys-search-path %patch6 -p1 -b .unicode-start-font %patch7 -p1 -b .covscan-fixes +%patch8 -p1 -b .vlock-stdin-closed-inf-loop # 7-bit maps are obsolete; so are non-euro maps pushd data/keymaps/i386 @@ -198,6 +201,10 @@ make check /lib/kbd/keymaps/legacy %changelog +* Tue Apr 18 2023 Vitezslav Crhonek - 2.0.4-11 +- Fix vlock when console or terminal is closed abruptly + Resolves: #2178798 + * Wed Jun 17 2020 Vitezslav Crhonek - 2.0.4-10 - Add %%check, rebuild