diff options
author | Trevor Johnson <trevor@FreeBSD.org> | 2000-11-25 07:09:18 +0000 |
---|---|---|
committer | Trevor Johnson <trevor@FreeBSD.org> | 2000-11-25 07:09:18 +0000 |
commit | 66d65ec2a783cb04d04eb72c49fe6488315ae6c9 (patch) | |
tree | 691e9bd0a836808601eeef13292e405caf45bfc2 /editors/joe | |
parent | b72a662c8b9e663b253f1679ce954df1bf9a6d93 (diff) | |
download | ports-66d65ec2a783cb04d04eb72c49fe6488315ae6c9.tar.gz ports-66d65ec2a783cb04d04eb72c49fe6488315ae6c9.zip |
Notes
Diffstat (limited to 'editors/joe')
-rw-r--r-- | editors/joe/Makefile | 1 | ||||
-rw-r--r-- | editors/joe/files/patch-ad | 46 |
2 files changed, 40 insertions, 7 deletions
diff --git a/editors/joe/Makefile b/editors/joe/Makefile index b745635d4787..b61d13c85851 100644 --- a/editors/joe/Makefile +++ b/editors/joe/Makefile @@ -7,6 +7,7 @@ PORTNAME= joe PORTVERSION= 2.8 +PORTREVISION= 1 CATEGORIES= editors MASTER_SITES= ftp://ftp.std.com/src/editors/ DISTNAME= ${PORTNAME}${PORTVERSION} diff --git a/editors/joe/files/patch-ad b/editors/joe/files/patch-ad index a57f81ee61e2..47b1bb2131a0 100644 --- a/editors/joe/files/patch-ad +++ b/editors/joe/files/patch-ad @@ -1,6 +1,7 @@ --- b.c.orig Fri Jan 20 13:38:25 1995 -+++ b.c Tue Dec 28 15:56:10 1999 -@@ -22,4 +22,7 @@ ++++ b.c Fri Nov 24 00:24:52 2000 +@@ -21,6 +21,9 @@ + #include <pwd.h> #endif #include <errno.h> +#include <sys/file.h> @@ -8,13 +9,17 @@ +#include <sys/stat.h> #include "config.h" -@@ -202,4 +205,5 @@ + #include "blocks.h" +@@ -201,6 +204,7 @@ + if(prop) b->o=prop->o; else b->o=pdefault; mset(b->marks,0,sizeof(b->marks)); + b->filehandle = -1; /* initialize filehandle &&& ob */ b->rdonly=0; b->orphan=0; -@@ -256,4 +260,8 @@ + b->oldcur=0; +@@ -255,6 +259,10 @@ + { if(b && !--b->count) { + if (b->filehandle != -1) { @@ -23,7 +28,9 @@ + } if(b->changed) abrerr(b->name); if(b==errbuf) errbuf=0; -@@ -1672,5 +1680,6 @@ + if(b->undo) undorm(b->undo); +@@ -1671,7 +1679,8 @@ + B *b; long skip,amnt; char *n; - int nowrite=0; @@ -31,7 +38,9 @@ + int nowrite=0,fh=-1; if(!s || !s[0]) -@@ -1705,4 +1714,26 @@ + { +@@ -1704,6 +1713,28 @@ + else fclose(fi); fi=fopen(n,"r"); if(!fi) nowrite=0; +/*printf ("nowrite open=%i\n", nowrite); */ @@ -58,9 +67,32 @@ + } joesep(n); -@@ -1762,4 +1793,5 @@ + +@@ -1761,6 +1792,7 @@ + vsrm(n); b->er=error; + if( fh != -1 ) b->filehandle = fh; return b; } + +@@ -1990,7 +2022,18 @@ + { + long tim=time(0); + B *b; +- FILE *f=fopen("DEADJOE","a"); ++ FILE *f; ++ struct stat sb; ++ if ((lstat("DEADJOE", &sb) == 0) && (sb.st_mode & S_IFLNK) && (sb.st_uid != getuid())) ++ { ++ printf("*** JOE was aborted "); ++ if (sig) printf("by signal %d, cannot save DEADJOE due to unsafe symlink\n",sig); ++ else printf("because the terminal closed, cannot save DEADJOE due to unsafe symlink\n"); ++ if(sig) ttclsn(); ++ _exit(1); ++ } ++ f=fopen("DEADJOE","a"); ++ chmod("DEADJOE", S_IRUSR | S_IWUSR); + 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); + else fprintf(f,"*** JOE was aborted because the terminal closed\n"); |