git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Greg Brockman <gdb@MIT.EDU>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>, Petr Baudis <pasky@suse.cz>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] shell: Rewrite documentation and improve error message
Date: Sun, 22 Aug 2010 01:00:22 -0500	[thread overview]
Message-ID: <AANLkTi=u7VUhz4VrU2hdd3SXK7rMvMrijL-X9qXCG1vs@mail.gmail.com> (raw)
In-Reply-To: <1282333452-25278-1-git-send-email-artagnon@gmail.com>

Warning: the following email contains lots of nitpicks.  Proceed at
your own risk.

> +A login shell for SSH accounts to provide restricted Git access. When
> +'-c' is given, the program executes <command> non-interactively;
> +<command> can be one of 'git receive-pack', 'git upload-pack', 'git
> +upload-archive', 'cvs server', or a command in COMMAND_DIR. The shell
> +is started in interactive mode when no arguments are given; in this
> +case, COMMAND_DIR must exist, and any of the executables in them can
s/in them/in it/

> +COMMAND_DIR is the path 'git-shell-commands' in the user's home
> +directory. The user must have read and execute permissions to the
- Maybe instead 'COMMAND_DIR is the path "$HOME/git-shell-commands"'?
> +directory for it to be useful.
- I would be more specific here, and instead change this insertion to
something like: "directory in order to execute commands in it."
- What about adding something like 'Commands in COMMAND_DIR are run
with a cwd of $HOME'
- Perhaps note that if a COMMAND_DIR program is invoked, 'argument' is
parsed as a command-line?

>
>  Author
>  ------
> diff --git a/shell.c b/shell.c
> index ffed615..3fb804e 100644
> --- a/shell.c
> +++ b/shell.c
> @@ -152,8 +152,11 @@ int main(int argc, char **argv)
>        } else if (argc == 1) {
>                /* Allow the user to run an interactive shell */
>                cd_to_homedir();
> -               if (access(COMMAND_DIR, R_OK | X_OK) == -1)
> -                       die("Sorry, the interactive git-shell is not enabled");
> +               if (access(COMMAND_DIR, R_OK | X_OK) == -1) {
> +                       die("Inteactive git shell is not enabled.\n"
s/Inteactive/Interactive/

> +                           "hint: " COMMAND_DIR " should exist "
I would recommend displaying ~/$COMMAND_DIR instead, or
$HOME/COMMAND_DIR.  The latter could be considered an information leak
though.

> +                           "and have read and execute access.");

Sounds fine to me otherwise.  Thanks for starting on this.

  parent reply	other threads:[~2010-08-22  6:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 19:44 [PATCH] shell: Rewrite documentation and improve error message Ramkumar Ramachandra
2010-08-20 19:51 ` Ramkumar Ramachandra
2010-08-22  6:00 ` Greg Brockman [this message]
2010-08-22  8:04   ` [PATCH v2] " Ramkumar Ramachandra
2010-08-23 17:42     ` Greg Brockman
2010-08-24  5:36       ` [PATCH v3] " Ramkumar Ramachandra
2010-08-24  5:43         ` Greg Brockman
2010-08-24 12:35           ` Ramkumar Ramachandra
2010-08-24 15:22             ` Greg Brockman
2010-08-24 19:01               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=u7VUhz4VrU2hdd3SXK7rMvMrijL-X9qXCG1vs@mail.gmail.com' \
    --to=gdb@mit.edu \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pasky@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).