From: Ted Lemon Date: Fri, 6 Apr 2001 01:02:47 +0000 (+0000) Subject: Don't create a trace file if there's one there already. X-Git-Tag: V3-BETA-2-PATCH-24~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a031f2e3cf52ee5fa8e9e6cde345de5efbfa903;p=thirdparty%2Fdhcp.git Don't create a trace file if there's one there already. --- diff --git a/omapip/trace.c b/omapip/trace.c index 2891b5564..e9c621a63 100644 --- a/omapip/trace.c +++ b/omapip/trace.c @@ -109,7 +109,7 @@ isc_result_t trace_begin (const char *filename, return ISC_R_INVALIDARG; } - traceoutfile = open (filename, O_CREAT | O_WRONLY, 0644); + traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL, 0644); if (traceoutfile < 0) { log_error ("%s(%d): trace_begin: %s: %m", file, line, filename);