summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-13 17:01:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-13 17:01:13 +0000
commit5ce92aa2b7b80317819e3b2733ce66cc0603e28a (patch)
treef57cfcb76a5dba0a57063d573cfd9693adb8e91c /usr.bin
parentccaec5a3eec341635f4e76f943046b1d51573623 (diff)
Remove support for the debug command; noone needs setsockopt SO_DEBUG
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/telnet/commands.c25
-rw-r--r--usr.bin/telnet/main.c9
-rw-r--r--usr.bin/telnet/telnet.111
-rw-r--r--usr.bin/telnet/telnet.c3
4 files changed, 6 insertions, 42 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c
index b97025f790d..f45d8533a34 100644
--- a/usr.bin/telnet/commands.c
+++ b/usr.bin/telnet/commands.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commands.c,v 1.77 2015/11/13 16:53:46 deraadt Exp $ */
+/* $OpenBSD: commands.c,v 1.78 2015/11/13 17:01:12 deraadt Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
@@ -429,16 +429,6 @@ lclchars(int unused)
}
static int
-togdebug(int unused)
-{
- if (net > 0 &&
- (setsockopt(net, SOL_SOCKET, SO_DEBUG, &debug, sizeof(debug))) == -1) {
- perror("setsockopt (SO_DEBUG)");
- }
- return 1;
-}
-
-static int
togcrlf(int unused)
{
if (crlf) {
@@ -605,11 +595,6 @@ static struct togglelist Togglelist[] = {
&localchars,
"recognize certain control characters" },
{ " ", "", 0, 0 }, /* empty line */
- { "debug",
- "debugging",
- togdebug,
- &debug,
- "turn on socket level debugging" },
{ "netdata",
"printing of hexadecimal network data (debugging)",
0,
@@ -1899,14 +1884,6 @@ tn(int argc, char *argv[])
break;
}
- if (debug) {
- int one = 1;
-
- if (setsockopt(net, SOL_SOCKET, SO_DEBUG, &one,
- sizeof(one)) < 0)
- perror("setsockopt (SO_DEBUG)");
- }
-
if (connect(net, res->ai_addr, res->ai_addrlen) < 0) {
char hbuf[NI_MAXHOST];
diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c
index 2f69bd61f80..8fbcd89ab53 100644
--- a/usr.bin/telnet/main.c
+++ b/usr.bin/telnet/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.30 2014/07/22 07:30:24 jsg Exp $ */
+/* $OpenBSD: main.c,v 1.31 2015/11/13 17:01:12 deraadt Exp $ */
/* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */
/*
@@ -61,7 +61,7 @@ usage(void)
extern char *__progname;
(void)fprintf(stderr,
- "usage: %s [-4678acDdEKLr] [-b hostalias] [-e escapechar] "
+ "usage: %s [-4678acDEKLr] [-b hostalias] [-e escapechar] "
"[-l user]\n"
"\t[-n tracefile] [-V rtable] [host [port]]\n",
__progname);
@@ -95,7 +95,7 @@ main(int argc, char *argv[])
autologin = -1;
- while ((ch = getopt(argc, argv, "4678ab:cDdEe:KLl:n:rV:"))
+ while ((ch = getopt(argc, argv, "4678ab:cDEe:KLl:n:rV:"))
!= -1) {
switch(ch) {
case '4':
@@ -126,9 +126,6 @@ main(int argc, char *argv[])
env_define("DISPLAY", (unsigned char*)p);
break;
}
- case 'd':
- debug = 1;
- break;
case 'E':
rlogin = escape = _POSIX_VDISABLE;
break;
diff --git a/usr.bin/telnet/telnet.1 b/usr.bin/telnet/telnet.1
index f88035d7eca..ee6ac9ff20d 100644
--- a/usr.bin/telnet/telnet.1
+++ b/usr.bin/telnet/telnet.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: telnet.1,v 1.59 2015/11/13 16:53:46 deraadt Exp $
+.\" $OpenBSD: telnet.1,v 1.60 2015/11/13 17:01:12 deraadt Exp $
.\" $NetBSD: telnet.1,v 1.5 1996/02/28 21:04:12 thorpej Exp $
.\"
.\" Copyright (c) 1983, 1990, 1993
@@ -128,11 +128,6 @@ variable when it starts with
or
.Sq unix: .
By default, these are replaced with the local hostname and a colon.
-.It Fl d
-Sets the initial value of the
-.Ic debug
-toggle to
-.Dv TRUE .
.It Fl E
Stops any character from being recognized as an escape character.
.It Fl e Ar escapechar
@@ -1180,10 +1175,6 @@ This mode is not very useful unless the remote host
only sends carriage return, but never line feeds.
The initial value for this toggle is
.Dv FALSE .
-.It Ic debug
-Toggles socket level debugging (useful only to the superuser).
-The initial value for this toggle is
-.Dv FALSE .
.It Ic localchars
If this is
.Dv TRUE ,
diff --git a/usr.bin/telnet/telnet.c b/usr.bin/telnet/telnet.c
index 445d980509f..acf914d92c4 100644
--- a/usr.bin/telnet/telnet.c
+++ b/usr.bin/telnet/telnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: telnet.c,v 1.30 2014/09/09 03:41:08 guenther Exp $ */
+/* $OpenBSD: telnet.c,v 1.31 2015/11/13 17:01:12 deraadt Exp $ */
/* $NetBSD: telnet.c,v 1.7 1996/02/28 21:04:15 thorpej Exp $ */
/*
@@ -83,7 +83,6 @@ int
connected,
showoptions,
ISend, /* trying to send network data in */
- debug = 0,
crmod,
netdata, /* Print out network data flow */
crlf, /* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */