prepare-root: Add another missing O_CLOEXEC
authorColin Walters <walters@verbum.org>
Fri, 2 Jun 2023 17:10:12 +0000 (13:10 -0400)
committerColin Walters <walters@verbum.org>
Fri, 2 Jun 2023 17:10:12 +0000 (13:10 -0400)
src/switchroot/ostree-prepare-root.c

index 136502cc06e574d67e7942ad6d3f1c7639f4ffc7..0c8c6dd767560d9f11e91fba52b927b7c8cbb3fb 100644 (file)
@@ -315,7 +315,7 @@ main (int argc, char *argv[])
       int cfs_fd;
       unsigned cfs_flags;
 
-      cfs_fd = open (".ostree.cfs", O_RDONLY);
+      cfs_fd = open (".ostree.cfs", O_RDONLY | O_CLOEXEC);
       if (cfs_fd < 0)
         {
           if (errno == ENOENT)