[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] For fuzzing: Expose directory_handle_command.
commit 02068c6391fc5b9febac1f02de7028688c92eee2
Author: teor <teor2345@xxxxxxxxx>
Date: Tue Dec 13 19:12:34 2016 -0500
For fuzzing: Expose directory_handle_command.
(Nick extracted this patch from a larger patch by Teor.)
---
src/or/directory.c | 4 ++--
src/or/directory.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/or/directory.c b/src/or/directory.c
index 80f53c2..4581163 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -14,6 +14,7 @@
#include "connection.h"
#include "connection_edge.h"
#include "control.h"
+#define DIRECTORY_PRIVATE
#include "directory.h"
#include "dirserv.h"
#include "dirvote.h"
@@ -99,7 +100,6 @@ static void directory_send_command(dir_connection_t *conn,
int purpose, int direct, const char *resource,
const char *payload, size_t payload_len,
time_t if_modified_since);
-static int directory_handle_command(dir_connection_t *conn);
static int body_is_plausible(const char *body, size_t body_len, int purpose);
static char *http_get_header(const char *headers, const char *which);
static void http_set_address_origin(const char *headers, connection_t *conn);
@@ -3846,7 +3846,7 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
* from the inbuf, try to process it; otherwise, leave it on the
* buffer. Return a 0 on success, or -1 on error.
*/
-static int
+STATIC int
directory_handle_command(dir_connection_t *conn)
{
char *headers=NULL, *body=NULL;
diff --git a/src/or/directory.h b/src/or/directory.h
index ee0a198..15010d6 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -148,6 +148,7 @@ int purpose_needs_anonymity(uint8_t dir_purpose, uint8_t router_purpose,
struct get_handler_args_t;
STATIC int handle_get_hs_descriptor_v3(dir_connection_t *conn,
const struct get_handler_args_t *args);
+STATIC int directory_handle_command(dir_connection_t *conn);
#endif
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits