- Use %_smp_mflags - Clean up spec - Copyright: -> License: - rebuilt - rebuilt - rebuilt - rebuilt - Rebuild - automated rebuild - automated rebuild - automated rebuild - Bump release + rebuild. - security patch for tmpfile creation from Olaf Kirch <okir@lst.de> - Update to the version in FreeBSD CVS - it's actively maintained, unlike the 1993 4BSD version we used to have - automatic rebuild OBS-URL: https://build.opensuse.org/package/show/server:monitoring/byacc?expand=0&rev=1
57 lines
1.2 KiB
Diff
57 lines
1.2 KiB
Diff
--- yacc/main.c.security Mon Jan 10 15:26:24 2000
|
|
+++ yacc/main.c Fri Jan 5 10:21:29 2001
|
|
@@ -109,6 +109,11 @@
|
|
short **derives;
|
|
char *nullable;
|
|
|
|
+#ifdef linux
|
|
+# define mktemp safe_mktemp
|
|
+extern void safe_mktemp(char *tmpl);
|
|
+#endif
|
|
+
|
|
static void create_file_names __P((void));
|
|
static void getargs __P((int, char **));
|
|
static void onintr __P((int));
|
|
@@ -121,9 +126,18 @@
|
|
done(k)
|
|
int k;
|
|
{
|
|
- if (action_file) { fclose(action_file); unlink(action_file_name); }
|
|
- if (text_file) { fclose(text_file); unlink(text_file_name); }
|
|
- if (union_file) { fclose(union_file); unlink(union_file_name); }
|
|
+ if (action_file)
|
|
+ fclose(action_file);
|
|
+ if (action_file_name[0])
|
|
+ unlink(action_file_name);
|
|
+ if (text_file)
|
|
+ fclose(text_file);
|
|
+ if (text_file_name[0])
|
|
+ unlink(text_file_name);
|
|
+ if (union_file)
|
|
+ fclose(union_file);
|
|
+ if (union_file_name[0])
|
|
+ unlink(union_file_name);
|
|
exit(k);
|
|
}
|
|
|
|
@@ -482,6 +496,19 @@
|
|
code_file = output_file;
|
|
}
|
|
|
|
+#ifdef linux
|
|
+void
|
|
+safe_mktemp(char *fname)
|
|
+{
|
|
+ int fd;
|
|
+
|
|
+ if ((fd = mkstemp(fname)) < 0) {
|
|
+ perror("unable to create temp file");
|
|
+ exit(1);
|
|
+ }
|
|
+ close(fd);
|
|
+}
|
|
+#endif
|
|
|
|
int
|
|
main(argc, argv)
|