diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-09-28 14:33:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-28 14:33:27 -0700 |
commit | df37727a65c87cf9bba35befca1255031649553f (patch) | |
tree | 1b94b1eff66ebbc258722f59b60ca64eac0c6de3 /connect.c | |
parent | Git 2.3.9 (diff) | |
parent | submodule: allow only certain protocols for submodule fetches (diff) | |
download | tgif-df37727a65c87cf9bba35befca1255031649553f.tar.xz |
Merge branch 'jk/transfer-limit-protocol' into maint-2.3
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -9,6 +9,7 @@ #include "url.h" #include "string-list.h" #include "sha1-array.h" +#include "transport.h" static char *server_capabilities; static const char *parse_feature_value(const char *, const char *, int *); @@ -694,6 +695,8 @@ struct child_process *git_connect(int fd[2], const char *url, else target_host = xstrdup(hostandport); + transport_check_allowed("git"); + /* These underlying connection commands die() if they * cannot connect. */ @@ -727,6 +730,7 @@ struct child_process *git_connect(int fd[2], const char *url, int putty; char *ssh_host = hostandport; const char *port = NULL; + transport_check_allowed("ssh"); get_host_and_port(&ssh_host, &port); if (!port) @@ -768,6 +772,7 @@ struct child_process *git_connect(int fd[2], const char *url, /* remove repo-local variables from the environment */ conn->env = local_repo_env; conn->use_shell = 1; + transport_check_allowed("file"); } argv_array_push(&conn->args, cmd.buf); |