(minor)
This commit is contained in:
parent
fd85ee2c91
commit
025de395dc
|
@ -13,7 +13,6 @@ use warnings;
|
||||||
# input: $1 is GL username, plus $SSH_ORIGINAL_COMMAND
|
# input: $1 is GL username, plus $SSH_ORIGINAL_COMMAND
|
||||||
# output:
|
# output:
|
||||||
# security:
|
# security:
|
||||||
# - currently, we just make some basic checks, copied from gitosis
|
|
||||||
|
|
||||||
# robustness:
|
# robustness:
|
||||||
|
|
||||||
|
@ -168,9 +167,8 @@ if ($ENV{SSH_ORIGINAL_COMMAND} =~ $CUSTOM_COMMANDS) {
|
||||||
|
|
||||||
# side notes on detecting a normal git command: the pattern we check allows
|
# side notes on detecting a normal git command: the pattern we check allows
|
||||||
# old style as well as new style ("git-subcommand arg" or "git subcommand
|
# old style as well as new style ("git-subcommand arg" or "git subcommand
|
||||||
# arg"), just like gitosis does, although I'm not sure how necessary that is.
|
# arg"). Currently, this is how git sends across the command (including the
|
||||||
# Currently, this is how git sends across the command (including the single
|
# single quotes):
|
||||||
# quotes):
|
|
||||||
# git-receive-pack 'reponame.git'
|
# git-receive-pack 'reponame.git'
|
||||||
|
|
||||||
my ($verb, $repo) = ($ENV{SSH_ORIGINAL_COMMAND} =~ /^\s*(git\s+\S+|\S+)\s+'\/?(.*?)(?:\.git)?'/);
|
my ($verb, $repo) = ($ENV{SSH_ORIGINAL_COMMAND} =~ /^\s*(git\s+\S+|\S+)\s+'\/?(.*?)(?:\.git)?'/);
|
||||||
|
|
|
@ -389,9 +389,7 @@ close $compiled_fh or die "$ABRT close compiled-conf failed: $!\n";
|
||||||
# any new repos to be created?
|
# any new repos to be created?
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
# modern gits allow cloning from an empty repo, so we just create it. Gitosis
|
# modern gits allow cloning from an empty repo, so we just create it
|
||||||
# did not have that luxury, so it was forced to detect the first push and
|
|
||||||
# create it then
|
|
||||||
|
|
||||||
# but it turns out not everyone has "modern" gits :)
|
# but it turns out not everyone has "modern" gits :)
|
||||||
my $git_version = `git --version`;
|
my $git_version = `git --version`;
|
||||||
|
@ -469,8 +467,7 @@ for my $repo (keys %repo_config) {
|
||||||
# handle gitweb and daemon
|
# handle gitweb and daemon
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
# How you specify gitweb and daemon access is quite different from gitosis. I
|
# I just assume you'll never have any *real* users called "gitweb" or "daemon"
|
||||||
# just assume you'll never have any *real* users called "gitweb" or "daemon"
|
|
||||||
# :-) These are now "pseduo users" -- giving them "R" access to a repo is all
|
# :-) These are now "pseduo users" -- giving them "R" access to a repo is all
|
||||||
# you have to do
|
# you have to do
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue