mount-util: Add missing O_CLOEXEC
authorColin Walters <walters@verbum.org>
Fri, 2 Jun 2023 13:28:19 +0000 (09:28 -0400)
committerColin Walters <walters@verbum.org>
Fri, 2 Jun 2023 13:28:19 +0000 (09:28 -0400)
Seen in review.

src/switchroot/ostree-mount-util.h

index fdf1a434768d490425ba2b078303141e07e03cda..9f90dc01c7b72012969da1bfd5ed37124c8f82f4 100644 (file)
@@ -134,7 +134,7 @@ read_file (const char *path, size_t *out_len)
 {
   int fd;
 
-  fd = open (path, O_RDONLY);
+  fd = open (path, O_RDONLY | O_CLOEXEC);
   if (fd < 0)
     {
       if (errno == ENOENT)