diff --git a/ChangeLog b/ChangeLog index a414a4d17..539615c97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,9 @@ Changes in version 0.2.0.29 - 2008-06-xx Fix for bug 707. - Fix macro collision between OpenSSL 0.9.8h and Windows headers. Fixes bug 704; fix from Steven Murdoch. + - When opening /dev/null in finish_daemonize(), do not pass the + O_CREAT flag. Fortify was complaining, and correctly so. Fixes + bug 742; fix from Michael Scherer. Bugfix on 0.0.2pre19. Changes in version 0.2.0.28-rc - 2008-06-13 diff --git a/src/common/util.c b/src/common/util.c index 6cf7d00f3..b57d8a9f8 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -3092,8 +3092,7 @@ finish_daemon(const char *desired_cwd) exit(1); } - nullfd = open("/dev/null", - O_CREAT | O_RDWR | O_APPEND); + nullfd = open("/dev/null", O_RDWR | O_APPEND); if (nullfd < 0) { log_err(LD_GENERAL,"/dev/null can't be opened. Exiting."); exit(1);