]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't create a trace file if there's one there already.
authorTed Lemon <source@isc.org>
Fri, 6 Apr 2001 01:02:47 +0000 (01:02 +0000)
committerTed Lemon <source@isc.org>
Fri, 6 Apr 2001 01:02:47 +0000 (01:02 +0000)
omapip/trace.c

index 2891b5564b22047bf2e707dc633505e2d167fefe..e9c621a631cc8c63c6cd8afbdb307c7b7457cdd0 100644 (file)
@@ -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);