1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

- when DEADJOE is a hard link, leave it alone

- un-forbid
- bump PORTREVISION

Submitted by:	maintainer
This commit is contained in:
Trevor Johnson 2000-12-03 18:03:25 +00:00
parent 6c6fbd1ef7
commit 738eda67e3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=35627
6 changed files with 12 additions and 18 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= joe
PORTVERSION= 2.8
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= editors
MASTER_SITES= ftp://ftp.std.com/src/editors/
DISTNAME= ${PORTNAME}${PORTVERSION}
@ -15,8 +15,6 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= toasty@dragondata.com
FORBIDDEN= "follows hard link (not symlink) to DEADJOE--see http://www.securityfocus.com/archive/1/145305"
WRKSRC= ${WRKDIR}/joe
ALL_TARGET= joe
MAN1= joe.1

View File

@ -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 <pwd.h>
#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);

View File

@ -7,7 +7,7 @@
PORTNAME= joe
PORTVERSION= 2.8
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= editors
MASTER_SITES= ftp://ftp.std.com/src/editors/
DISTNAME= ${PORTNAME}${PORTVERSION}
@ -15,8 +15,6 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= toasty@dragondata.com
FORBIDDEN= "follows hard link (not symlink) to DEADJOE--see http://www.securityfocus.com/archive/1/145305"
WRKSRC= ${WRKDIR}/joe
ALL_TARGET= joe
MAN1= joe.1

View File

@ -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 <pwd.h>
#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);

View File

@ -7,7 +7,7 @@
PORTNAME= joe
PORTVERSION= 2.8
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= editors
MASTER_SITES= ftp://ftp.std.com/src/editors/
DISTNAME= ${PORTNAME}${PORTVERSION}
@ -15,8 +15,6 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= toasty@dragondata.com
FORBIDDEN= "follows hard link (not symlink) to DEADJOE--see http://www.securityfocus.com/archive/1/145305"
WRKSRC= ${WRKDIR}/joe
ALL_TARGET= joe
MAN1= joe.1

View File

@ -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 <pwd.h>
#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);