Perl 5.8 chokes on the format eval in monshow:

$ monshow --full

     server: jones
       time: Mon Mar 10 13:10:11 2003
      state: scheduler running
Insecure dependency in eval while running with -T switch at ./monshow line 1168.
zsh: exit 255   monshow --full
$ _

Here is a fix.

Index: clients/monshow
===================================================================
RCS file: /usr/local/src/cvsroot/debian/mon/clients/monshow,v
retrieving revision 1.1.1.5
retrieving revision 1.9
diff -u -r1.1.1.5 -r1.9
--- clients/monshow     7 Sep 2001 11:38:23 -0000       1.1.1.5
+++ clients/monshow     10 Mar 2003 18:13:38 -0000      1.9
@@ -1160,7 +1160,12 @@
 @ @<<<<<<<<<<<<<< @<<<<<<<<<<< @<<<<<<<<<  @<<<<<<<   @<<<<<<<<< @<<<   @
 EOF
            chomp $fmt;
-           $fmt .= "<" x length($SUMMARY) . "\n";
+           my $summary_len = do {
+               # avoid taint
+               $SUMMARY =~ /^(.*)/s or die;
+               length $1
+           };
+           $fmt .= "<" x $summary_len . "\n";
            $fmt .= <<'EOF';
 $DEP, $GROUP, $SERVICE, $STATUS, $TIME, $NEXT, $ALERTS, $SUMMARY
 .

-- 
Roderick Schertler
[EMAIL PROTECTED]
_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to