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

security: Only show prompt when unlocking #45

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Conversation

crawfxrd
Copy link
Member

Do not show the unlock prompt when the system is already unlocked or preparing to lock.

Do not show the unlock prompt when the system is already unlocked or
preparing to lock.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
@crawfxrd crawfxrd marked this pull request as ready for review June 18, 2024 19:24
@crawfxrd crawfxrd requested review from jackpot51 and a team June 18, 2024 19:24
@leviport leviport self-assigned this Jun 19, 2024
Copy link
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now only see the prompt when the state is PrepareUnlock.

If the state is PrepareUnlock but I've only rebooted the machine, I still get a pointless prompt, since completing this prompt does not change the state from PrepareUnlock. This makes the ectool script seem broken. However, if I shut down like the prompt tells me to, the state does change like it should after I complete the prompt.

Another observation: after locking or unlocking with the ectool script and shutting down, the machine reboots itself automatically without having to press the power button. This doesn't really have anything to do with this PR, but I found it interesting enough to mention.

@crawfxrd
Copy link
Member Author

Machine must be shutdown after unlocking to go from PREPARE_UNLOCK to UNLOCK. The EC has special logic to set ME_WE and automatically power back on.

@jackpot51 jackpot51 merged commit 771911a into master Jun 24, 2024
1 check passed
@jackpot51 jackpot51 deleted the unlock-prompt branch June 24, 2024 19:36
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

Successfully merging this pull request may close these issues.

None yet

3 participants