changeset 1498:ee7153a05ffc

disallow inetd -v
author Matt Johnston <matt@ucc.asn.au>
date Thu, 15 Feb 2018 23:30:54 +0800
parents bf9c06b8dad9
children 1028b0111f89
files svr-main.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/svr-main.c	Wed Feb 14 23:09:40 2018 +0800
+++ b/svr-main.c	Thu Feb 15 23:30:54 2018 +0800
@@ -83,6 +83,13 @@
 	/* Set up handlers, syslog, seed random */
 	commonsetup();
 
+#if DEBUG_TRACE
+	if (debug_trace) {
+		/* -v output goes to stderr which would get sent over the inetd network socket */
+		dropbear_exit(LOG_ERR, "Dropbear inetd mode is incompatible with debug -v");
+	}
+#endif
+
 	/* In case our inetd was lax in logging source addresses */
 	get_socket_address(0, NULL, NULL, &host, &port, 0);
 	dropbear_log(LOG_INFO, "Child connection from %s:%s", host, port);