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

Add cap-std, use in grubconfigs #674

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

cgwalters
Copy link
Member

Starting on #449

openat is pretty dead upstream, and especially going forward as we start to do more nontrivial file things, it's really useful to have cap-std's additional verification that we aren't accidentally escaping the root.

Starting on coreos#449

`openat` is pretty dead upstream, and especially going forward
as we start to do more nontrivial file things, it's really
useful to have cap-std's additional verification that we
aren't accidentally escaping the root.

Signed-off-by: Colin Walters <[email protected]>
@@ -85,19 +103,23 @@ pub(crate) fn install(
let vendor = PathBuf::from(vendordir);
let target = &vendor.join("grub.cfg");
let dest_efidir = target_root
.sub_dir_optional("boot/efi/EFI")
.open_dir_optional("boot/efi/EFI")
.context("Opening /boot/efi/EFI")?;
if let Some(efidir) = dest_efidir {
efidir
Copy link
Member

@HuijingHei HuijingHei Jul 1, 2024

Choose a reason for hiding this comment

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

CI error: error: boot data installation failed: Installing static GRUB configs: Copying static EFI: a path led outside of the filesystem

To copy /usr/lib/bootupd/grub2-static/grub-static-efi.cfg to boot/efi/EFI/fedora/grub.cfg, refer to doc, grub-static-efi.cfg should be relative to self, might use target_root instead of efidir, but not sure if it works as CONFIGDIR is not relative path.

@openshift-merge-robot
Copy link
Collaborator

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants