From 43da598c0852c4dcbd78fdb7251ed338c14fe5ce Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Mon, 1 Feb 2010 11:36:24 +0530 Subject: [PATCH] auth: minor flow change when defaulting to "info" --- src/gl-auth-command | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gl-auth-command b/src/gl-auth-command index 1dd2fba..5b3dc42 100755 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@ -67,16 +67,16 @@ my $user=$ENV{GL_USER}=shift; # there; now that's available everywhere! # 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 the user is allowed to use a shell + # if the user is allowed to use a shell, give him one if ($shell_allowed) { my $shell = $ENV{SHELL}; $shell =~ s/.*\//-/; # change "/bin/bash" to "-bash" exec { $ENV{SHELL} } $shell; } - &report_basic($GL_ADMINDIR, $GL_CONF_COMPILED, $user); - exit 1; + # otherwise, pretend he typed in "info" and carry on... + $ENV{SSH_ORIGINAL_COMMAND} = 'info'; } my $cmd = $ENV{SSH_ORIGINAL_COMMAND};