Fix exit codes for allowed ssh commands
gitolite specific ssh commands ("getperms", "setperms", "info" etc.) should exit with non-error code in case of success. Also "get/setperms" should print to STDOUT instead of STDERR. This change is specially needed for the gitolite-tools (http://github.com/tmatilai/gitolite-tools) to work. Signed-off-by: Teemu Matilainen <teemu.matilainen@reaktor.fi>
This commit is contained in:
parent
5ad2056a9c
commit
15475f666c
2 changed files with 5 additions and 5 deletions
|
@ -105,14 +105,14 @@ if ($cmd =~ $CUSTOM_COMMANDS) {
|
|||
} else {
|
||||
die "$cmd doesn't make sense to me\n";
|
||||
}
|
||||
exit 1;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# people allowed to get a shell can get basic access info by asking nicely
|
||||
if ($cmd eq 'info') {
|
||||
&report_basic($GL_ADMINDIR, $GL_CONF_COMPILED, $user);
|
||||
print "you also have shell access\n\r" if $shell_allowed;
|
||||
exit 1;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue