pkgsrc/security/tripwire/patches/patch-ae
rillig b71a1d488b Fixed pkglint warnings. The warnings are mostly quoting issues, for
example MAKE_ENV+=FOO=${BAR} is changed to MAKE_ENV+=FOO=${BAR:Q}. Some
other changes are outlined in

    http://mail-index.netbsd.org/tech-pkg/2005/12/02/0034.html
2005-12-05 20:49:47 +00:00

41 lines
1.1 KiB
Text

$NetBSD: patch-ae,v 1.2 2005/12/05 20:50:58 rillig Exp $
--- src/config.parse.c.orig 1994-07-20 18:03:26.000000000 -0700
+++ src/config.parse.c
@@ -55,7 +55,6 @@
#endif
/* prototypes */
-char *mktemp();
static void configfile_descend();
#ifndef L_tmpnam
@@ -90,6 +89,7 @@ configfile_read(pp_list, pp_entry_list)
char number[128];
int entrynum = 0;
int err;
+ int fdout;
/* to make code semi-reentrant */
list_reset(&prune_list);
@@ -105,8 +105,9 @@ configfile_read(pp_list, pp_entry_list)
};
(void) strcpy(tmpfilename, TEMPFILE_TEMPLATE);
- if ((char *) mktemp(tmpfilename) == NULL) {
- perror("configfile_read: mktemp()");
+ fdout = mkstemp(tmpfilename);
+ if (fdout == -1) {
+ perror("configfile_read: mkstemp()");
exit(1);
}
@@ -149,7 +150,7 @@ configfile_read(pp_list, pp_entry_list)
err = umask(077); /* to protect the tempfile */
- if ((fpout = fopen(tmpfilename, "w+")) == NULL) {
+ if ((fpout = fdopen(fdout, "w+")) == NULL) {
sprintf(s, "tripwire: Couldn't open config file '%s'", configfile);
perror(s);
exit(1);