From 8ab60d4a84ad360c5a31dc8a45c4bf97ba10cd83 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Mon, 30 Aug 1999 00:18:45 +0000 Subject: Close a security hole relating to a world-readable DEADJOE file. PR: 12827 Submitted by: Maintainer --- editors/joe2/files/patch-ad | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 editors/joe2/files/patch-ad (limited to 'editors/joe2/files/patch-ad') diff --git a/editors/joe2/files/patch-ad b/editors/joe2/files/patch-ad new file mode 100644 index 000000000000..a199b2b076d5 --- /dev/null +++ b/editors/joe2/files/patch-ad @@ -0,0 +1,18 @@ +--- b.c Fri Jan 20 03:38:25 1995 ++++ b.c.new Fri Jul 23 03:36:10 1999 +@@ -21,6 +21,7 @@ + #include + #endif + #include ++#include + + #include "config.h" + #include "blocks.h" +@@ -1990,6 +1991,7 @@ + { + long tim=time(0); + B *b; ++ mode_t mask=umask(077); /* no access to DEADJOE for others */ + FILE *f=fopen("DEADJOE","a"); + fprintf(f,"\n*** Modified files in JOE when it aborted on %s",ctime(&tim)); + if(sig) fprintf(f,"*** JOE was aborted by signal %d\n",sig); -- cgit v1.2.3