This commit is contained in:
sulincix committed 2024-09-23 22:01:59 +00:00
1 parent dc42ff9882
commit e65f23e8f0
23 files changed
+48 -278

No files matched your search

@@ -1,46 +0,0 @@
From b2a29a2537d11193546c5b85da9566c50c6e2af2 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 f5c3c05..10a6fcc 100644
--- a/greeter/main.cpp
+++ b/greeter/main.cpp
@@ -56,6 +56,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
@@ -94,6 +100,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);
QCoreApplication::setApplicationName(QStringLiteral("kscreenlocker_greet"));
QCoreApplication::setApplicationVersion(QStringLiteral("0.1"));
--
2.41.0
@@ -1,16 +0,0 @@
#%PAM-1.0
auth substack fingerprint-auth
auth include postlogin
account required pam_nologin.so
account include fingerprint-auth
password include fingerprint-auth
session required pam_selinux.so close
session required pam_loginuid.so
session optional pam_keyinit.so force revoke
session required pam_namespace.so
session include fingerprint-auth
session include postlogin
-10
View File
@@ -1,10 +0,0 @@
#%PAM-1.0
auth required pam_nologin.so
auth required pam_permit.so
account include system-auth
password include system-auth
session include system-auth
-11
View File
@@ -1,11 +0,0 @@
#%PAM-1.0
auth required pam_nologin.so
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
-42
View File
@@ -1,42 +0,0 @@
#!/usr/bin/env bash
name='kscreenlocker'
release='3'
version='6.1.5'
url='https://kde.org/plasma-desktop'
description='Library and components for secure lock screen architecture'
email='brkt8khn@gmail.com'
maintainer='brkt8khn'
license=('GPLv2')
source=("https://download.kde.org/stable/plasma/${version}/kscreenlocker-${version}.tar.xz"
"kde.pam"
"kde-np.pam"
"kde-fingerprint.pam")
depends=(kconfig kcoreaddons kcrash kdeclarative kglobalaccel ki18n kidletime kio kirigami knotifications kpackage ksvg
kwindowsystem kxmlgui layer-shell-qt libkscreen libX11 libxcb libXi pam libplasma qt6-base qt6-declarative wayland
xcb-util-keysyms)
makedepends=(extra-cmake-modules kdoctools kcmutils)
sha256sums=('a0ea8354122a28e0acc6ec604a7658fee5b00f125cc09ea758c9b91bf3c7f0fc' 'SKIP' 'SKIP' 'SKIP')
group=(kde.extra)
uses=()
arch=('x86_64')
cd $name-$version
setup () {
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_TESTING=OFF
}
build () {
cmake --build build
}
package () {
INSTALL_ROOT="$DESTDIR" cmake --install build
install -Dm644 ../kde.pam "$DESTDIR"/etc/pam.d/kde
install -Dm644 ../kde-np.pam "$DESTDIR"/etc/pam.d/kde-np
install -Dm644 ../kde-fingerprint.pam "$DESTDIR"/etc/pam.d/kde-fingerprint
}