/usr/share/courier/webadmin/admin-10password.pl is in courier-webadmin 0.68.2-1ubuntu3.
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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | #!/usr/bin/perl
#
# TITLE: Password authentication modules
#
#
# Copyright 2001 Double Precision, Inc. See COPYING for
# distribution information.
my $vars=ReadEnvVarConfigFile("authdaemonrc");
my $authmodulelist=$$vars{'authmodulelist'};
my @mods=grep(/./, split (/\s+/, $authmodulelist));
my $authmodule_param=$cgi->param("authmodulelist");
my $selected= -1;
my $errstr="";
if ($cgi->param("Up") && $authmodule_param)
{
my $i;
for ($i=0; $i <= $#mods; $i++)
{
next unless $mods[$i] eq $authmodule_param;
if ($i > 0)
{
$mods[$i]=$mods[$i-1];
$mods[$i-1]=$authmodule_param;
ReplaceEnvVarConfigFile("authdaemonrc", "authmodulelist",
join(" ", @mods));
changed("$authdaemond restart");
$selected= $i-1;
last;
}
}
}
if ($cgi->param("Down") && $authmodule_param)
{
my $i;
for ($i=0; $i <= $#mods; $i++)
{
next unless $mods[$i] eq $authmodule_param;
if ($i < $#mods)
{
$mods[$i]=$mods[$i+1];
$mods[$i+1]=$authmodule_param;
ReplaceEnvVarConfigFile("authdaemonrc", "authmodulelist",
join(" ", @mods));
changed("$authdaemond restart");
$selected=$i+1;
last;
}
}
}
if ($cgi->param("Delete") && $authmodule_param)
{
my $i;
for ($i=0; $i <= $#mods; $i++)
{
next unless $mods[$i] eq $authmodule_param;
splice @mods, $i, 1;
ReplaceEnvVarConfigFile("authdaemonrc", "authmodulelist",
join(" ", @mods));
changed("$authdaemond restart");
last;
}
}
if ($authmodule_param=$cgi->param("authmodulelistorig"))
{
push @mods, $authmodule_param;
ReplaceEnvVarConfigFile("authdaemonrc", "authmodulelist",
join(" ", @mods));
changed("$authdaemond restart");
$errstr="\@SAVED\@";
}
my $authmodulelist_current="<tt><select name=authmodulelist size=6>";
foreach (@mods)
{
my $n=$_;
$authmodulelist_current .=
"<option value=\"$n\" " . (($selected--) ? "":"selected=\"selected\"") . ">$n\n";
}
$authmodulelist_current .= "</select></tt>";
my $authmodulelistorig=$$vars{'authmodulelistorig'};
my $authmodulelistorig_current="<tt><select name=authmodulelistorig><option>";
foreach (grep(/./, split (/\s+/, $authmodulelistorig)))
{
$authmodulelistorig_current .= "<option>$_\n";
}
$authmodulelistorig_current .= "</select></tt>";
my $daemons=$$vars{'daemons'};
my $daemons_params=$cgi->param("daemons");
if ($daemons_params =~ /([1-9][0-9]*)/)
{
$daemons_params=$1;
ReplaceEnvVarConfigFile("authdaemonrc", "daemons", $daemons_params);
$daemons=$daemons_params;
}
display_form("admin-10password.html",
{
"AUTHMODULELIST" => $authmodulelist_current,
"AUTHMODULELISTORIG" => $authmodulelistorig_current,
"DAEMONS" => $daemons
}
);
|