summaryrefslogtreecommitdiff
path: root/usr.bin/telnet
AgeCommit message (Collapse)Author
2023-02-08telnet: fix prototypes for two signal handlers to make clang 15 happyTheo Buehler
2022-12-26spelling fixes; from paul tagliamonteJason McIntyre
amendments to his diff are noted on tech
2022-12-04userspace: remove vestigial '?' cases from top-level getopt(3) loopsScott Soule Cheloha
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
2020-01-16Usually, -width Fl (which is 10n) is too wide and hence ugly.Ingo Schwarze
Change several instances, most of them to the usual -width Ds.
2019-07-11I visited telnet to find and fix some monster bug, and within 20 minutesTheo de Raadt
rediscovered that telnet has more more signal race conditions and trashing of global state than all the rest of the openbsd source tree (where signal races have either been fixed or marked with "XXX signal race". I don't feel like being a hero here today, so I'm fixing a whitespace error in an unrelated file.
2019-07-11on 12-Mar-98 when art replaced two sprintf calls with snprintf to avoidTheo de Raadt
an overflow, he left spaces at the end of the line. we have been incredibly sloppy and not notice his oversight for 21 years. bonus Y2K joke included.
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2018-09-30telnet argv parsing overflow; from YangX92Theo de Raadt
ok millert
2018-03-16improve markup quality in the cases found by the new "--" style messageIngo Schwarze
2017-08-22Use a boolean variable to remember the quotation level instead ofAlexander Bluhm
doing string pointer arithmetic. Fixes a clang warning. OK otto@ tom@
2017-07-19A few cleanups. This only needs to operate on systems with SIGWINCH,Theo de Raadt
SIGINFO, and Bxxxx values that equal xxxx. ok tom millert
2017-07-07Remove unnecessary #ifdefs in telnet. No binary change.Frederic Cambus
OK deraadt@, tedu@
2016-05-03telnet should not verify if hostname is a fully qualified domainAdam Wolk
telnet would perform a gethostbyname on close/quit commands when the machine hostname is not a fully qualified domain. This behavior added on 12-March-98 breaks the current pledge that "dns" operations are not needed after establishing a connection leading to a coredump from telnet when quiting or closing an existing connection. OK chris@
2016-03-16More "(<blah> *)0" -> NULL, avoiding any stdarg functions.Kenneth R Westerback
Feedback millert@ kettenis@
2016-01-26typosmmcc
2015-12-23Add rpath to telnet's more restrictive pledge; otherwise if the server requestsStuart Henderson
the client to send the next terminal-type (RFC-1091), the client tries to read terminfo files and is killed by pledge. Noticed when connecting to 4.3 BSD. ok semarie@ tb@
2015-12-09Remove NULL-checks before free(). ok tb@mmcc
2015-12-06Use __progname instead of manually handling argv[0].Tobias Stoeckmann
ok deraadt, mmcc, tedu
2015-11-29telnet: check if fd is a tty before calling tcsetattr(fd, TCSADRAIN)Sebastien Marie
ok deraadt@
2015-11-24Don't support repeated connections - avoids pledge problemsBob Beck
ok deraadt@, "god please commit before I see any more" tedu@
2015-11-20Replace hardcoded "2" with SHUT_RDWR; from Ricardo MestreJeremie Courreges-Anglas
2015-11-19how did the pledge "dns" get forgotten?!?! wow..Theo de Raadt
2015-11-13Ev SHELL no longer relevant;Jason McIntyre
2015-11-13remove -d from SYNOPSIS;Jason McIntyre
2015-11-13move pledge(2) after setrtable(2), like in nc(1);Ingo Schwarze
OK deraadt@
2015-11-13pledge "stdio rpath wpath getpw inet tty" at startup. After openingTheo de Raadt
the socket and entering the main loop, pledge "stdio tty". For my next trick, I will be adding chacha20-poly1305 support.
2015-11-13Use setrtable() for the entire process, rather than doing it for theTheo de Raadt
socket later. Same idea as in nc(1).
2015-11-13Remove support for the debug command; noone needs setsockopt SO_DEBUGTheo de Raadt
2015-11-13Delete tracefile command. Tracefiles can now only be specified atTheo de Raadt
program startup. Who uses that? Noone... ok millert
2015-11-13remove support for !shellTheo de Raadt
ok millert
2015-11-13remove skey supportTheo de Raadt
ok millert
2015-10-26Set low-delay traffic class for IPv6 connections as wellJeremie Courreges-Anglas
While here, there is no option to pass a different tos, and no other use of the "tos" variable out of tn(), so move the "tos" variable in tn() and assign it the right value from the start. ok millert@
2015-10-25Kill unused local var, and reorder while here.Jeremie Courreges-Anglas
2015-10-25We don't care about lack of source route support for IPv6.Jeremie Courreges-Anglas
ok sthen@ guenther@ mpi@ millert@
2015-10-25Kill IP Source Route support, unusable since 1998.Jeremie Courreges-Anglas
ok sthen@ guenther@ mpi@ millert@
2015-03-29Revert r1.29 "Don't clear ICRNL when editing mode is off, so that characterStuart Henderson
local echo mode don't echo ^M locally" as this causes problems sending CR to some Cisco equipment reported by Ryan Freeman and Fred Crowson. kettenis@ agrees with reverting to fix the regression; we can consider a better diff afterwards but clearly this is a sensitive area.
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2015-02-12Don't clear ICRNL when editing mode is off, so that character local echoPhilip Guenther
mode don't echo ^M locally analysis and patch from Stanislav Brabec (sbrabec (at) suse.cz)
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-11-15Reduce instances of `` '' in manuals.Anthony J. Bentley
troff displays these as typographic quotes, but nroff implementations almost always print them literally, which rarely has the intended effect with modern fonts, even in stock xterm. These uses of `` '' can be replaced either with more semantic alternatives or with Dq, which prints typographic quotes in a UTF-8 locale (but will automatically fall back to `` '' in an ASCII locale). improvements and ok schwarze@
2014-09-09Eliminate a pile of casts that were superfluous or wrong, or that werePhilip Guenther
the result of bad type choices, particularly (unsigned char *) vs (const char *). Also, use reallocarray().
2014-08-10Add Xr to skey and sttyPhilip Guenther
2014-07-22use ansi style function declarationsJonathan Gray
with suggestions from and ok guenther@
2014-07-20Eliminate silly call() routine that fakes up internal calls as ifPhilip Guenther
the user typed in undocumented arguments by splitting two functions and doing normal (shock!) C calls. Move extern declarations to externs.h Eliminate another function cast
2014-07-20Fix array overflow in command line handlingPhilip Guenther
2014-07-20Mark a slurry of functions as staticPhilip Guenther
Eliminate two more trivial wrappers
2014-07-20use NULL instead of 0 when dealing with pointersJonathan Gray
ok guenther@
2014-07-20Kill lint comments; mark ExitString() as __deadPhilip Guenther
2014-07-20Switch from memmove() to memcpy() where appropriate; simplify addressPhilip Guenther
parsing logic; eliminate an inefficient use of MIN() macro
2014-07-20VSUSP and SIGTSTP are required by POSIXPhilip Guenther