From 876ddd32b8c8c9be4e964862e608ea4b6bd37ff8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 14 Dec 2023 07:57:43 -0500 Subject: [PATCH] zipl: Use O_CLOEXEC On general principle. --- src/libostree/ostree-bootloader-zipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2