From: Roy Marples Date: Sat, 12 Sep 2020 14:58:03 +0000 (+0100) Subject: logerr: Don't leak the logfile stream to scripts X-Git-Tag: v9.3.0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0251bd3eccf094ce8f32e700fa306fc5e8b0f9ce;p=thirdparty%2Fdhcpcd.git logerr: Don't leak the logfile stream to scripts --- diff --git a/src/logerr.c b/src/logerr.c index 817c53ca..5fba91d3 100644 --- a/src/logerr.c +++ b/src/logerr.c @@ -382,7 +382,7 @@ logopen(const char *path) } #ifndef SMALL - if ((ctx->log_file = fopen(path, "a")) == NULL) + if ((ctx->log_file = fopen(path, "ae")) == NULL) return -1; setlinebuf(ctx->log_file); return fileno(ctx->log_file);