Skip site navigation (1)Skip section navigation (2)
Date:      28 Nov 2002 11:44:48 -0000
From:      Colin Percival <cperciva@sfu.ca>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/45817: [PATCH] Fortune files are needlessly randomized
Message-ID:  <20021128114448.50371.qmail@www.idlepower.net>

next in thread | raw e-mail | index | archive | help

>Number:         45817
>Category:       bin
>Synopsis:       [PATCH] Fortune files are needlessly randomized
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 28 03:50:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Colin Percival
>Release:        FreeBSD 5.0-CURRENT
>Organization:
>Environment:
System: All versions of FreeBSD including the fortunes.
>Description:
In the build process, fortune files are randomized.  This is
1. Entirely pointless, since fortune(6) performs its own randomization, and
2. Causes the fortune files to be different every time they are rebuilt.
   This will set off flags in any process which compares file checksums (to
   determine if files have been tampered with, or to determine which files
   need to be redistributed following a rebuild.)
>How-To-Repeat:
Build the fortune files twice, and compare their md5sums.
>Fix:
Remove the -r flag in the call to strfile:

--- fortune.patch begins here ---
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/src/games/fortune/datfiles/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- Makefile	10 Nov 2002 23:41:01 -0000	1.29
+++ Makefile	28 Nov 2002 11:21:22 -0000
@@ -29,12 +29,12 @@
 .for f in fortunes fortunes2 fortunes2-o freebsd-tips gerrold.limerick limerick murphy murphy-o startrek zippy
 $f.dat: $f
 	PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \
-	    strfile -Crs ${.ALLSRC} ${.TARGET}
+	    strfile -Cs ${.ALLSRC} ${.TARGET}
 .endfor
 
 fortunes-o.dat: fortunes-o
 	PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \
-	    strfile -Crsx ${.ALLSRC} ${.TARGET}
+	    strfile -Csx ${.ALLSRC} ${.TARGET}
 
 fortunes-o: fortunes-o.${TYPE}
 	tr a-zA-Z n-za-mN-ZA-M < ${.ALLSRC} > ${.TARGET}
--- fortune.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021128114448.50371.qmail>