From 738eda67e3143a5b7d93b8ddf15edb9a3370b00a Mon Sep 17 00:00:00 2001 From: Trevor Johnson Date: Sun, 3 Dec 2000 18:03:25 +0000 Subject: - when DEADJOE is a hard link, leave it alone - un-forbid - bump PORTREVISION Submitted by: maintainer --- editors/joe2/files/patch-ad | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editors/joe2/files/patch-ad') diff --git a/editors/joe2/files/patch-ad b/editors/joe2/files/patch-ad index 47b1bb2131a0..38113e698cfc 100644 --- a/editors/joe2/files/patch-ad +++ b/editors/joe2/files/patch-ad @@ -1,5 +1,5 @@ ---- b.c.orig Fri Jan 20 13:38:25 1995 -+++ b.c Fri Nov 24 00:24:52 2000 +--- b.c.orig Fri Jan 20 00:38:25 1995 ++++ b.c Sun Dec 3 09:58:21 2000 @@ -21,6 +21,9 @@ #include #endif @@ -83,7 +83,7 @@ - FILE *f=fopen("DEADJOE","a"); + FILE *f; + struct stat sb; -+ if ((lstat("DEADJOE", &sb) == 0) && (sb.st_mode & S_IFLNK) && (sb.st_uid != getuid())) ++ if ((lstat("DEADJOE", &sb) == 0) && (((sb.st_mode & S_IFLNK) && (sb.st_uid != getuid())) || (sb.st_nlink > 1))) + { + printf("*** JOE was aborted "); + if (sig) printf("by signal %d, cannot save DEADJOE due to unsafe symlink\n",sig); -- cgit v1.2.3