fix: PAM-Fingerprint hart verdrahtet, Greeter bewusst ohne Finger

This commit is contained in:
humocs-man committed 2026-10-05 17:42:31 +02:00
1 parent 0ca77f021c
commit ecf81aafb5
2 files changed
+37 -4

No files matched your search

+2
View File
@@ -171,6 +171,8 @@ RUN set -u; \
grep -q 'pam_gnome_keyring\.so' /etc/pam.d/greetd || { echo "FEHLER: Keyring-PAM in /etc/pam.d/greetd fehlt"; exit 1; }; \
test -f /usr/lib64/security/pam_gnome_keyring.so || { echo "FEHLER: pam_gnome_keyring.so fehlt (Paket gnome-keyring-pam?)"; exit 1; }; \
test -f /usr/lib64/security/pam_fprintd.so || { echo "FEHLER: pam_fprintd.so fehlt (Paket fprintd-pam?)"; exit 1; }; \
grep -q 'pam_fprintd\.so' /etc/pam.d/system-auth || { echo "FEHLER: pam_fprintd fehlt in system-auth (authselect with-fingerprint?)"; exit 1; }; \
grep -Eq '^auth[[:space:]]+(substack|include)[[:space:]]+system-auth' /etc/pam.d/greetd && { echo "FEHLER: greetd nutzt system-auth mit Fingerprint (Keyring wuerde nie entsperren)"; exit 1; } || true; \
wrapper="$(command -v noctalia-greeter-session || true)"; \
echo "Gefundener Wrapper: ${wrapper}"; \
test -n "${wrapper}" || { echo "FEHLER: noctalia-greeter-session nicht installiert (Terra-Repo/includepkgs pruefen)"; exit 1; }; \
+35 -4
View File
@@ -30,10 +30,11 @@ dnf5 install -y \
dnf5 clean all
# Fingerprint (Framework u.a.): System-Auth per authselect erweitern, damit
# sudo/Polkit/login-Pfade Finger anbieten (nach fprintd-enroll auf Hardware).
# Greeter-PAM (/etc/pam.d/greetd) bewusst NICHT angefasst: Feinschliff erst
# auf echter Hardware mit Reader testbar, kein VM-Test moeglich.
authselect enable-feature with-fingerprint || echo "WARN: with-fingerprint nicht aktivierbar - auf Hardware pruefen"
# sudo/Polkit Finger anbieten (nach fprintd-enroll auf Hardware).
# Hart fehlschlagen statt WARN: Ein Image ohne pam_fprintd im Stack baut
# still einen kaputten Finger-Login (D-Bus-Geste ohne PAM-Wirkung).
authselect enable-feature with-fingerprint
grep -q 'pam_fprintd\.so' /etc/pam.d/system-auth || { echo "FEHLER: pam_fprintd fehlt in /etc/pam.d/system-auth trotz with-fingerprint"; exit 1; }
# accounts-daemon: liefert User-Avatare auf dem Login-Screen.
systemctl enable accounts-daemon.service
@@ -74,6 +75,36 @@ session optional pam_gnome_keyring.so auto_start
EOF
fi
# Greeter bewusst OHNE Fingerprint (eigene, fingerprint-freie Auth-Service,
# vgl. Noctalia-Doku "Fingerprint blocks password login"): system-auth
# enthaelt pam_fprintd (siehe oben). Am Login wuerde der Finger nie das
# Passwort liefern -> Keyring bliebe zu -> zweite Abfrage nach dem Login.
# Login daher nur per Passwort (Keyring oeffnet mit); Finger gilt fuer
# sudo/Polkit/Sperrbildschirm. Nur die auth-Zeile wird ersetzt, account/
# password/session-Includes bleiben (kein Finger-Prompt dort).
if grep -Eq '^auth[[:space:]]+(substack|include)[[:space:]]+system-auth' /etc/pam.d/greetd; then
python3 - <<'PYEOF'
import re
p = "/etc/pam.d/greetd"
text = open(p).read()
replacement = (
"# fluffy-pancake: fingerprint-freier Auth-Stack NUR fuer greetd.\n"
"# (system-auth mit pam_fprintd wuerde Finger-Login ohne Keyring-Unlock\n"
"# bedeuten. faillock bewusst weggelassen wie im Profil ohne with-faillock.)\n"
"auth required pam_env.so\n"
"auth required pam_faildelay.so delay=2000000\n"
"auth sufficient pam_unix.so nullok\n"
"auth required pam_deny.so\n"
)
new, n = re.subn(r'^auth[ \t]+(?:substack|include)[ \t]+system-auth[ \t]*\r?$', replacement.rstrip("\n"), text, count=1, flags=re.M)
assert n == 1, "auth system-auth-Zeile in /etc/pam.d/greetd nicht gefunden"
open(p, "w").write(new)
print("greetd-PAM: fingerprint-freier Auth-Stack gesetzt")
PYEOF
fi
grep -Eq '^auth[[:space:]]+(substack|include)[[:space:]]+system-auth' /etc/pam.d/greetd && { echo "FEHLER: auth system-auth-Include noch in /etc/pam.d/greetd"; exit 1; }
grep -q 'pam_gnome_keyring\.so' /etc/pam.d/greetd || { echo "FEHLER: Keyring-PAM fehlt in /etc/pam.d/greetd"; exit 1; }
# bootc-Hygiene: /var-Inhalte aus dem Build werden beim Deployment verworfen
# und wuerden nur den var-tmpfiles-Lint triggern. Die /etc-Anteile des Setups
# (PAM) bleiben erhalten; /var/lib/noctalia-greeter wird zur Laufzeit via