Commit d10e9504 authored by Mike Hibler's avatar Mike Hibler

One fix and one work around for new (5.10.0) perl warnings about "used once"

variables in libtblog_simple and SWIG generated code.

The fix is to libtblog, to get rid of the warning.  The warning from swig
generated code is a swig problem that was supposedly fixed, but apparently
not.  So those warnings remain, and led to the workaround.

The workaround is in shommlists which parses output captured by SUEXEC.
That function captures all output, stdout and stderr, from the command it runs
and presents it in an array.  So if you use it to invoke a perl script that
evokes the "used once" messages, those messages wind up in the array.
showmmlists was not validating that output at all, it just assumed everything
returned was the name of a mail list.  Added some syntactic validation
(aka a regexp) to deal with that.
parent 798f95b1
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# Copyright (c) 2005, 2010 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -40,7 +40,8 @@ use strict;
use vars qw($SCRIPTNAME
$EMERG $ALRET $CRIT $ERR $WARNING $NOTICE $INFO $DEBUG
%PRIORITY_MAP_TO_STR %PRIORITY_MAP_TO_NUM);
%PRIORITY_MAP_TO_STR %PRIORITY_MAP_TO_NUM
*SOUT *SERR);
#
# Duplicate STDOUT and STDERR to SOUT and SERR respectfully, since
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005, 2006, 2007 University of Utah and the Flux Group.
# Copyright (c) 2005, 2006, 2007, 2010 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -94,6 +94,16 @@ if (count($suexec_output_array)) {
for ($i = 0; $i < count($suexec_output_array); $i++) {
$listname = $suexec_output_array[$i];
#
# XXX Since the output array contains stderr as well as stdout,
# we might get warnings and other chaff. Do some filtering of
# lines here. This is the current DB table_regex regex for a
# mailman listname.
#
if (!preg_match("/^[-\w\.\+]+$/", $listname)) {
continue;
}
echo "<tr>
<td><a href='mailto:$listname@${OURDOMAIN}'>$listname</a>
</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment