Opt-in admin lock policy in /etc/dms/cli-policy.json
Feature Description
Add an opt-in administrator lock policy using five new booleans in /etc/dms/cli-policy.json, all off by default:
disable_lock_ipc_unlockdisable_logind_unlockdisable_custom_lock_pamdisable_user_pluginsdisable_settings_ipc_set
These would let administrators restrict DMS's lock-related interfaces independently, while preserving current behavior when the keys are absent or false.
Use Case
Managed, kiosk and shared machines where the administrator wants DMS's own interfaces unable to end or weaken a lock. This includes IPC, logind Unlock handling, user-selected PAM stacks and user plugins.
Today, applying these restrictions requires downstream patches. An upstream policy would let administrators configure them without maintaining those patches.
Compositor(s)
All compositors
Proposed Solution
Each key would have the following effect when true:
| Key | Behavior |
|---|---|
disable_lock_ipc_unlock |
Refuse the lock IPC's unlock and forceReset methods, and disable lock demo and its keybind. |
disable_logind_unlock |
Prevent onSessionUnlocked from clearing an engaged or pending lock. |
disable_custom_lock_pam |
Use only the administrator's /etc/pam.d/dankshell, /etc/pam.d/dankshell-fprint and /etc/pam.d/dankshell-u2f stacks for password, fingerprint and U2F authentication. Ignore lockPamPath, lockU2fPamPath, lockPamExternallyManaged, the lockPamInline* settings and the user-generated resolve-lock stack. |
disable_user_plugins |
Load plugins only from /etc/xdg/quickshell/dms-plugins; do not read or watch the user plugin tree. |
disable_settings_ipc_set |
Refuse IPC settings.set, while retaining get, dump and dumpSession. |
Read the keys through the existing clipolicy loader, with the administrator's /etc/dms/cli-policy.json taking precedence over the packaged /usr/share/dms/cli-policy.json.
Pass every policy value, including false values, to the shell through the launch environment. The values supplied by the launcher should take precedence over inherited values. A small QML singleton can read them once; policy changes would apply at the next shell start or managed restart. All defaults remain unchanged.
I would also offer a separate backend commit for logind Unlock state handling: read both Locked and LockedHint from logind, retaining the cached state if logind cannot be read. Whether that correction is policy-gated or unconditional is the maintainers' choice.
The initial scope would be the five switches above, delivered in one PR with one commit per switch, plus a dux-docs PR documenting the keys and their behavior. Full managed settings and requiring a root-owned UI tree would be later phases.
Alternatives/Existing Solutions
Downstream patching provides these restrictions today, but adds maintenance work whenever upstream changes the relevant code.
The disable_registries policy request and implementation (#3672 → #3703) provide a precedent for opt-in administrator restrictions through cli-policy.json.
Compositor-level and session hardening remain outside this proposal's scope. These switches constrain DMS's own behavior; they do not establish a security boundary against code already running as the session user.
I want to bring to your attention that AI-created issues are not allowed per the contributing guidelines of this project. We would appreciate you taking the time to create issues and feature requests yourself.
Just got the information that the creation of this issue was has been agreed upon with @bbedward, so it is fine in this case.