aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/sformat
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2003-06-05 02:40:33 +0800
committernetchild <netchild@FreeBSD.org>2003-06-05 02:40:33 +0800
commitc0efa8662af8bf30080e9a9ea1fe7e17b9541f70 (patch)
tree0ee6bb376498c32a23d208a1e0e7f97e4ce951ff /sysutils/sformat
parent0e3622a4a00f6c63e48fed49f4da0c9d62466c51 (diff)
downloadfreebsd-ports-gnome-c0efa8662af8bf30080e9a9ea1fe7e17b9541f70.tar.gz
freebsd-ports-gnome-c0efa8662af8bf30080e9a9ea1fe7e17b9541f70.tar.zst
freebsd-ports-gnome-c0efa8662af8bf30080e9a9ea1fe7e17b9541f70.zip
- Fix yet another bug that might be used for a root exploit. As with the last
bug you are only vulnerable if you locally set the sformat binary suid root. - Respect CC already at the configure-stage of sformat else we end up running configure with GCC and compiling with whatever CC was set to. Submitted by: maintainer
Diffstat (limited to 'sysutils/sformat')
-rw-r--r--sysutils/sformat/Makefile8
-rw-r--r--sysutils/sformat/files/patch-RULES::i386-freebsd-cc.rul6
-rw-r--r--sysutils/sformat/files/patch-RULES::rules.cnf12
-rw-r--r--sysutils/sformat/files/patch-libscg::scsitransp.c11
4 files changed, 30 insertions, 7 deletions
diff --git a/sysutils/sformat/Makefile b/sysutils/sformat/Makefile
index 00d15762dba9..7d68d0578d1a 100644
--- a/sysutils/sformat/Makefile
+++ b/sysutils/sformat/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sformat
PORTVERSION= 3.5
-PORTREVISON= 1
+PORTREVISON= 2
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.zeist.de/pub/distfiles/ \
ftp://ftp.berlios.de/pub/sformat/
@@ -20,12 +20,12 @@ USE_REINPLACE= yes
MAN1= sformat.1
-MAKE_ENV= COPTX="-DBSD_SCSI_SENSE_BUG"
+MAKE_ENV= CCOM=${CC} COPTX="-DBSD_SCSI_SENSE_BUG"
post-extract:
-.if ${MACHINE_ARCH} != "i386"
+.if ${MACHINE_ARCH} != "i386" || ${CC} != "cc"
@${LN} -s ${WRKSRC}/RULES/i386-freebsd-cc.rul \
- ${WRKSRC}/RULES/${MACHINE_ARCH}-freebsd-cc.rul
+ ${WRKSRC}/RULES/${MACHINE_ARCH}-freebsd-${CC}.rul
.endif
post-patch:
diff --git a/sysutils/sformat/files/patch-RULES::i386-freebsd-cc.rul b/sysutils/sformat/files/patch-RULES::i386-freebsd-cc.rul
index 5b94b84afb34..fe40bd525bc9 100644
--- a/sysutils/sformat/files/patch-RULES::i386-freebsd-cc.rul
+++ b/sysutils/sformat/files/patch-RULES::i386-freebsd-cc.rul
@@ -18,8 +18,8 @@
-LDCC= @echo " ==> LINKING \"$@\""; gcc
-DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc
-RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib
-+LDCC= $(CC)
-+DYNLD= $(CC)
++LDCC= $(CCOM)
++DYNLD= $(CCOM)
+RANLIB= ranlib
ARFLAGS= cr
LORDER= lorder
@@ -27,5 +27,5 @@
RMDEP= :
-MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc -M
-+MKDEP= $(CC) -M
++MKDEP= $(CCOM) -M
MKDEP_OUT=
diff --git a/sysutils/sformat/files/patch-RULES::rules.cnf b/sysutils/sformat/files/patch-RULES::rules.cnf
new file mode 100644
index 000000000000..f7148061bd95
--- /dev/null
+++ b/sysutils/sformat/files/patch-RULES::rules.cnf
@@ -0,0 +1,12 @@
+--- RULES/rules.cnf.orig Sun Jan 27 16:11:31 2002
++++ RULES/rules.cnf Sun Jun 1 18:58:37 2003
+@@ -33,8 +33,7 @@
+ #
+ # Hack until the <mach>-<os>-*cc.rul files are updated
+ #
+-_HCCCOM= $(OARCH:%-gcc=gcc)
+-HCCCOM= $(_HCCCOM:%-cc=cc)
++HCCCOM= $(C_ARCH)
+
+ _CCCOM= $(_UNIQ)$(CCCOM)
+ __CCCOM= $(_CCCOM:$(_UNIQ)=$(HCCCOM))
diff --git a/sysutils/sformat/files/patch-libscg::scsitransp.c b/sysutils/sformat/files/patch-libscg::scsitransp.c
new file mode 100644
index 000000000000..057fec4f2bb9
--- /dev/null
+++ b/sysutils/sformat/files/patch-libscg::scsitransp.c
@@ -0,0 +1,11 @@
+--- libscg/scsitransp.c.orig Fri Apr 20 10:38:05 2001
++++ libscg/scsitransp.c Wed May 28 19:36:31 2003
+@@ -1016,7 +1016,7 @@
+ register Uchar *cp;
+ register int n;
+ {
+- js_fprintf(f, s);
++ js_fprintf(f, "%s", s);
+ while (--n >= 0)
+ js_fprintf(f, " %02X", *cp++);
+ js_fprintf(f, "\n");