1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- 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
This commit is contained in:
Alexander Leidinger 2003-06-04 18:40:33 +00:00
parent fb19333309
commit 6d00c62b3d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=82287
4 changed files with 30 additions and 7 deletions

View File

@ -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:

View File

@ -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=

View File

@ -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))

View File

@ -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");