mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-30 14:22:23 +00:00
86f437d475
A node with netboot=ipxe and Secure Boot on fetches the shim of its install source over HTTP, and the server answers 403. EL media ships the EFI binaries of its boot loader mode 0700, copycds copies the media with the modes the media carries, and xCAT serves the install directory over HTTP. Measured on an AlmaLinux 10 tree: EFI/BOOT/grub.cfg is 0444 and answers 200, and BOOTX64.EFI, grubx64.efi and mmx64.efi are 0700 and answer 403. The node reports "Verification failed: Security Policy Violation" for its kernel and then "Operation not permitted" for the shim, and boots nothing. copycd gave the top directory of the copy mode 0755 and left every path under it as the media had it. Both copycd plugins now call xCAT::MediaPerms::make_readable on the copied tree, which adds read permission for the group and for others, and search permission on a directory. It adds no write permission, it adds no execute permission to a file, and it leaves a path that is already group and other readable alone, so a second call changes nothing. On the same AlmaLinux 10 tree it walks 5850 paths, 5835 files and 15 directories, and changes 3 of them: the three files above, each from 0700 to 0744. An install tree that is already copied keeps its modes until copycds runs again for that osimage, so an operator with an existing tree re-runs copycds or gives those files read permission. media_perms_readable.t covers the modes and the idempotence. Three mutations of the module each turn it red. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>