1 $NetBSD: patch-ae,v 1.1 2003/12/05 05:40:32 ben Exp $
3 --- src/config.parse.c.orig 1994-07-20 18:03:26.000000000 -0700
10 static void configfile_descend();
13 @@ -90,6 +89,7 @@ configfile_read(pp_list, pp_entry_list)
19 /* to make code semi-reentrant */
20 list_reset(&prune_list);
21 @@ -105,8 +105,9 @@ configfile_read(pp_list, pp_entry_list)
23 (void) strcpy(tmpfilename, TEMPFILE_TEMPLATE);
25 - if ((char *) mktemp(tmpfilename) == NULL) {
26 - perror("configfile_read: mktemp()");
27 + fdout = mkstemp(tmpfilename);
29 + perror("configfile_read: mkstemp()");
33 @@ -149,7 +150,7 @@ configfile_read(pp_list, pp_entry_list)
35 err = umask(077); /* to protect the tempfile */
37 - if ((fpout = fopen(tmpfilename, "w+")) == NULL) {
38 + if ((fpout = fdopen(fdout, "w+")) == NULL) {
39 sprintf(s, "tripwire: Couldn't open config file '%s'", configfile);