aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-05-29 14:30:45 +0800
committerkris <kris@FreeBSD.org>2001-05-29 14:30:45 +0800
commit5b02d708ab52def2e7c2c8b9308fbfb52c870a45 (patch)
tree66bdbdbe75d69dff492a9acfb3971de98ea9d7a5 /textproc
parentdb33d312c0d7e3b451a5676825a6a5c8630a4f6e (diff)
downloadfreebsd-ports-gnome-5b02d708ab52def2e7c2c8b9308fbfb52c870a45.tar.gz
freebsd-ports-gnome-5b02d708ab52def2e7c2c8b9308fbfb52c870a45.tar.zst
freebsd-ports-gnome-5b02d708ab52def2e7c2c8b9308fbfb52c870a45.zip
Create tempfiles securely. Bump PORTREVISION.
Submitted by: Jarno Huuskonen <Jarno.Huuskonen@uku.fi>
Diffstat (limited to 'textproc')
-rw-r--r--textproc/british-ispell/Makefile1
-rw-r--r--textproc/ispell/Makefile2
-rw-r--r--textproc/ispell/files/patch-sec140
-rw-r--r--textproc/nl-ispell/Makefile2
-rw-r--r--textproc/no-ispell/Makefile1
5 files changed, 44 insertions, 2 deletions
diff --git a/textproc/british-ispell/Makefile b/textproc/british-ispell/Makefile
index e50c57acfecb..804dbc08e1ab 100644
--- a/textproc/british-ispell/Makefile
+++ b/textproc/british-ispell/Makefile
@@ -10,6 +10,7 @@ MAINTAINER= alex@FreeBSD.org
ISPELL_BRITISH= yes
PORTNAME= british-ispell
PORTVERSION= 3.1
+PORTREVISION= 1
MASTERDIR= ${.CURDIR}/../ispell
SCRIPTS_ENV= ISPELL_BRITISH=yes
diff --git a/textproc/ispell/Makefile b/textproc/ispell/Makefile
index 7b3df2f68770..83e015f20eaa 100644
--- a/textproc/ispell/Makefile
+++ b/textproc/ispell/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= ispell
PORTVERSION?= 3.1.20c
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES+= textproc elisp
MASTER_SITES= ftp://ftp.cs.ucla.edu/pub/ispell-3.1/ \
ftp://ftp.kiarchive.ru/pub/unix/text/ispell/
diff --git a/textproc/ispell/files/patch-sec1 b/textproc/ispell/files/patch-sec1
new file mode 100644
index 000000000000..24632fe5221c
--- /dev/null
+++ b/textproc/ispell/files/patch-sec1
@@ -0,0 +1,40 @@
+--- ispell.c-orig Thu May 24 14:52:00 2001
++++ ispell.c Thu May 24 15:00:06 2001
+@@ -802,6 +802,7 @@
+ {
+ struct stat statbuf;
+ char * cp;
++ int fd;
+
+ currentfile = filename;
+
+@@ -835,15 +836,20 @@
+
+ (void) fstat (fileno (infile), &statbuf);
+ (void) strcpy (tempfile, TEMPNAME);
+- if (mktemp (tempfile) == NULL || tempfile[0] == '\0'
+- || (outfile = fopen (tempfile, "w")) == NULL)
+- {
+- (void) fprintf (stderr, CANT_CREATE,
+- (tempfile == NULL || tempfile[0] == '\0')
+- ? "temporary file" : tempfile);
+- (void) sleep ((unsigned) 2);
+- return;
+- }
++
++ if ((fd = mkstemp(tempfile)) == -1) {
++ fprintf(stderr, "Error: Can't create (mkstemp) temporary file\n");
++ sleep(2);
++ return;
++ }
++ if ((outfile = fdopen(fd, "w")) == NULL) {
++ unlink(tempfile);
++ close(fd);
++ fprintf(stderr, "Error: Can't open (fdopen) temporary file\n");
++ sleep(2);
++ return;
++ }
++ /* Is this necessary ? */
+ (void) chmod (tempfile, statbuf.st_mode);
+
+ quit = 0;
diff --git a/textproc/nl-ispell/Makefile b/textproc/nl-ispell/Makefile
index bb266f303ef9..e0dbbfa28339 100644
--- a/textproc/nl-ispell/Makefile
+++ b/textproc/nl-ispell/Makefile
@@ -10,7 +10,7 @@ MAINTAINER= alex@FreeBSD.org
ISPELL_NL= yes
PORTNAME= nl-ispell
PORTVERSION= 1.0.0
-PORTREVISION= 1
+PORTREVISION= 2
MASTERDIR= ${.CURDIR}/../ispell
.include "${MASTERDIR}/Makefile"
diff --git a/textproc/no-ispell/Makefile b/textproc/no-ispell/Makefile
index 1ff8103611c5..24005642c2ff 100644
--- a/textproc/no-ispell/Makefile
+++ b/textproc/no-ispell/Makefile
@@ -10,6 +10,7 @@ MAINTAINER= alex@FreeBSD.org
ISPELL_NO= yes
PORTNAME= no-ispell
PORTVERSION= 2.0
+PORTREVISION= 1
MASTERDIR= ${.CURDIR}/../ispell
.include "${MASTERDIR}/Makefile"