Buffer overrun fix. fixes: bug #787
[exim.git] / src / src / exicyclog.src
index efc0af5e771af733c391e5207d46f03bc568045d..f10446339209f61df2d9bb3088964028c31878f0 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $Cambridge: exim/src/src/exicyclog.src,v 1.6 2008/01/30 20:09:24 nm4 Exp $
+# $Cambridge: exim/src/src/exicyclog.src,v 1.8 2008/07/28 18:24:13 fanf2 Exp $
 
 # Copyright (c) 2006 University of Cambridge.
 # See the file NOTICE for conditions of use and distribution.
@@ -84,7 +84,7 @@ done
 # in different places. We have a fudge that will search the usual suspects if
 # requested.
 
-for cmd in chown chgrp mv rm ; do
+for cmd in chown chgrp chmod mv rm ; do
   eval "oldcmd=\$$cmd"
   if [ "$oldcmd" != "look_for_it" ] ; then continue ; fi
   newcmd=$cmd
@@ -241,8 +241,8 @@ if [ -f $mainlog.$keept.$suffix ]; then $rm $mainlog.$keept.$suffix; fi;
 if [ -f $rejectlog.$keept ]; then $rm $rejectlog.$keept; fi;
 if [ -f $rejectlog.$keept.$suffix ]; then $rm $rejectlog.$keept.$suffix; fi;
 
-if [ -f $paniclog.$keept ]; then $rm $rejectlog.$keept; fi;
-if [ -f $paniclog.$keept.$suffix ]; then $rm $rejectlog.$keept.$suffix; fi;
+if [ -f $paniclog.$keept ]; then $rm $paniclog.$keept; fi;
+if [ -f $paniclog.$keept.$suffix ]; then $rm $paniclog.$keept.$suffix; fi;
 
 # Now rename all the previous old files by increasing their numbers by 1.
 # When the number is less than 10, insert a leading zero.
@@ -301,7 +301,7 @@ fi
 
 if [ -f $paniclog ]; then
   $mv $paniclog $paniclog.$first
-  $chown $user:$group $rejectlog.$first
+  $chown $user:$group $paniclog.$first
   $touch $paniclog
   $chown $user:$group $paniclog
   $chmod 640 $paniclog