Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require authentication for poweroff and restarts #2

Closed
WasteOfO2 opened this issue Aug 15, 2023 · 2 comments
Closed

Require authentication for poweroff and restarts #2

WasteOfO2 opened this issue Aug 15, 2023 · 2 comments

Comments

@WasteOfO2
Copy link

WasteOfO2 commented Aug 15, 2023

A malicious actor can directly power cycle the system without the owner's permission. If the user has unsaved work or is in the middle of something, this can potentially lead to data loss and corruption of the said work. Windows and Macs handle this differently by waiting for the processes to end rather than killing the processes outright as Linux does.

Remedies for the said issue could be:

  1. Not using this module
  2. Only permit user to power cycle (password authentication)
  3. Warn user regarding potential data loss if said work is not saved or backed up (a confirmation prompt) in case this was triggered accidentally

Thank you for this great program :3

@bhepple
Copy link

bhepple commented Aug 21, 2023

As a workaround, you can disable those buttons with:

gtklock <other options> --reboot-command="" --poweroff-command=""

@jovanlanik
Copy link
Owner

Password authentication seems kinda redundant... You might as well unlock the screen.
Maybe you could use swaynag (or similar) as a confirmation prompt. I wouldn't mind adding such a feature natively but I don't have time to implement it. If anyone comes up with a PR I'll be happy to merge.

@jovanlanik jovanlanik closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants