From: Michael Olbrich Date: Sat, 27 Oct 2012 21:22:02 +0200 Subject: [PATCH] calling open() with O_CREAT requires 3 arguments otherwise compiling with -D_FORTIFY_SOURCE=2 fails. Signed-off-by: Michael Olbrich --- plugins/logfile/initng_logfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/logfile/initng_logfile.c b/plugins/logfile/initng_logfile.c index c64301b..1e6c0ba 100644 --- a/plugins/logfile/initng_logfile.c +++ b/plugins/logfile/initng_logfile.c @@ -71,7 +71,7 @@ static int program_output(s_event * event) filename_fixed = fix_variables(filename, data->service); /* open the file */ - fd = open(filename, O_WRONLY | O_CREAT | O_APPEND); + fd = open(filename, O_WRONLY | O_CREAT | O_APPEND, 0644); if (fd < 1) { F_("Error opening %s, err : %s\n", filename, strerror(errno));