Package: rinetd
Version: 0.62-5.1
Severity: normal
Tags: patch
Dear Maintainer,
when rinetd is run with stdin closed, the program does not
work at all, but will consume 100% CPU.
To simulate that behaviour run rinetd with "< /dev/null".
It took me more that a day to dig through the code to the
root of this problem. A patch is attached.
-- System Information:
Debian Release: 7.5
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages rinetd depends on:
ii libc6 2.13-38+deb7u1
rinetd recommends no packages.
rinetd suggests no packages.
-- no debconf information
diff --git a/rinetd.c b/rinetd.c
index 78027d3..73de727 100755
--- a/rinetd.c
+++ b/rinetd.c
@@ -356,6 +356,10 @@ void readConfiguration(void)
if (!seFds) {
goto lowMemory;
}
+ for(i = 0; i < seTotal; ++i)
+ {
+ seFds[i] = INVALID_SOCKET;
+ }
seLocalAddrs = (struct in_addr *) malloc(sizeof(struct in_addr) *
seTotal);
if (!seLocalAddrs) {