(minor) do not run gitolite query-rc from *perl* programs!

I must have blindly converted from some shell-thinking/shell-code for
these to have slipped through!

(found when doing an audit of all system, exec, ``, qx, and tsh_)
This commit is contained in:
Sitaram Chamarty 2012-04-13 13:58:40 +05:30
parent afc2c14a65
commit 720729e4b4
2 changed files with 5 additions and 6 deletions

View file

@ -13,8 +13,8 @@ in doc/sskm.mkd or online at http://sitaramc.github.com/gitolite/sskm.html.
usage() if @ARGV and $ARGV[0] eq '-h';
my $rb = `gitolite query-rc -n GL_REPO_BASE`;
my $ab = `gitolite query-rc -n GL_ADMIN_BASE`;
my $rb = $rc{GL_REPO_BASE};
my $ab = $rc{GL_ADMIN_BASE};
# get to the keydir
_chdir("$ab/keydir");

View file

@ -16,11 +16,11 @@ $|++;
tsh_try("sestatus");
my $selinux = ( tsh_text() =~ /enabled/ );
my $ab = `gitolite query-rc -n GL_ADMIN_BASE`;
my $ab = $rc{GL_ADMIN_BASE};
trace( 2, "'keydir' not found in '$ab'; exiting" ), exit if not -d "$ab/keydir";
my $akdir = "$ENV{HOME}/.ssh";
my $akfile = "$ENV{HOME}/.ssh/authorized_keys";
my $glshell = `gitolite query-rc -n GL_BINDIR` . "/gitolite-shell";
my $glshell = $rc{GL_BINDIR} . "/gitolite-shell";
my $auth_options = auth_options();
sanity();
@ -76,8 +76,7 @@ sub sanity {
}
sub auth_options {
my $auth_options = `gitolite query-rc AUTH_OPTIONS`;
chomp($auth_options);
my $auth_options = $rc{AUTH_OPTIONS};
$auth_options ||= "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty";
return $auth_options;