diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-13 08:38:57 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-13 08:38:57 +0000 |
commit | 4f4592539d61764397257438d6914137498cbf70 (patch) | |
tree | 5eb225a96c437ce7fa2d9774f269ad8323d11d7c /src | |
parent | 0ffbc6033346d182f37b9a8ff9fa5af8d9f0ce6a (diff) | |
download | openocd+libswd-4f4592539d61764397257438d6914137498cbf70.tar.gz openocd+libswd-4f4592539d61764397257438d6914137498cbf70.tar.bz2 openocd+libswd-4f4592539d61764397257438d6914137498cbf70.tar.xz openocd+libswd-4f4592539d61764397257438d6914137498cbf70.zip |
David Brownell <david-b@pacbell.net>:
OpenOCD doesn't actually *need* to be keeping all TCP ports
active ... creating security issues in some network configs.
Instead, let config file specify e.g. "tcl_port 0" (or gdb_port,
telnet_port) to disable that particular remote access method.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2240 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/server/gdb_server.c | 6 | ||||
-rw-r--r-- | src/server/tcl_server.c | 6 | ||||
-rw-r--r-- | src/server/telnet_server.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index d5c3f351..88c9ec88 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -44,7 +44,7 @@ static int gdb_breakpoint_override; static enum breakpoint_type gdb_breakpoint_override_type; extern int gdb_error(connection_t *connection, int retval); -static unsigned short gdb_port; +static unsigned short gdb_port = 3333; static const char *DIGITS = "0123456789abcdef"; static void gdb_log_callback(void *priv, const char *file, int line, @@ -2198,8 +2198,8 @@ int gdb_init(void) if (gdb_port == 0 && server_use_pipes == 0) { - LOG_DEBUG("no gdb port specified, using default port 3333"); - gdb_port = 3333; + LOG_INFO("gdb port disabled"); + return ERROR_OK; } if (server_use_pipes) diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c index e146b04f..f37d4975 100644 --- a/src/server/tcl_server.c +++ b/src/server/tcl_server.c @@ -34,7 +34,7 @@ typedef struct tcl_connection_s { int tc_outerror; /* flag an output error */ } tcl_connection_t; -static unsigned short tcl_port = 0; +static unsigned short tcl_port = 6666; /* commands */ static int handle_tcl_port_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); @@ -165,8 +165,8 @@ int tcl_init(void) if (tcl_port == 0) { - LOG_DEBUG("no tcl port specified, using default port 6666"); - tcl_port = 6666; + LOG_INFO("tcl port disabled"); + return ERROR_OK; } retval = add_service("tcl", CONNECTION_TCP, tcl_port, 1, tcl_new_connection, tcl_input, tcl_closed, NULL); diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index 94a26624..cf74344f 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -30,7 +30,7 @@ #include "telnet_server.h" #include "target_request.h" -static unsigned short telnet_port = 0; +static unsigned short telnet_port = 4444; int handle_exit_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); int handle_telnet_port_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); @@ -596,8 +596,8 @@ int telnet_init(char *banner) if (telnet_port == 0) { - LOG_DEBUG("no telnet port specified, using default port 4444"); - telnet_port = 4444; + LOG_INFO("telnet port disabled"); + return ERROR_OK; } telnet_service->banner = banner; |