lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] "git shell" won't work, need "git-shell"
- Date: Mon, 25 Aug 2008 22:28:55 +0200 (CEST)
- From: Johannes Schindelin <Johannes.Schindelin@xxxxxx>
- Subject: Re: [PATCH] "git shell" won't work, need "git-shell"
Hi,
On Mon, 25 Aug 2008, Johannes Schindelin wrote:
> On Mon, 25 Aug 2008, Mikael Magnusson wrote:
>
> > 2008/8/25 Johannes Schindelin <Johannes.Schindelin@xxxxxx>:
> >
> > > On Mon, 25 Aug 2008, Paolo Bonzini wrote:
> > >
> > >> > That would involve you actually finding out what's happening,
> > >> > though.
> > >>
> > >> He said so:
> > >>
> > >> > test:x:1001:1001:,,,:/home/test:/usr/bin/git shell
> > >> >
> > >> > just makes ssh loop asking for a password, logging
> > >> >
> > >> > "User test not allowed because shell /usr/bin/git shell does not
> > >> > exist"
> > >
> > > Okay, so this means that you cannot pass arguments to the login shell.
> > > Makes me wonder... I had the impression that bash was called with
> > > --login.
> >
> > When you login, a '-' is prepended in argv[0], ie, bash checks if it's
> > called "-bash". This is documented in man bash, but I couldn't find it
> > in man login or man agetty, not sure where else it might be written
> > down.
>
> Thanks!
>
> So does this mean that we could check in git.c if there is a leading "-"
> in argv[0]? If so, then the builtin git-shell should be called by
> default.
>
> At least I do not expect many instances of git being called with argv[0]
> starting with a "-"... :-)
Oh, well. I just tested again, and slapped my head when it did not work,
remembering that we do _not_ call Git as a login shell. Instead, we call
ssh with the "-c" option, which just passes it to the shell.
Consequently, argv[0] does not get a "-" prepended.
I seem to remember that Hannes had some code to support "-c" as an
indicator that Git should execute git-shell, but I just might have dreamt
that, too.
Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
- References:
- [PATCH] "git shell" won't work, need "git-shell"
- Re: [PATCH] "git shell" won't work, need "git-shell"
- Re: [PATCH] "git shell" won't work, need "git-shell"
- Re: [PATCH] "git shell" won't work, need "git-shell"
- Re: [PATCH] "git shell" won't work, need "git-shell"
- Re: [PATCH] "git shell" won't work, need "git-shell"
- From: Johannes Schindelin
- Re: [PATCH] "git shell" won't work, need "git-shell"
- Re: [PATCH] "git shell" won't work, need "git-shell"
- From: Johannes Schindelin
- Re: [PATCH] "git shell" won't work, need "git-shell"
- Re: [PATCH] "git shell" won't work, need "git-shell"
- From: Johannes Schindelin