1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

lock: add pam login fallback locally

This commit is contained in:
bbedward
2025-12-17 12:31:45 -05:00
parent 0034926df7
commit 88457ab139
2 changed files with 17 additions and 3 deletions

View File

@@ -3,7 +3,6 @@ pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Io
import Quickshell.Wayland
import Quickshell.Services.Pam import Quickshell.Services.Pam
import qs.Common import qs.Common
@@ -24,16 +23,24 @@ Scope {
signal unlockRequested signal unlockRequested
FileView { FileView {
id: pamConfigWatcher id: dankshellConfigWatcher
path: "/etc/pam.d/dankshell" path: "/etc/pam.d/dankshell"
printErrors: false printErrors: false
} }
FileView {
id: loginConfigWatcher
path: "/etc/pam.d/login"
printErrors: false
}
PamContext { PamContext {
id: passwd id: passwd
config: pamConfigWatcher.loaded ? "dankshell" : "login" config: dankshellConfigWatcher.loaded ? "dankshell" : "login"
configDirectory: dankshellConfigWatcher.loaded || loginConfigWatcher.loaded ? "/etc/pam.d" : Quickshell.shellDir + "/assets/pam"
onMessageChanged: { onMessageChanged: {
if (message.startsWith("The account is locked")) if (message.startsWith("The account is locked"))

View File

@@ -0,0 +1,7 @@
#%PAM-1.0
auth requisite pam_nologin.so
auth include system-local-login
account include system-local-login
session include system-local-login
password include system-local-login