Re: [PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-11 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: +To disable interactive logins, displaying a greeting instead: ++ + +$ chsh -s /usr/bin/git-shell +$ mkdir $HOME/git-shell-commands +$ cat

[PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-10 Thread Jonathan Nieder
If I disable git-shell's interactive mode by removing the ~/git-shell-commands directory, then attempts to use 'ssh' with the git account interactively produce an error message intended for the administrator: $ ssh git@myserver fatal: Interactive git shell is not enabled.

Re: [PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-10 Thread Ethan Reesor
I feel like the suggestion I posted in response to Junio C Hamano gits...@pobox.com's complaint on the RFC for this patch provides a more elegant solution to the problem of administrators wanting to prevent interactive sessions for users with their login shell set to git-prompt. The suggestion was

Re: [PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-10 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: diff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt index 4fe93203..60051e63 100644 --- a/Documentation/git-shell.txt +++ b/Documentation/git-shell.txt @@ -59,6 +59,26 @@ users to list repositories they have access to, create,

Re: [PATCH 2/2] shell: pay attention to exit status from 'help' command

2013-02-10 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: +To disable interactive logins, displaying a greeting instead: ++ + +$ chsh -s /usr/bin/git-shell +$ mkdir $HOME/git-shell-commands +$ cat $HOME/git-shell-commands/help \EOF +#!/bin/sh +printf '%s\n' Hi