Disallow quit when locked by default
Browse files at this commitbc4b973514f1f71d08a91e3538b0b5f12c70342dParent: c87a0292 changed files +5 -3
- docs/wiki/Security-Model.md +4 -1
- src/input/mod.rs +1 -2
docs/wiki/Security-Model.mdmodified+4 -1
| @@ -53,8 +53,11 @@ When the session is locked via [ext-session-lock](https://wayland.app/protocols/ | |||
| 53 | Only a very small set of safe actions is allowed. | 53 | Only a very small set of safe actions is allowed. |
| 54 | In particular, spawning will not work, with the exception of binds explicitly configured with `allow-when-locked=true`. | 54 | In particular, spawning will not work, with the exception of binds explicitly configured with `allow-when-locked=true`. |
| 55 | 55 | ||
| 56 | +<sup>Until: next release</sup> | ||
| 56 | Importantly, the **quit** action is allowed—you can always quit niri, even when on a lock screen. | 57 | Importantly, the **quit** action is allowed—you can always quit niri, even when on a lock screen. |
| 57 | -Therefore, you must ensure that quitting niri does not drop you into an unprotected TTY commandline. | 58 | + |
| 59 | +Be careful if you allow the **quit** action, or if your lock screen has a way to exit niri. | ||
| 60 | +You must ensure that quitting niri does not drop you into an unprotected TTY commandline. | ||
| 58 | Usually, a display manager, like GDM, will do this for you: when niri exits (via the quit bind or if it crashes), it'll put you back into a safe password prompt. | 61 | Usually, a display manager, like GDM, will do this for you: when niri exits (via the quit bind or if it crashes), it'll put you back into a safe password prompt. |
| 59 | 62 | ||
| 60 | Other than quitting, the only way to exit a lock screen is for the lock screen client to tell niri to unlock the session. | 63 | Other than quitting, the only way to exit a lock screen is for the lock screen client to tell niri to unlock the session. |
src/input/mod.rsmodified+1 -2
| @@ -4799,8 +4799,7 @@ fn should_reset_pointer_inactivity_timer<I: InputBackend>(event: &InputEvent<I>) | |||
| 4799 | fn allowed_when_locked(action: &Action) -> bool { | 4799 | fn allowed_when_locked(action: &Action) -> bool { |
| 4800 | matches!( | 4800 | matches!( |
| 4801 | action, | 4801 | action, |
| 4802 | - Action::Quit(_) | 4802 | + Action::ChangeVt(_) |
| 4803 | - | Action::ChangeVt(_) | ||
| 4804 | | Action::Suspend | 4803 | | Action::Suspend |
| 4805 | | Action::PowerOffMonitors | 4804 | | Action::PowerOffMonitors |
| 4806 | | Action::PowerOnMonitors | 4805 | | Action::PowerOnMonitors |