-
Notifications
You must be signed in to change notification settings - Fork 41
grubconfig: set /boot/grub2/grub.cfg file mode to 0600
#961
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
Conversation
cgwalters
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One overall issue on this is because we don't have a mechanism to update the static configs, existing systems will stay as is.
src/grubconfigs.rs
Outdated
| efidir | ||
| .copy_file(&Path::new(CONFIGDIR).join("grub-static-efi.cfg"), target) | ||
| .context("Copying static EFI")?; | ||
| efidir.set_mode(target, GRUBCONFIG_FILE_MODE)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: in the future we could use https://docs.rs/cap-std-ext/latest/cap_std_ext/dirext/trait.CapStdExtDirExt.html#tymethod.atomic_write_with_perms to do this in one step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the comment, I see your PR in #674 is using cap-std-ext, maybe we can continue that.
8d0f0f3 to
30ce64c
Compare
|
Hm, not sure offhand why the test is failing. Possibly we're not running the updated code we think we are, or the code is wrong. |
Copy Colin's comment: ``` One overall issue on this is because we don't have a mechanism to update the static configs, existing systems will stay as is. ``` See coreos#952 & https://redhat-internal.slack.com/archives/C01BSEK9PM1/p1750152540290679
30ce64c to
304d7dc
Compare
304d7dc to
e944eef
Compare
Thank you for the review! Look that the issue and find the requirement here is only related to |
0600/boot/grub2/grub.cfg file mode to 0600
Copy Colin's comment:
See #952 &
https://redhat-internal.slack.com/archives/C01BSEK9PM1/p1750152540290679