Repository navigation
Add opt-in administrator lock restrictions - #3869
Merged
Merged
Conversation
Export all five policy switches to the shell at launch. Refuse unlock, forceReset and demo when disable_lock_ipc_unlock is set, and remove the demo keybind choice. A policy read error enables every restriction.
With disable_logind_unlock enabled, a sessionUnlocked signal leaves both an active lock and a queued lock request in place.
With disable_custom_lock_pam, password authentication uses /etc/pam.d/dankshell, falling back to /etc/pam.d/login when absent. Fingerprint and U2F are available only when their /etc/pam.d stacks, dankshell-fprint and dankshell-u2f, exist. Ignore custom PAM paths, inline factors and generated user stacks. If dankshell-u2f is absent in U2F and mode, accept the password alone and warn so the missing stack cannot leave the user locked out.
With disable_user_plugins enabled, load only the system plugin tree at /etc/xdg/quickshell/dms-plugins. Do not read or watch user plugins. Browser installs still reach the user tree and remain unloaded.
Return SETTINGS_SET_DISABLED for settings.set when disable_settings_ipc_set is enabled. Read requests remain available.
Gate the backend change on disable_logind_unlock: read Locked and LockedHint from logind on Unlock, retaining cached state on a read error. Leave the default path intact because applying this change unconditionally would change existing unlock behavior.
Member
|
/claude review |
Contributor
Claude reviewNo issues found. |
bbedward
pushed a commit
that referenced
this pull request
Oct 22, 2026
(cherry picked from commit 7781c20)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #3868 with five opt-in keys in cli-policy.json: disable_lock_ipc_unlock, disable_logind_unlock, disable_custom_lock_pam, disable_user_plugins and disable_settings_ipc_set. All default to off. A malformed or unreadable policy file enables all five restrictions.
The logind backend change is gated on disable_logind_unlock because applying it unconditionally would change the default unlock behavior. Settings “managed by policy” notices are deferred during the i18n term freeze.
With disable_custom_lock_pam, passwords use /etc/pam.d/dankshell and fall back to /etc/pam.d/login if it is absent. Fingerprint and U2F require their respective /etc/pam.d stacks. If dankshell-u2f is absent in U2F “and” mode, the password alone unlocks and a warning is logged, avoiding lockout from the missing second-factor stack.
Validation at each of the six commits: Go race tests for internal/clipolicy and internal/server/loginctl, the QML lock suite, and the Node tests pass. The Lock.qml guards have no direct tests because AGENTS.md forbids tests from loading, slicing or mocking Modules/.