ukify: fix handling signed kernel as file
authorMalte Poll <mp@edgeless.systems>
Wed, 24 May 2023 09:01:25 +0000 (11:01 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 24 May 2023 17:07:51 +0000 (18:07 +0100)
The .linux section would contain the path to the signed kernel (instead of the signed kernel itself), since the python type of the variable is used to determine how it is handled when adding the pe sections.

Co-authored-by: Otto Bittner <cobittner@posteo.net>
src/ukify/ukify.py

index d87670eb24aaa6e4c90ec6c3844656b830d85db8..60b2bf030be6d98a7dafa965d451320f3b350ad4 100755 (executable)
@@ -635,7 +635,7 @@ def make_uki(opts):
 
     if sign_kernel:
         linux_signed = tempfile.NamedTemporaryFile(prefix='linux-signed')
-        linux = linux_signed.name
+        linux = pathlib.Path(linux_signed.name)
         sign(sign_tool, opts.linux, linux, opts=opts)
     else:
         linux = opts.linux