auth: minor flow change when defaulting to "info"
This commit is contained in:
parent
20c29c0145
commit
43da598c08
|
@ -67,16 +67,16 @@ my $user=$ENV{GL_USER}=shift; # there; now that's available everywhere!
|
||||||
# sanity checks on SSH_ORIGINAL_COMMAND
|
# sanity checks on SSH_ORIGINAL_COMMAND
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
# print basic access info if SSH_ORIGINAL_COMMAND does not exist
|
# no SSH_ORIGINAL_COMMAND given...
|
||||||
unless ($ENV{SSH_ORIGINAL_COMMAND}) {
|
unless ($ENV{SSH_ORIGINAL_COMMAND}) {
|
||||||
# unless the user is allowed to use a shell
|
# if the user is allowed to use a shell, give him one
|
||||||
if ($shell_allowed) {
|
if ($shell_allowed) {
|
||||||
my $shell = $ENV{SHELL};
|
my $shell = $ENV{SHELL};
|
||||||
$shell =~ s/.*\//-/; # change "/bin/bash" to "-bash"
|
$shell =~ s/.*\//-/; # change "/bin/bash" to "-bash"
|
||||||
exec { $ENV{SHELL} } $shell;
|
exec { $ENV{SHELL} } $shell;
|
||||||
}
|
}
|
||||||
&report_basic($GL_ADMINDIR, $GL_CONF_COMPILED, $user);
|
# otherwise, pretend he typed in "info" and carry on...
|
||||||
exit 1;
|
$ENV{SSH_ORIGINAL_COMMAND} = 'info';
|
||||||
}
|
}
|
||||||
|
|
||||||
my $cmd = $ENV{SSH_ORIGINAL_COMMAND};
|
my $cmd = $ENV{SSH_ORIGINAL_COMMAND};
|
||||||
|
|
Loading…
Reference in a new issue