SCCS-vsn: libexec/rlogind/rlogind.c 4.13
SCCS-vsn: libexec/rshd/rshd.c 4.15
SCCS-vsn: libexec/telnetd/telnetd.c 4.19
-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>
- int f, options = SO_KEEPALIVE;
struct sockaddr_in from;
struct servent *sp;
struct sockaddr_in from;
struct servent *sp;
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)");
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);
-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>
}
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)");
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)");
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);
-static char sccsid[] = "@(#)telnetd.c 4.18 83/02/21";
+static char sccsid[] = "@(#)telnetd.c 4.19 83/05/03";
+#include <arpa/telnet.h>
+
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <errno.h>
#include <wait.h>
#include <netdb.h>
#include <wait.h>
#include <netdb.h>
#define BELL '\07'
char hisopts[256];
#define BELL '\07'
char hisopts[256];
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)");
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)");
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);