From 2b597a6b92b8169b04e02434db1e663cd1f80384 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Wed, 4 May 1983 03:54:38 -0800 Subject: [PATCH] turn on keep alives SCCS-vsn: libexec/rlogind/rlogind.c 4.13 SCCS-vsn: libexec/rshd/rshd.c 4.15 SCCS-vsn: libexec/telnetd/telnetd.c 4.19 --- usr/src/libexec/rlogind/rlogind.c | 8 +++----- usr/src/libexec/rshd/rshd.c | 4 +--- usr/src/libexec/telnetd/telnetd.c | 8 +++----- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/usr/src/libexec/rlogind/rlogind.c b/usr/src/libexec/rlogind/rlogind.c index 83f6465193..1c7f0d3d58 100644 --- a/usr/src/libexec/rlogind/rlogind.c +++ b/usr/src/libexec/rlogind/rlogind.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)rlogind.c 4.12 83/02/28"; +static char sccsid[] = "@(#)rlogind.c 4.13 83/05/03"; #endif #include @@ -33,7 +33,7 @@ main(argc, argv) int argc; char **argv; { - int f, options = SO_KEEPALIVE; + int f, options = 0; struct sockaddr_in from; struct servent *sp; @@ -81,10 +81,8 @@ main(argc, argv) if (options & SO_DEBUG) if (setsockopt(f, SOL_SOCKET, SO_DEBUG, 0, 0) < 0) perror("rlogind: setsockopt (SO_DEBUG)"); -#ifdef notdef if (setsockopt(f, SOL_SOCKET, SO_KEEPALIVE, 0, 0) < 0) - perror("rlogind: setsocktopt (SO_KEEPALIVE)"); -#endif + perror("rlogind: setsockopt (SO_KEEPALIVE)"); if (bind(f, &sin, sizeof (sin), 0) < 0) { perror("rlogind: bind"); exit(1); diff --git a/usr/src/libexec/rshd/rshd.c b/usr/src/libexec/rshd/rshd.c index 61d67cbc7b..f88ad8eac8 100644 --- a/usr/src/libexec/rshd/rshd.c +++ b/usr/src/libexec/rshd/rshd.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)rshd.c 4.14 83/02/23"; +static char sccsid[] = "@(#)rshd.c 4.15 83/05/03"; #endif #include @@ -81,10 +81,8 @@ main(argc, argv) } if (options & SO_DEBUG && setsockopt(f, SOL_SOCKET, SO_DEBUG, 0, 0) < 0) perror("rshd: setsockopt (SO_DEBUG)"); -#ifdef notdef if (setsockopt(f, SOL_SOCKET, SO_KEEPALIVE, 0, 0) < 0) perror("rshd: setsockopt (SO_KEEPALIVE)"); -#endif if (bind(f, (caddr_t)&sin, sizeof (sin), 0) < 0) { perror("rshd: bind"); exit(1); diff --git a/usr/src/libexec/telnetd/telnetd.c b/usr/src/libexec/telnetd/telnetd.c index a808fd311a..10153100e6 100644 --- a/usr/src/libexec/telnetd/telnetd.c +++ b/usr/src/libexec/telnetd/telnetd.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)telnetd.c 4.18 83/02/21"; +static char sccsid[] = "@(#)telnetd.c 4.19 83/05/03"; #endif /* @@ -10,6 +10,8 @@ static char sccsid[] = "@(#)telnetd.c 4.18 83/02/21"; #include +#include + #include #include #include @@ -17,8 +19,6 @@ static char sccsid[] = "@(#)telnetd.c 4.18 83/02/21"; #include #include -#include "telnet.h" - #define BELL '\07' char hisopts[256]; @@ -96,10 +96,8 @@ again: if (options & SO_DEBUG) if (setsockopt(s, SOL_SOCKET, SO_DEBUG, 0, 0) < 0) perror("telnetd: setsockopt (SO_DEBUG)"); -#ifdef notdef if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, 0, 0) < 0) perror("telnetd: setsockopt (SO_KEEPALIVE)"); -#endif while (bind(s, (caddr_t)&sin, sizeof (sin), 0) < 0) { perror("telnetd: bind"); sleep(5); -- 2.20.1