Commit Graph

67 Commits

Author SHA1 Message Date
gnn
dea97c6292 Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by:    bz
Approved by:    re


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@171135 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2007-07-01 12:08:08 +00:00
ru
461fc455ee Markup nits.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@162826 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2006-09-29 22:51:29 +00:00
maxim
2a1a3f355d o Mention .telnetrc DEFAULT keyword.
PR:		bin/100496 (sort of)
Obtained from:	NetBSD, heas@netbsd
MFC after:	3 weeks


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@162402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2006-09-18 15:03:18 +00:00
nectar
e1492a80cd Correct a pair of buffer overflows in the telnet(1) command:
(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>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@144231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-03-28 14:45:12 +00:00
tobez
0f4e951657 Increase usefulness of telnet(1) as a protocol tester. By prepending
"+" 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


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@142790 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-02-28 12:46:53 +00:00
ru
26fb67c648 - Soften sentence breaks.
- Remove double whitespace.
- Sort sections.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@140601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-01-21 21:57:05 +00:00
maxim
82ff960df9 o Make telnet[d] -S (IP TOS) flag really work. We do not have
/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


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@139937 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-01-09 10:24:46 +00:00
maxim
e5dfcfd096 o Remove -t flag from getopt(3), it was killed in rev. 1.15 three
years ago.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@139711 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-01-05 09:47:10 +00:00
maxim
cff120dc74 o Print a correct status for unix domain sockets.
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


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@139687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2005-01-04 21:22:32 +00:00
ume
97005ca0b5 Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(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


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@121472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-10-24 18:26:30 +00:00
ume
425407c55a EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493
(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


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@121425 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-10-23 13:55:36 +00:00
markm
4369ac2a7f Fix up external variables named "debug" that have a horrible habit
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)


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@114911 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-05-11 18:17:00 +00:00
obrien
90a2e082b9 Use __FBSDID vs. rcsid[]. Also protect sccs[] and copyright[] from GCC 3.3.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@114630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2003-05-04 02:54:49 +00:00
eric
9e0282c9ca Merge argument parsing changes into this copy of telnet.
Submitted by:	markm
Approved by:	bmah


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@107299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-11-27 06:34:24 +00:00
dd
a2b2e46019 Permit the argument to the -s option to be a hostname. I see no
reason to restrict this to a numeric address.

PR:		41841
Submitted by:	Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>,
		Maxim Maximov <mcsi@agava.com>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@104331 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-10-02 00:27:14 +00:00
markm
112a50cd56 Catch up with "base" telnet.
s/FALL THROUGH/FALLTHROUGH/ for lint(1).
s/Usage/usage/ for consistency.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@103955 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-09-25 07:26:25 +00:00
markm
b4c79417a1 From the requestor:
"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


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@103954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-09-25 07:24:01 +00:00
alfred
0a0dabb57b unbreak build:
commands.c, sys_bsd.c: comment out/remove junk after #endif/#else
network.c, terminal.c, utlities.c: include stdlib.h for exit(3)


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@96385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2002-05-11 03:19:44 +00:00
jkh
0dcd34090c Don't assume that the number of fds to select on is known quantity (in
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


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-12-09 09:53:27 +00:00
jhay
0b3113dc49 Protect variables and function prototypes that are only used in the INET6
case with an ifdef INET6.

This make the fixit floppy compile again.

Reviewed by:	markm


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-12-03 17:42:02 +00:00
markm
0efd3a3530 help the alphas out with the WARNS=2 stuff.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-12-03 12:13:18 +00:00
markm
a88d48b9df Damn. The previous mega-commit was incomplete WRT ANSIfication. This
fixes that.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87155 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-11-30 22:28:07 +00:00
markm
820d180830 Very large style makeover.
1) ANSIfy.
2) Clean up ifdefs so that
   a) ones that never/always apply are appropriately either
      fully removed, or just the #if junk is removed.
   b) change #if defined(FOO) for appropiate values of FOO.
      (currently AUTHENTICATION and ENCRYPTION)
3) WARNS=2 fixing
4) GC other unused stuff

This code can now be unifdef(1)ed to make non-crypto telnet.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@87139 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-11-30 21:06:38 +00:00
markm
3efb267b2d Manually unifdef(1) CRAY, UNICOS, hpux and sun uselsess code.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@82497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-08-29 14:16:17 +00:00
markm
0fd2377dcc Code merge and diff reduce with "base" telnet. This is the "later"
telnet, so it was treated as the reference code, except where later
commits were made to "base" telnet.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@81965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-08-20 12:28:40 +00:00
horikawa
65d4fa535a Removal of following export controll related sentences:
o Because of export controls, TELNET ENCRYPT option is not supported outside
  of the United States and Canada.
o Because of export controls, data encryption
  is not supported outside of the United States and Canada.

src/crypto/README revision 1.5 commit log says:
> Crypto sources are no longer export controlled:
> Explain, why crypto sources are still in crypto/.
and actually telnet encryption is used outside of US and Canada now.

Pointed out by: OHSAWA Chitoshi <ohsawa@catv1.ccn-net.ne.jp>
Reviewed by: no objection on doc


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@81665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-08-15 01:30:25 +00:00
ru
bcdf745b83 mdoc(7) police: removed HISTORY info from the .Os call.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@79528 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-07-10 10:42:19 +00:00
ru
af631c25e4 mdoc(7) police: merge all fixes from non-crypto version.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@79324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-07-05 14:08:12 +00:00
ru
6024787790 MF non-crypto: 1.13: document -u in usage.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@79323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-07-05 14:06:27 +00:00
dillon
508568b464 Oops, forgot the 'u' in the getopt for the previous commit.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@77105 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-05-24 00:14:19 +00:00
dillon
c5ebb16d3c A feature to allow one to telnet to a unix domain socket. (MFC from
non-crypto version)

Also update the crypto telnet's man page to reflect other options
ported from the non-crypto version.

Obtained from:   Lyndon Nerenberg <lyndon@orthanc.ab.ca>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@77095 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-05-23 22:54:07 +00:00
peter
b33b21628e Back out last commit. This was already fixed. This should never have
happened, this is why we have commit mail expressly delivered to
committers.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@76712 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-05-17 03:14:42 +00:00
nsayer
7005445e10 Since the root-on-insecure-tty code was added to telnetd, a dependency
on char *line was added to libtelnet. Put a dummy one in to keep the
linker happy.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@76697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-05-16 20:34:42 +00:00
peter
8e7393fb93 Hack to work around braindeath in libtelnet:sra.c. The sra.o file
references global variables from telnetd, but is also linked into
telnet as well. I was tempted to back out the last sra.c change
as it is 100% bogus and should be taken out and shot, but for now
this bandaid should get world working again. :-(


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@76616 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-05-15 09:52:03 +00:00
ru
ff3aa86c66 mdoc(7) police: removed hard sentence breaks introduced in rev.1.10.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@75465 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-04-13 08:49:52 +00:00
nsayer
eca1a06f99 Clean up telnet's argument processing a bit. autologin and encryption is
now the default, so ignore the arguments that turn it on. Add a new -y
argument to turn off encryption in case someone wants to do that. Sync
these changes with the man page (including removing the now obsolete
statement about availability only in the US and Canada).


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@75263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-04-06 15:56:10 +00:00
nsayer
785ba71778 Reactivate SRA.
Make handling of SIGINT and SIGQUIT follow SIGTSTP in TerminalNewMode().
This allows people to break out of SRA authentication if they wish to.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@75236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-04-05 14:09:15 +00:00
assar
cd5df88636 enable auto-negotiation of encrypt and decrypt
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@74138 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-03-12 03:54:48 +00:00
asmodai
47df13c3d8 Fix typo: seperate -> separate.
Seperate does not exist in the english language.

Submitted to look at by:	kris


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@72089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-02-06 10:39:38 +00:00
asmodai
80f3e3bc78 Fix typo: wierd -> weird.
There is no such thing as wierd in the english language.


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@72083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-02-06 09:32:26 +00:00
ru
aea25d194d mdoc(7) police: split punctuation characters + misc fixes.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@71899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-02-01 17:12:45 +00:00
ru
9e4c977b52 Prepare for mdoc(7)NG.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@70890 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2001-01-10 16:51:28 +00:00
kris
312e8003c1 Correct definition of MAXHOSTNAMELEN in ifdef'ed code.
Submitted by:	Edwin Groothuis <mavetju@chello.nl>
PR:		bin/22787


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@69223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-11-26 21:37:51 +00:00
ru
eec40d7c66 mdoc(7) police: use the new features of the Nm macro.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@68965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-11-20 20:10:44 +00:00
kris
53049b911e Fix a buffer overflow from a long local hostname.
Obtained from:	OpenBSD


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@68891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-11-19 10:08:26 +00:00
ru
0ee5242ab6 Avoid use of direct troff requests in mdoc(7) manual pages.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@68575 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-11-10 17:46:15 +00:00
kris
2ffcc09501 Sync with usr.bin/telnet/telnet.c r1.9 - fix buffer overflow in DISPLAY
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@67827 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-10-29 00:10:14 +00:00
ume
a2af2980e2 Fix buffer size of ALIGNed buffer.
PR:		bin/20053
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@63662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-07-20 14:54:04 +00:00
peter
1448d0f1e3 Add missing $FreeBSD$ to files that are NOT still on vendor a branch.
git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@63248 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-07-16 05:48:49 +00:00
ume
7b1c9dcfd4 Make telnet -s work. It is corresponding to EAI_NONAME -> EAI_NODATA
change (getaddrinfo.c rev 1.12).


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@62805 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
2000-07-08 05:22:00 +00:00