mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
refactor: Remove faillock support and related properties from settings
This commit is contained in:
@@ -545,7 +545,6 @@ Singleton {
|
|||||||
|
|
||||||
property bool enableFprint: false
|
property bool enableFprint: false
|
||||||
property int maxFprintTries: 15
|
property int maxFprintTries: 15
|
||||||
property bool lockFaillockSupported: false
|
|
||||||
property bool fprintdAvailable: false
|
property bool fprintdAvailable: false
|
||||||
property bool lockFingerprintCanEnable: false
|
property bool lockFingerprintCanEnable: false
|
||||||
property bool lockFingerprintReady: false
|
property bool lockFingerprintReady: false
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ Singleton {
|
|||||||
property int pamSupportProbeExitCode: 0
|
property int pamSupportProbeExitCode: 0
|
||||||
property bool pamFprintSupportDetected: false
|
property bool pamFprintSupportDetected: false
|
||||||
property bool pamU2fSupportDetected: false
|
property bool pamU2fSupportDetected: false
|
||||||
property bool pamFaillockSupportDetected: false
|
|
||||||
|
|
||||||
readonly property string homeDir: Quickshell.env("HOME") || ""
|
readonly property string homeDir: Quickshell.env("HOME") || ""
|
||||||
readonly property string u2fKeysPath: homeDir ? homeDir + "/.config/Yubico/u2f_keys" : ""
|
readonly property string u2fKeysPath: homeDir ? homeDir + "/.config/Yubico/u2f_keys" : ""
|
||||||
@@ -73,7 +72,6 @@ Singleton {
|
|||||||
|
|
||||||
pamFprintSupportDetected = false;
|
pamFprintSupportDetected = false;
|
||||||
pamU2fSupportDetected = false;
|
pamU2fSupportDetected = false;
|
||||||
pamFaillockSupportDetected = false;
|
|
||||||
pamSupportProbeOutput = "";
|
pamSupportProbeOutput = "";
|
||||||
pamSupportProbeStreamFinished = false;
|
pamSupportProbeStreamFinished = false;
|
||||||
pamSupportProbeExited = false;
|
pamSupportProbeExited = false;
|
||||||
@@ -321,7 +319,6 @@ Singleton {
|
|||||||
return;
|
return;
|
||||||
recomputeFingerprintCapabilities();
|
recomputeFingerprintCapabilities();
|
||||||
recomputeU2fCapabilities();
|
recomputeU2fCapabilities();
|
||||||
settingsRoot.lockFaillockSupported = pamFaillockSupportDetected;
|
|
||||||
settingsRoot.fprintdAvailable = settingsRoot.lockFingerprintReady || settingsRoot.greeterFingerprintReady;
|
settingsRoot.fprintdAvailable = settingsRoot.lockFingerprintReady || settingsRoot.greeterFingerprintReady;
|
||||||
settingsRoot.u2fAvailable = settingsRoot.lockU2fReady || settingsRoot.greeterU2fReady;
|
settingsRoot.u2fAvailable = settingsRoot.lockU2fReady || settingsRoot.greeterU2fReady;
|
||||||
}
|
}
|
||||||
@@ -339,7 +336,6 @@ Singleton {
|
|||||||
|
|
||||||
pamFprintSupportDetected = false;
|
pamFprintSupportDetected = false;
|
||||||
pamU2fSupportDetected = false;
|
pamU2fSupportDetected = false;
|
||||||
pamFaillockSupportDetected = false;
|
|
||||||
|
|
||||||
const lines = (pamSupportProbeOutput || "").trim().split(/\r?\n/);
|
const lines = (pamSupportProbeOutput || "").trim().split(/\r?\n/);
|
||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
@@ -350,8 +346,6 @@ Singleton {
|
|||||||
pamFprintSupportDetected = parts[1] === "true";
|
pamFprintSupportDetected = parts[1] === "true";
|
||||||
else if (parts[0] === "pam_u2f.so")
|
else if (parts[0] === "pam_u2f.so")
|
||||||
pamU2fSupportDetected = parts[1] === "true";
|
pamU2fSupportDetected = parts[1] === "true";
|
||||||
else if (parts[0] === "pam_faillock.so")
|
|
||||||
pamFaillockSupportDetected = parts[1] === "true";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (forcedFprintAvailable === null && fingerprintProbeState === "missing_pam_support")
|
if (forcedFprintAvailable === null && fingerprintProbeState === "missing_pam_support")
|
||||||
@@ -405,7 +399,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property var pamSupportDetectionProcess: Process {
|
property var pamSupportDetectionProcess: Process {
|
||||||
command: ["sh", "-c", "for module in pam_fprintd.so pam_u2f.so pam_faillock.so; do found=false; for dir in /usr/lib64/security /usr/lib/security /lib/security /lib/x86_64-linux-gnu/security /usr/lib/x86_64-linux-gnu/security /usr/lib/aarch64-linux-gnu/security /run/current-system/sw/lib/security; do if [ -f \"$dir/$module\" ]; then found=true; break; fi; done; printf '%s:%s\\n' \"$module\" \"$found\"; done"]
|
command: ["sh", "-c", "for module in pam_fprintd.so pam_u2f.so; do found=false; for dir in /usr/lib64/security /usr/lib/security /lib/security /lib/x86_64-linux-gnu/security /usr/lib/x86_64-linux-gnu/security /usr/lib/aarch64-linux-gnu/security /run/current-system/sw/lib/security; do if [ -f \"$dir/$module\" ]; then found=true; break; fi; done; printf '%s:%s\\n' \"$module\" \"$found\"; done"]
|
||||||
running: false
|
running: false
|
||||||
|
|
||||||
stdout: StdioCollector {
|
stdout: StdioCollector {
|
||||||
|
|||||||
@@ -355,7 +355,6 @@ var SPEC = {
|
|||||||
lockAtStartup: { def: false },
|
lockAtStartup: { def: false },
|
||||||
enableFprint: { def: false },
|
enableFprint: { def: false },
|
||||||
maxFprintTries: { def: 15 },
|
maxFprintTries: { def: 15 },
|
||||||
lockFaillockSupported: { def: false, persist: false },
|
|
||||||
fprintdAvailable: { def: false, persist: false },
|
fprintdAvailable: { def: false, persist: false },
|
||||||
lockFingerprintCanEnable: { def: false, persist: false },
|
lockFingerprintCanEnable: { def: false, persist: false },
|
||||||
lockFingerprintReady: { def: false, persist: false },
|
lockFingerprintReady: { def: false, persist: false },
|
||||||
|
|||||||
@@ -104,12 +104,10 @@ Scope {
|
|||||||
printErrors: false
|
printErrors: false
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property string bundledPasswdConfig: SettingsData.lockFaillockSupported ? "login-faillock" : "login"
|
|
||||||
|
|
||||||
PamContext {
|
PamContext {
|
||||||
id: passwd
|
id: passwd
|
||||||
|
|
||||||
config: dankshellConfigWatcher.loaded ? "dankshell" : (loginConfigWatcher.loaded ? "login" : root.bundledPasswdConfig)
|
config: dankshellConfigWatcher.loaded ? "dankshell" : "login"
|
||||||
configDirectory: (dankshellConfigWatcher.loaded || loginConfigWatcher.loaded) ? "/etc/pam.d" : Quickshell.shellDir + "/assets/pam"
|
configDirectory: (dankshellConfigWatcher.loaded || loginConfigWatcher.loaded) ? "/etc/pam.d" : Quickshell.shellDir + "/assets/pam"
|
||||||
|
|
||||||
onMessageChanged: {
|
onMessageChanged: {
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#%PAM-1.0
|
|
||||||
auth required pam_env.so
|
|
||||||
auth required pam_faillock.so preauth
|
|
||||||
auth [success=1 default=bad] pam_unix.so try_first_pass nullok
|
|
||||||
auth [default=die] pam_faillock.so authfail
|
|
||||||
auth required pam_faillock.so authsucc
|
|
||||||
account required pam_unix.so
|
|
||||||
Reference in New Issue
Block a user