Listing 2 - /cgi-bin/du - Perl wrapper to filter arguments to /opt/sysadmin/unsecure_du

#!/usr/local/bin/perl -T

$ENV{'PATH'} = '/bin:/usr/bin';
# Only capture variables of the form matching:
#    Zero or more alphanumeric [0-9a-zA-Z_], '/', or ' '
@ARGV[0] =~ /^([\w\/]*)$/;
$first=$1;
@ARGV[1] =~ /^([\w\/]*)$/;
$second=$1;
@ARGV[2] =~ /^([\w\/]*)$/;
$third=$1;
system '/opt/sysadmin/unsecure_du', $first, $second, $third;



