From f321f5610920e97c7a942c3b72532a08c4010bef Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 28 Aug 2025 08:08:30 -0400 Subject: [PATCH] Make more windows content executable Other files use the executable bit as an indication of whether to run or not. --- confluent_server/confluent/osimage.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 89c94d08..b1676f3d 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -668,11 +668,12 @@ def fixup_windows(targpath): # manifests as following the executable bit for root, _, files in os.walk(targpath): for fname in files: - if fname.endswith('.exe'): - fpath = os.path.join(root, fname) - if is_windows_executable(fpath): - st = os.stat(fpath) - os.chmod(fpath, st.st_mode | 0o111) + for ext in ('.exe', '.dll', '.sys', '.mui', '.efi'): + if fname.endswith(ext): + fpath = os.path.join(root, fname) + if is_windows_executable(fpath): + st = os.stat(fpath) + os.chmod(fpath, st.st_mode | 0o111) def check_coreos(isoinfo): arch = 'x86_64' # TODO: would check magic of vmlinuz to see which arch