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

fix: remove Immutable flag before writing efi vars #79

Merged
merged 1 commit into from
Feb 11, 2024
Merged

Conversation

pitaj
Copy link
Contributor

@pitaj pitaj commented Jan 29, 2024

EFI vars are marked as Immutable on many Linux systems. In those cases, the library would fail to write variables.

This change fixes that by removing the Immutable flag beforehand, and adding it back afterwards. It's essentially equivalent to the commands:

chattr -i /sys/firmware/efi/efivars/$VAR
# write to variable...
chattr +i /sys/firmware/efi/efivars/$VAR

@pitaj pitaj requested a review from iTrooz as a code owner January 29, 2024 05:53
@iTrooz iTrooz merged commit 2a9e699 into iTrooz:main Feb 11, 2024
5 checks passed
@iTrooz
Copy link
Owner

iTrooz commented Feb 11, 2024

Thank you :)

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.

2 participants