diff options
Diffstat (limited to 'src/libstrongswan/plugins/random/random_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/random/random_plugin.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |