From 6fa17ff9fdb750b27aac212c101fd7727bd05ced Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 11 Dec 2012 14:13:23 +0100 Subject: [PATCH] Harden exit command May only be executed in debug mode (-X option). --- src/http_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/http_command.c b/src/http_command.c index 9fc50a8..65be27c 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -405,7 +405,8 @@ static void cmd_exit(struct http_channel *c) response_open(c, "exit"); response_close(c, "exit"); - http_close_server(c->server); + if (global_parameters.debug_mode) + http_close_server(c->server); } static void cmd_init(struct http_channel *c) -- 1.7.10.4