fix(credentials): run sudo without a password when the account has none
A passwordless sudo setup (NOPASSWD, or an account without a password) was still asked for a password: leaving the field empty never satisfied the gate, so the dialog reopened and the operation could not run at all. The gate now asks sudo itself (`sudo -n true`) and lets the request through when it needs nothing, privileged commands fall back to `sudo -n` when no password is held, and an empty field cancels instead of looping. Releasing the lock records its own pending request so an answered prompt is replayed rather than lost.
This commit is contained in:
9 files changed
+131
-24
No files matched your search
@@ -74,6 +74,12 @@ refusé (« incorrect password », « authentication failure ») est **oublié
|
||||
immédiatement** : la prochaine tentative repose la question au lieu de réutiliser
|
||||
un secret faux.
|
||||
|
||||
Sans mot de passe (`sudo` en `NOPASSWD`, compte sans mot de passe), rien n'est
|
||||
demandé : l'application vérifie avec `sudo -n true` que sudo accepte la session,
|
||||
puis lance les commandes avec `sudo -n`. Sur une machine qui exige un mot de
|
||||
passe, `sudo -n` échoue aussitôt — l'échec est remonté comme une erreur
|
||||
d'authentification au lieu d'attendre une réponse que personne ne peut donner.
|
||||
|
||||
## Verrou de la base pacman (`/var/lib/pacman/db.lck`)
|
||||
|
||||
Si pacman refuse de démarrer, le core cherche **qui** tient le verrou, dans cet
|
||||
|
||||
Reference in new issue
Block a user