turn on keep alives
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Wed, 4 May 1983 11:54:38 +0000 (03:54 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Wed, 4 May 1983 11:54:38 +0000 (03:54 -0800)
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
usr/src/libexec/rshd/rshd.c
usr/src/libexec/telnetd/telnetd.c

index 83f6465..1c7f0d3 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rlogind.c  4.12 83/02/28";
+static char sccsid[] = "@(#)rlogind.c  4.13 83/05/03";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -33,7 +33,7 @@ main(argc, argv)
        int argc;
        char **argv;
 {
        int argc;
        char **argv;
 {
-       int f, options = SO_KEEPALIVE;
+       int f, options = 0;
        struct sockaddr_in from;
        struct servent *sp;
 
        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)");
        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)
        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);
        if (bind(f, &sin, sizeof (sin), 0) < 0) {
                perror("rlogind: bind");
                exit(1);
index 61d67cb..f88ad8e 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rshd.c     4.14 83/02/23";
+static char sccsid[] = "@(#)rshd.c     4.15 83/05/03";
 #endif
 
 #include <sys/ioctl.h>
 #endif
 
 #include <sys/ioctl.h>
@@ -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)");
        }
        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)");
        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);
        if (bind(f, (caddr_t)&sin, sizeof (sin), 0) < 0) {
                perror("rshd: bind");
                exit(1);
index a808fd3..1015310 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)telnetd.c  4.18 83/02/21";
+static char sccsid[] = "@(#)telnetd.c  4.19 83/05/03";
 #endif
 
 /*
 #endif
 
 /*
@@ -10,6 +10,8 @@ static char sccsid[] = "@(#)telnetd.c 4.18 83/02/21";
 
 #include <netinet/in.h>
 
 
 #include <netinet/in.h>
 
+#include <arpa/telnet.h>
+
 #include <stdio.h>
 #include <signal.h>
 #include <errno.h>
 #include <stdio.h>
 #include <signal.h>
 #include <errno.h>
@@ -17,8 +19,6 @@ static char sccsid[] = "@(#)telnetd.c 4.18 83/02/21";
 #include <wait.h>
 #include <netdb.h>
 
 #include <wait.h>
 #include <netdb.h>
 
-#include "telnet.h"
-
 #define        BELL            '\07'
 
 char   hisopts[256];
 #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)");
        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)");
        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);
        while (bind(s, (caddr_t)&sin, sizeof (sin), 0) < 0) {
                perror("telnetd: bind");
                sleep(5);