Re: [PATCH/RFC 1/4] Allow creation of arbitrary git-shell commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> This provides a mechanism for the server to expose custom
>> functionality to clients.  My particular use case is that I would like
>> a way of discovering all repositories available for cloning.  A
>> client that clones via
>>   git clone user@xxxxxxxxxxx
>> can invoke a command by
>>   ssh user@xxxxxxxxxxx $command
>
> Please have a blank line above and below sample command display like these
> for readability.
Sounds good.

>> +     /* Shell should be spawned with cwd in the git user's home directory */
>> +     if (chdir(COMMAND_DIR))
>> +             die("unrecognized command '%s'", prog);
>
> Hmm, could you justify "should be" above please?
>
> An example would be "All of the custom commands I wrote to give added
> features to users at my installation wanted to be in that directory, not
> at the user's home directory, as they mostly operated on files in that
> directory", but please do not make me (or other reviewers) guess why.
>
> What I am getting at is that it may be more natural and useful to run
> these custom commands in the user's $HOME directory---you would need to
> make sure that execl() finds the command you get from the request, perhaps
> by prefixing COMMAND_DIR / to the command name, though.
Err, good point.  The commands I wrote end up running 'cd ..' anyway
:).  Instead just running these commands in the user's $HOME does make
a lot more sense.

Thanks everyone for the comments thus far.
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]