summaryrefslogtreecommitdiffstats
path: root/contrib/telnet
Commit message (Collapse)AuthorAgeFilesLines
* telnet: Fix infinite loop if local output generates SIGPIPE.jilles2010-04-306-16/+17
| | | | | | | | | | | | | | | | | Instead of catching SIGPIPE and jumping out of the signal handler with longjmp, ignore it and handle write errors to the local output by exiting from there. I have changed the error message to mention the local output instead of NetBSD's wrong "Connection closed by foreign host". Write errors to the network were already handled by exiting immediately and this now applies to EPIPE too. The code assumed that SIGPIPE could only be generated by the network connection; if it was generated by the local output, it would longjmp out of the signal handler and write an error message which caused another SIGPIPE. PR: 19773 Obtained from: NetBSD MFC after: 1 week
* Forgot a part that was missing in the previous commit.ed2010-01-131-1/+0
| | | | | There is no need to call trimdomain() anymore now that ut_host is big enough to fit decent hostnames.
* Let telnetd build without utmp and logwtmp(3).ed2010-01-132-19/+1
| | | | | | | Just like rlogind, there is no need to change the ownership of the terminal during shutdown anymore. Also don't call logwtmp, because the login(1)/PAM is responsible for doing this. Also use SHUT_RDWR instead of 2.
* Remove unneeded inclusion of <utmp.h> and dead variables.ed2009-12-271-14/+0
|
* Use <termios.h> instead of <sys/termios.h>.ed2009-11-281-1/+1
| | | | <sys/termios.h> only works on FreeBSD by accident.
* Rename all symbols in libmp(3) to mp_*, just like Solaris.ed2009-02-261-43/+43
| | | | | | | | | | | | The function pow() in libmp(3) clashes with pow(3) in libm. We could rename this single function, but we can just take the same approach as the Solaris folks did, which is to prefix all function names with mp_. libmp(3) isn't really popular nowadays. I suspect not a single application in ports depends on it. There's still a chance, so I've increased the SHLIB_MAJOR and __FreeBSD_version. Reviewed by: deischen, rdivacky
* Correctly scrub telnetd's environment.cperciva2009-02-161-4/+19
| | | | | Approved by: so (cperciva) Security: FreeBSD-SA-09:05.telnetd
* Use strlcpy() instead of strcpy().ed2008-11-131-1/+2
| | | | Requested by: mlaier
* Convert telnetd(8) to use posix_openpt(2).ed2008-11-132-36/+21
| | | | | | | | | | | | | | | | | | Some time ago I got some reports MPSAFE TTY broke telnetd(8). Even though it turned out to be a different problem within the TTY code, I spotted a small issue with telnetd(8). Instead of allocating PTY's using openpty(3) or posix_openpt(2), it used its own PTY allocation routine. This means that telnetd(8) still uses /dev/ptyXX-style devices. I've also increased the size of line[]. Even though 16 should be enough, we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives us a little more freedom. Also enable -DSTREAMSPTY. Otherwise telnetd(8) strips the PTY's pathname to the latest slash instead of just removing "/dev/" (e.g. /dev/pts/0 -> 0, instead of pts/0). Reviewed by: rink
* Fix TELOPT(opt) when opt > TELOPT_TN3270E.antoine2008-09-131-2/+2
| | | | | | PR: 127194 Submitted by: Joost Bekkers MFC after: 1 month
* List authentication types supported with "-X" taken from the libtelnettrhodes2008-08-291-1/+10
| | | | | | code. PR: 121721
* Don't attempt authentication at all if it has been disabled via '-a off'.jhb2008-07-282-7/+11
| | | | | | | | | This works around a bug in HP-UX's telnet client and also gives a much saner user experience when using FreeBSD's telnet client. PR: bin/19405 Submitted by: Joel Ray Holveck joelh of gnu.org MFC after: 1 month
* Commit IPv6 support for FAST_IPSEC to the tree.gnn2007-07-011-1/+1
| | | | | | | | This commit includes all remaining changes for the time being including user space updates. Submitted by: bz Approved by: re
* Markup nits.ru2006-09-291-2/+2
|
* Remove bogus casts of valid integer ioctl() arguments.ru2006-09-261-4/+4
|
* o Mention .telnetrc DEFAULT keyword.maxim2006-09-181-1/+8
| | | | | | PR: bin/100496 (sort of) Obtained from: NetBSD, heas@netbsd MFC after: 3 weeks
* NI_WITHSCOPEID cleanupume2005-05-211-1/+1
|
* Correct a pair of buffer overflows in the telnet(1) command:nectar2005-03-281-6/+24
| | | | | | | | | | | | | | | | | | | | (CAN-2005-0468) A heap buffer overflow in env_opt_add() and related functions. (CAN-2005-0469) A global uninitialized data section buffer overflow in slc_add_reply() and related functions. As a result of these vulnerabilities, it may be possible for a malicious telnet server or active network attacker to cause telnet(1) to execute arbitrary code with the privileges of the user running it. Security: CAN-2005-0468, CAN-2005-0469 Security: FreeBSD-SA-05:01.telnet Security: http://www.idefense.com/application/poi/display?id=220&type=vulnerabilities Security: http://www.idefense.com/application/poi/display?id=221&type=vulnerabilities These fixes are based in part on patches Submitted by: Solar Designer <solar@openwall.com>
* Increase usefulness of telnet(1) as a protocol tester. By prependingtobez2005-02-283-4/+23
| | | | | | | | | | "+" to the port number, disable option negotiation and allow transferring of data with high bit set. OKed by: markm (maintainer) PR: 52032 Submitted by: Valentin Nechayev <netch maybe-at netch stop kiev stop ua> MFC After: 2 weeks
* - Soften sentence breaks.ru2005-01-212-71/+112
| | | | | - Remove double whitespace. - Sort sections.
* o Make telnet[d] -S (IP TOS) flag really work. We do not havemaxim2005-01-093-10/+32
| | | | | | | | | /etc/iptos implementation so only numeric values supported. o telnetd.8: steal the -S flag description from telnet.1, bump the date of the document. MFC after: 6 weeks
* o Add -4 and -6 flags to a man page and usage(). Bump the man pagemaxim2005-01-052-3/+12
| | | | date.
* o Remove -t flag from getopt(3), it was killed in rev. 1.15 threemaxim2005-01-051-1/+1
| | | | years ago.
* o Print a correct status for unix domain sockets.maxim2005-01-041-0/+2
| | | | | | | | | o Restore input mode when return from the command one. PR: bin/49983 Submitted by: Volker Stolz OK in general from: markm MFC after: 1 month
* Add missing () to function invocation.kan2004-07-281-1/+1
|
* Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542ume2003-10-241-16/+9
| | | | | | | | | | (aka RFC2292bis). Though I believe this commit doesn't break backward compatibility againt existing binaries, it breaks backward compatibility of API. Now, the applications which use Advanced Sockets API such as telnet, ping6, mld6query and traceroute6 use RFC3542 API. Obtained from: KAME
* EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493ume2003-10-231-2/+2
| | | | | | | | (aka RFC2553bis). Now, getaddrinfo(3) returns EAI_NONAME instead of EAI_NODATA. Our getaddrinfo(3) nor getnameinfo(3) didn't use EAI_ADDRFAMILY. Obtained from: KAME
* Implement what has been documented for a long time: make -debug switchharti2003-08-131-0/+5
| | | | | | on socket debugging. Okay'ed by: markm
* Fix up external variables named "debug" that have a horrible habitmarkm2003-05-115-8/+8
| | | | | | | | of conflicting with other, similarly named functions in static libraries. This is done mostly by renaming the var if it is shared amongst modules, or making it static otherwise. OK'ed by: re(scottl)
* Use __FBSDID vs. rcsid[]. Also protect sccs[] and copyright[] from GCC 3.3.obrien2003-05-0419-81/+79
|
* Unbreak Kerberos 5 authentication in telnet.nectar2003-03-061-0/+24
| | | | | | (Credential forwarding is still broken.) PR: bin/45397
* Background:nectar2003-01-292-14/+2
| | | | | | | | | | | | | | | | | | | | | When libdes was replaced with OpenSSL's libcrypto, there were a few interfaces that the former implemented but the latter did not. Because some software in the base system still depended upon these interfaces, we simply included them in our libcrypto (rnd_keys.c). Now, finally get around to removing the dependencies on these interfaces. There were basically two cases: des_new_random_key -- This is just a wrapper for des_random_key, and these calls were replaced. des_init_random_number_generator et. al. -- A few functions were used by the application to seed libdes's PRNG. These are not necessary when using libcrypto, as OpenSSL internally seeds the PRNG from /dev/random. These calls were simply removed. Again, some of the Kerberos 4 files have been taken off the vendor branch. I do not expect there to be future imports of KTH Kerberos 4.
* add more RFC defined telnet optionsbillf2003-01-181-3/+8
| | | | Reviewed by: ps
* Merge argument parsing changes into this copy of telnet.eric2002-11-271-2/+6
| | | | | Submitted by: markm Approved by: bmah
* Permit the argument to the -s option to be a hostname. I see nodd2002-10-021-1/+0
| | | | | | | | reason to restrict this to a numeric address. PR: 41841 Submitted by: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>, Maxim Maximov <mcsi@agava.com>
* Catch up with "base" telnet.markm2002-09-251-3/+3
| | | | s/FALL THROUGH/FALLTHROUGH/ for lint(1).
* Catch up with "base" telnet.markm2002-09-253-12/+8
| | | | | s/FALL THROUGH/FALLTHROUGH/ for lint(1). s/Usage/usage/ for consistency.
* From the requestor:markm2002-09-251-1/+1
| | | | | | | | "Could you do me a favor and fix sys_bsd.c to get the howmany() macro from <sys/param.h>, instead of <sys/types.h>? This will save me from having to worry about the unsync'd bits before making the change." Requested by: mike
* Encrypted strings (after hex decoding) aren't null terminated, becausensayer2002-08-221-4/+0
| | | | | | | | 0 might simply be part of the ciphertext. PR: bin/40266 Submitted by: andr@dgap.mipt.ru MFC after: 3 days
* Warnings fixes. Sort out some variable types.markm2002-06-261-6/+7
|
* Help fix warnings by marking an argument as unused.markm2002-06-261-0/+1
|
* Don't risk catching a signal while handling a signal for a dying child, as wejmallett2002-05-271-0/+8
| | | | | | | | | can then end up not properly clearing wtmp/utmp entries. PR: bin/37934 Submitted by: Sandeep Kumar <skumar@juniper.net> Reviewed by: markm MFC after: 2 weeks
* unbreak build:alfred2002-05-115-3/+7
| | | | | commands.c, sys_bsd.c: comment out/remove junk after #endif/#else network.c, terminal.c, utlities.c: include stdlib.h for exit(3)
* Fix an external declaration that was causing telnetd to core dump.markm2002-05-061-1/+1
| | | | | MFC after: 1 week PR: 37766
* Update build after import of Heimdal Kerberos 2002/02/17.nectar2002-02-191-1/+1
|
* Don't use non-signal-safe functions (exit(3) in this case) insheldonh2002-02-051-1/+1
| | | | | | | | | | | signal handlers. In this case, use _exit(2) instead, following the call to shutdown(2). This fixes rare telnetd hangs. PR: misc/33672 Submitted by: Umesh Krishnaswamy <umesh@juniper.net> MFC after: 1 month
* mdoc(7) police: remove -r from SYNOPSIS, sort -p in DESCRIPTION.ru2001-12-141-6/+5
|
* Don't assume that the number of fds to select on is known quantity (injkh2001-12-091-32/+56
| | | | | | | | this case 16). Use dynamic FD_SETs and calculated high-water marks throughout. There are also too many versions of telnet in the tree. Obtained from: OpenBSD and Apple's Radar database MFC after: 2 days
* Fixed bugs from previous revision.ru2001-12-041-1/+2
| | | | Removed -s from SYNOPSIS and restored -S in DESCRIPTION.
* Protect variables and function prototypes that are only used in the INET6jhay2001-12-031-1/+7
| | | | | | | | case with an ifdef INET6. This make the fixit floppy compile again. Reviewed by: markm
OpenPOWER on IntegriCloud