diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-03-28 22:17:39 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-03-30 22:03:01 +0100 |
commit | ffcf0678eb4119b6b58aa60fcaf25a22dd8489cd (patch) | |
tree | 4458e5449b3055f518d011f72b7635943aa529b5 /kde-plasma | |
parent | sys-fs/mdadm: fix build with USE=-udev (diff) | |
download | gentoo-ffcf0678eb4119b6b58aa60fcaf25a22dd8489cd.tar.gz gentoo-ffcf0678eb4119b6b58aa60fcaf25a22dd8489cd.tar.bz2 gentoo-ffcf0678eb4119b6b58aa60fcaf25a22dd8489cd.zip |
kde-plasma/kscreenlocker: Silence optional pam modules warnings
Also backport upstream commit 3105518ec3bc3ac88374e2c3b204f23feda91b5b
to fix a race condition.
See also:
https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/150
Closes: https://bugs.gentoo.org/927032
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma')
-rw-r--r-- | kde-plasma/kscreenlocker/files/kde-fingerprint.pam (renamed from kde-plasma/kscreenlocker/files/kde6-fingerprint.pam) | 2 | ||||
-rw-r--r-- | kde-plasma/kscreenlocker/files/kde-r1.pam (renamed from kde-plasma/kscreenlocker/files/kde6.pam) | 0 | ||||
-rw-r--r-- | kde-plasma/kscreenlocker/files/kde-smartcard.pam (renamed from kde-plasma/kscreenlocker/files/kde6-smartcard.pam) | 2 | ||||
-rw-r--r-- | kde-plasma/kscreenlocker/files/kscreenlocker-6.0.3-fix-lockscreen-race.patch | 47 | ||||
-rw-r--r-- | kde-plasma/kscreenlocker/kscreenlocker-6.0.3-r1.ebuild (renamed from kde-plasma/kscreenlocker/kscreenlocker-6.0.3.ebuild) | 9 |
5 files changed, 54 insertions, 6 deletions
diff --git a/kde-plasma/kscreenlocker/files/kde6-fingerprint.pam b/kde-plasma/kscreenlocker/files/kde-fingerprint.pam index 38267de65e32..6ca0ba1f09e6 100644 --- a/kde-plasma/kscreenlocker/files/kde6-fingerprint.pam +++ b/kde-plasma/kscreenlocker/files/kde-fingerprint.pam @@ -3,7 +3,7 @@ auth required pam_shells.so auth required pam_nologin.so auth required pam_faillock.so preauth -auth required pam_fprintd.so +-auth required pam_fprintd.so auth required pam_env.so account include system-local-login diff --git a/kde-plasma/kscreenlocker/files/kde6.pam b/kde-plasma/kscreenlocker/files/kde-r1.pam index ce9e84d58840..ce9e84d58840 100644 --- a/kde-plasma/kscreenlocker/files/kde6.pam +++ b/kde-plasma/kscreenlocker/files/kde-r1.pam diff --git a/kde-plasma/kscreenlocker/files/kde6-smartcard.pam b/kde-plasma/kscreenlocker/files/kde-smartcard.pam index f887c7823432..694fc1e905b0 100644 --- a/kde-plasma/kscreenlocker/files/kde6-smartcard.pam +++ b/kde-plasma/kscreenlocker/files/kde-smartcard.pam @@ -3,7 +3,7 @@ auth required pam_shells.so auth required pam_nologin.so auth required pam_faillock.so preauth -auth required pam_pkcs11.so wait_for_card card_only +-auth required pam_pkcs11.so wait_for_card card_only auth required pam_env.so account include system-local-login diff --git a/kde-plasma/kscreenlocker/files/kscreenlocker-6.0.3-fix-lockscreen-race.patch b/kde-plasma/kscreenlocker/files/kscreenlocker-6.0.3-fix-lockscreen-race.patch new file mode 100644 index 000000000000..45976e0e1a14 --- /dev/null +++ b/kde-plasma/kscreenlocker/files/kscreenlocker-6.0.3-fix-lockscreen-race.patch @@ -0,0 +1,47 @@ +From 3105518ec3bc3ac88374e2c3b204f23feda91b5b Mon Sep 17 00:00:00 2001 +From: Dmitriy Konev <ddkonev@gmail.com> +Date: Sun, 18 Jun 2023 16:42:56 +0300 +Subject: [PATCH] Prevent finishing greeter by unhandled signals + +We have time gap between main() start and KSignalHandler registration +in which signals will close greeter + +First this bug tried to fix in commit c63287ca1250d60f61c4429cbeb0215f5c3bebde +but placing KSignalHandler registration at start of main() is bad idea +because it broke mechanism for handling signals at all +and this behaviour was fixed in commit 448df7517021b9c2e68de161008ebc180363abed +by moving handlers bellow +for this reason we have this time gap +--- + greeter/main.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/greeter/main.cpp b/greeter/main.cpp +index bf95cd1e..0693646e 100644 +--- a/greeter/main.cpp ++++ b/greeter/main.cpp +@@ -57,6 +57,12 @@ static void signalHandler(int signum) + + int main(int argc, char *argv[]) + { ++ sigset_t blockedSignals; ++ sigemptyset(&blockedSignals); ++ sigaddset(&blockedSignals, SIGTERM); ++ sigaddset(&blockedSignals, SIGUSR1); ++ pthread_sigmask(SIG_BLOCK, &blockedSignals, NULL); ++ + LayerShellQt::Shell::useLayerShell(); + + // disable ptrace on the greeter +@@ -101,6 +107,8 @@ int main(int argc, char *argv[]) + // only connect signal handler once we can actual handle the signal properly + QObject::connect(KSignalHandler::self(), &KSignalHandler::signalReceived, &app, &signalHandler); + ++ pthread_sigmask(SIG_UNBLOCK, &blockedSignals, NULL); ++ + app.setQuitOnLastWindowClosed(false); + app.setQuitLockEnabled(false); + QCoreApplication::setApplicationName(QStringLiteral("kscreenlocker_greet")); +-- +GitLab + diff --git a/kde-plasma/kscreenlocker/kscreenlocker-6.0.3.ebuild b/kde-plasma/kscreenlocker/kscreenlocker-6.0.3-r1.ebuild index b65bf54f7c03..ba8ff49e64d2 100644 --- a/kde-plasma/kscreenlocker/kscreenlocker-6.0.3.ebuild +++ b/kde-plasma/kscreenlocker/kscreenlocker-6.0.3-r1.ebuild @@ -58,6 +58,8 @@ BDEPEND=" " PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:*" +PATCHES=( "${FILESDIR}/${P}-fix-lockscreen-race.patch" ) + src_prepare() { ecm_src_prepare use test || cmake_run_in greeter cmake_comment_add_subdirectory autotests @@ -74,8 +76,7 @@ src_test() { src_install() { ecm_src_install - local config - for config in kde6{,-fingerprint,-smartcard} ; do - newpamd "${FILESDIR}/${config}.pam" ${config/6} - done + newpamd "${FILESDIR}/kde-r1.pam" kde + newpamd "${FILESDIR}/kde-fingerprint.pam" kde-fingerprint + newpamd "${FILESDIR}/kde-smartcard.pam" kde-smartcard } |