From 81c63b0eed39432878f78727f60a1e7499645199 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Fri, 11 Jul 2014 07:23:31 +0200 Subject: Imported Upstream version 5.2.0 --- src/libstrongswan/plugins/random/random_plugin.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstrongswan/plugins/random/random_plugin.c') diff --git a/src/libstrongswan/plugins/random/random_plugin.c b/src/libstrongswan/plugins/random/random_plugin.c index 1f1079240..e159751be 100644 --- a/src/libstrongswan/plugins/random/random_plugin.c +++ b/src/libstrongswan/plugins/random/random_plugin.c @@ -89,6 +89,11 @@ static bool open_dev(char *file, int *fd) DBG1(DBG_LIB, "opening \"%s\" failed: %s", file, strerror(errno)); return FALSE; } + if (fcntl(*fd, F_SETFD, FD_CLOEXEC) == -1) + { + DBG1(DBG_LIB, "setting FD_CLOEXEC for \"%s\" failed: %s", + file, strerror(errno)); + } return TRUE; } -- cgit v1.2.3