aboutsummaryrefslogtreecommitdiffstats
path: root/editors/joe2
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>1999-08-30 08:18:45 +0800
committerkris <kris@FreeBSD.org>1999-08-30 08:18:45 +0800
commitb8dcd0c9c663635bd607df04f9ba0c15b339015a (patch)
tree505f5753fe416aab89912487e757f3dff1f23123 /editors/joe2
parent4ed45362f587d196c73e924eefeabdd5ade56ee0 (diff)
downloadfreebsd-ports-gnome-b8dcd0c9c663635bd607df04f9ba0c15b339015a.tar.gz
freebsd-ports-gnome-b8dcd0c9c663635bd607df04f9ba0c15b339015a.tar.zst
freebsd-ports-gnome-b8dcd0c9c663635bd607df04f9ba0c15b339015a.zip
Close a security hole relating to a world-readable DEADJOE file.
PR: 12827 Submitted by: Maintainer
Diffstat (limited to 'editors/joe2')
-rw-r--r--editors/joe2/files/patch-ad18
1 files changed, 18 insertions, 0 deletions
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 <pwd.h>
+ #endif
+ #include <errno.h>
++#include <sys/types.h>
+
+ #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);