/usr/share/courier/webadmin/admin-main.pl is in courier-webadmin 0.76.3-5+deb9u1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #!/usr/bin/perl
#
#
# Copyright 2001 Double Precision, Inc. See COPYING for
# distribution information.
#
# Dynamically generate the main menu.
my $fh=new FileHandle;
my %mainmenu;
if (opendir($fh, $webadmindir))
{
my $n;
while (defined ($n=readdir($fh)))
{
next unless $n =~ /^admin-(.*)\.pl$/;
my $name=$1;
my $title="";
my $ffh=new FileHandle "$webadmindir/$n";
my $line;
while (defined($line=<$ffh>))
{
last unless $line =~ /^#/;
next unless $line =~ /^#\s+(.*)/;
next unless $1 =~ /^TITLE:\s+(.*)/;
$line=$1;
$mainmenu{$name}=$line;
last;
}
close($ffh);
}
close($fh);
}
my $menuhtml="<table border=\"0\" cellspacing=\"8\">";
foreach (sort keys %mainmenu)
{
my $title=$mainmenu{$_};
my $pfix;
$title =~ /^(>*)/;
$pfix=length($1);
$title =~ s/^>*//;
$menuhtml .= "<tr><td>" . (" " x $pfix) . "<a href=\""
. $cgi->url(-full=>1) . "/$_\">" . $title . "</a></td></tr>\n";
}
$menuhtml .= "</table>\n";
my $update="\@NOUPDATE\@";
my $cancel="\@NOCANCEL\@";
if ( -f "$sysconfdir/webadmin/changed" )
{
$update="\@DOUPDATE\@";
$cancel="\@DOCANCEL\@";
}
display_form("admin-main.html",
{
"MENU" => $menuhtml,
"UPDATE" => $update,
"CANCEL" => $cancel
}
);
|