From: Colin Walters Date: Thu, 14 Dec 2023 12:57:43 +0000 (-0500) Subject: zipl: Use O_CLOEXEC X-Git-Tag: archive/raspbian/2024.8-1+rpi1^2~7^2~7^2~12^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=876ddd32b8c8c9be4e964862e608ea4b6bd37ff8;p=ostree.git zipl: Use O_CLOEXEC On general principle. --- diff --git a/src/libostree/ostree-bootloader-zipl.c b/src/libostree/ostree-bootloader-zipl.c index f92cc61d..43a74cac 100644 --- a/src/libostree/ostree-bootloader-zipl.c +++ b/src/libostree/ostree-bootloader-zipl.c @@ -142,7 +142,7 @@ _ostree_secure_boot_is_enabled (gboolean *out_enabled, GCancellable *cancellable // [ 0.023198] setup: 0000000000867000 - 0000000000868000 (not signed) // [ 0.023199] setup: 0000000000877000 - 0000000000878000 (not signed) // [ 0.023200] setup: 0000000000880000 - 0000000003f98000 (not signed) - fd = openat (AT_FDCWD, "/dev/kmsg", O_NONBLOCK | O_RDONLY); + fd = openat (AT_FDCWD, "/dev/kmsg", O_NONBLOCK | O_RDONLY | O_CLOEXEC); if (fd == -1) return glnx_throw_errno_prefix (error, "openat(/dev/kmsg)"); unsigned max_lines = 5; // no need to read dozens of messages, ours comes really early