my $sslcert;
-my $cmdMapper = {
+my $shell_cmd_map = {
'login' => [ '/bin/login', '-f', 'root' ],
'upgrade' => [ '/usr/bin/pveupgrade', '--shell' ],
};
my ($user, $shellcmd) = @_;
if ($user eq 'root@pam') {
- if (exists($cmdMapper->{$shellcmd})) {
- return $cmdMapper->{$shellcmd};
+ if (exists($shell_cmd_map->{$shellcmd})) {
+ return $shell_cmd_map->{$shellcmd};
} else {
return [ '/bin/login', '-f', 'root' ];
}
cmd => {
type => 'string',
description => "Run specific command or default to login.",
- enum => [keys %$cmdMapper],
+ enum => [keys %$shell_cmd_map],
optional => 1,
default => 'login',
},
cmd => {
type => 'string',
description => "Run specific command or default to login.",
- enum => [keys %$cmdMapper],
+ enum => [keys %$shell_cmd_map],
optional => 1,
default => 'login',
},
cmd => {
type => 'string',
description => "Run specific command or default to login.",
- enum => [keys %$cmdMapper],
+ enum => [keys %$shell_cmd_map],
optional => 1,
default => 'login',
},