[13407] in Athena Bugs
decmips 7.7L: elcsd
daemon@ATHENA.MIT.EDU (mhpower@MIT.EDU)
Thu Apr 6 05:09:13 1995
From: mhpower@MIT.EDU
To: bugs@MIT.EDU
Date: Thu, 06 Apr 95 05:09:05 EDT
/etc/elcsd appears to listen for tcp connections on port 704
regardless of whether the LOGREM bit is set in /etc/elscd.conf. If
this bit isn't set (e.g., the number on line 6 is 5) and someone
attempts a tcp connection, elcsd appears to go into a loop using up
lots of cpu time. This has occurred on many machines recently because
of the satan tcp_scan program. I think this patch fixes the problem:
*** /afs/rel-eng/project/release/source/Ultrix/etc/elcsd/elcsd.c Tue May 26 09:29:12 1992
--- elcsd.c Thu Apr 6 03:53:43 1995
***************
*** 315,317 ****
for (;;) {
! rdmask = elfdmask | dsimask | ssimask | scmask;
if (select(16, &rdmask,(int *)0,(int *)0,termflg ? &timeout : 0) < 0) {
--- 315,320 ----
for (;;) {
! if (logremflg > 0)
! rdmask = elfdmask | dsimask | ssimask | scmask;
! else
! rdmask = elfdmask | dsimask | scmask;
if (select(16, &rdmask,(int *)0,(int *)0,termflg ? &timeout : 0) < 0) {
***************
*** 1181,1183 ****
}
! if (ssi <= 0 && hp != 0 && port != 0) {
ssi = socket(AF_INET, SOCK_STREAM, 0);
--- 1184,1186 ----
}
! if ((elcfg.status & LOGREM) == LOGREM && ssi <= 0 && hp != 0 && port != 0) {
ssi = socket(AF_INET, SOCK_STREAM, 0);
Matt