trivial diff: buxfix for the security fix.

Tyson Dowd trd at cs.mu.OZ.AU
Mon Mar 30 16:19:07 AEST 1998


Hi,

Quick fix, this worked fine under Linux, but not on 'bobo.

===================================================================


Estimated hours taken: 0.05

scripts/mmake.in:
	Bugfix for previous change, mmake wasn't working on murlibobo.
	"if ! mkdir... " seems to be a bash-ism.  Use mkdir ...., then
	check $? instead.


Index: scripts//mmake.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/mmake.in,v
retrieving revision 1.17
diff -u -r1.17 mmake.in
--- mmake.in	1998/03/30 05:26:33	1.17
+++ mmake.in	1998/03/30 06:08:18
@@ -154,10 +154,13 @@
 			umask 022
 			mmake_tmpdir=/tmp/mmake$$
 			tmp=$mmake_tmpdir/mmake
-			if ! mkdir $mmake_tmpdir ; then
-				echo "Unable to create temporary makefile" 1>&2
-				exit 1
-			fi
+			mkdir $mmake_tmpdir
+			case $? in
+				0) ;;
+				*) echo "Unable to create temporary makefile" 1>&2
+				   exit 1
+				   ;;
+			esac
 			trap 'status=$?; rm -rf $mmake_tmpdir; exit $status' 0 1 2 3 13 15
 			umask $old_umask
 			;;


-- 
       Tyson Dowd           # There isn't any reason why Linux can't be
                            # implemented as an enterprise computing solution.
     trd at cs.mu.oz.au        # Find out what you've been missing while you've
http://www.cs.mu.oz.au/~trd # been rebooting Windows NT. -- InfoWorld, 1998.



More information about the developers mailing list