[Libguestfs] [PATCH 1/3] urandom: Use O_CLOEXEC.
Richard W.M. Jones
rjones at redhat.com
Tue Nov 21 11:41:49 UTC 2017
---
customize/urandom.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/customize/urandom.ml b/customize/urandom.ml
index 3686f77d2..fd8cc8e8f 100644
--- a/customize/urandom.ml
+++ b/customize/urandom.ml
@@ -26,7 +26,7 @@
open Unix
-let open_urandom_fd () = openfile "/dev/urandom" [O_RDONLY] 0
+let open_urandom_fd () = openfile "/dev/urandom" [O_RDONLY; O_CLOEXEC] 0
let read_byte fd =
let b = Bytes.make 1 ' ' in
--
2.13.2
More information about the Libguestfs
mailing list