summaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-27 08:11:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-27 08:11:41 (GMT)
commit9d540e97267fa94d9701d3e1aa5cdf2926858472 (patch)
tree692790eca6a1f1ed5dd56a0f336bf910e76d15e5 /transport.h
parent05f6e1be8cdae1ebedf3cf7b7a072a3b35f945b5 (diff)
parentabcbdc03895ff3f00280e54af11fee92d6877044 (diff)
downloadgit-9d540e97267fa94d9701d3e1aa5cdf2926858472.zip
git-9d540e97267fa94d9701d3e1aa5cdf2926858472.tar.gz
git-9d540e97267fa94d9701d3e1aa5cdf2926858472.tar.bz2
Merge branch 'bw/transport-protocol-policy'
Finer-grained control of what protocols are allowed for transports during clone/fetch/push have been enabled via a new configuration mechanism. * bw/transport-protocol-policy: http: respect protocol.*.allow=user for http-alternates transport: add from_user parameter to is_transport_allowed http: create function to get curl allowed protocols transport: add protocol policy config option http: always warn if libcurl version is too old lib-proto-disable: variable name fix
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/transport.h b/transport.h
index b8e4ee8..9820f10 100644
--- a/transport.h
+++ b/transport.h
@@ -153,10 +153,17 @@ extern int transport_summary_width(const struct ref *refs);
struct transport *transport_get(struct remote *, const char *);
/*
- * Check whether a transport is allowed by the environment. Type should
- * generally be the URL scheme, as described in Documentation/git.txt
+ * Check whether a transport is allowed by the environment.
+ *
+ * Type should generally be the URL scheme, as described in
+ * Documentation/git.txt
+ *
+ * from_user specifies if the transport was given by the user. If unknown pass
+ * a -1 to read from the environment to determine if the transport was given by
+ * the user.
+ *
*/
-int is_transport_allowed(const char *type);
+int is_transport_allowed(const char *type, int from_user);
/*
* Check whether a transport is allowed by the environment,
@@ -164,12 +171,6 @@ int is_transport_allowed(const char *type);
*/
void transport_check_allowed(const char *type);
-/*
- * Returns true if the user has attempted to turn on protocol
- * restrictions at all.
- */
-int transport_restrict_protocols(void);
-
/* Transport options which apply to git:// and scp-style URLs */
/* The program to use on the remote side to send a pack */