Home | History | Annotate | only in /src/lib/libtelnet
History log of /src/lib/libtelnet
RevisionDateAuthorComments
 1.37 21-May-2017  riastradh Remove MKCRYPTO option.

Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export. The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated. I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet... That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
 1.36 10-Aug-2012  joerg Don't depend on HAVE_GCC being always defined.
 1.35 21-Mar-2012  matt These directories default to WARNS?=5
 1.34 09-Jan-2012  christos PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.33 20-Jun-2011  mrg branches: 1.33.2;
remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
 1.32 24-Apr-2011  elric branches: 1.32.2;
We no longer need to -I/usr/include/krb5.
 1.31 29-Aug-2008  gmcgarry Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.
 1.30 12-Jul-2008  gmcgarry Add test for HAVE_PCC with HAVE_GCC which turn off compiler warning flags.
 1.29 03-May-2008  lukem branches: 1.29.2;
Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
 1.28 28-May-2007  tls branches: 1.28.10;
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.27 25-Jun-2006  mrg make MKCRYPTO=no work again.
 1.26 11-May-2006  mrg sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4.
 1.25 20-Mar-2006  christos Goodbye KerberosIV
 1.24 19-Feb-2005  christos Fix pk to use BN_ instead of libmp.
 1.23 19-Feb-2005  christos PAM support from FreeBSD.
 1.22 23-May-2004  lukem Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and
setting NOLINT, NOPIC, NOPROFILE (etc)
 1.21 11-Dec-2003  dyoung Fix the checkflist for builds without Kerberos 4 (MKKERBEROS4=no)
and without Kerberos 4 & 5 (MKKERBEROS=no). Previously checkflist
complained of missing files.

* move kerberos- and kerberos 4-only files into new flists,
distrib/sets/lists/*/krb.*

* make the flist generators grok MKKERBEROS{,4} variables

* fix Makefiles which treat MKKERBEROS=no as MKKERBEROS5=no.
9 out of 10 experts agree that it is ludicrous to build w/
KERBEROS4 and w/o KERBEROS5.

* fix header files, also, which treat MKKERBEROS=no as MKKERBEROS5=no.

* omit some Kerberos-only subdirectories from the build as
MKKERBEROS{,4} indicate

(I acknowledge the sentiment that flists are the wrong way to go,
and that the makefiles should produce the metalog directly. That
sounds to me like the right way to go, but I am not prepared to do
revamp all the makefiles. While my approach is expedient, it fits
painlessly within the current build architecture until we are
delivered from flist purgatory, and it does not postpone our
delivery. Fair enough?)
 1.20 23-Jul-2003  itojun no longer need to -I/usr/include first (yes, it's still confusing, i admit)
 1.19 23-Jul-2003  tron Fix build problem caused by recent "Makefile" changes.
 1.18 23-Jul-2003  itojun split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)
 1.17 16-Jul-2003  itojun do not build/install shlib
 1.16 28-Mar-2003  thorpej Remove GCC 3.3 hack; the libtelnet code has been changed to avoid the
warning.
 1.15 22-Mar-2002  thorpej Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)

* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.

As discussed on tech-toolchain.
 1.14 29-Jan-2002  thorpej Hack around GCC PR optmization/5230 if HAVE_GCC3 is set. (GCC 3.x
issues spurious warning when compiling a Duff's device with optimization.)
 1.13 05-Nov-2001  lukem explicitly set to WARNS?=1
 1.12 23-Jun-2000  thorpej Add MK... variables to enable/disable various aspects of building
crypto support into the system. See share/mk/bsd.README for more
a full description.
 1.11 22-Jun-2000  thorpej Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.10 20-Jun-2000  thorpej branches: 1.10.2;
Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
 1.9 20-Jul-1999  mrg branches: 1.9.6;
optionally include CRYPTOPATH Makefile.frag files.
 1.8 12-Jul-1999  thorpej Use bsd.crypto.mk.
 1.7 23-Oct-1997  lukem use CPPFLAGS instead of CFLAGS
 1.6 24-Feb-1996  jtk branches: 1.6.2;
update libtelnet with changes through 95.10.23 version
 1.5 25-Feb-1994  cgd we have cgetent()
 1.4 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 16-Jul-1993  brezak Be able to build telnet without enc_des.c
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.2.1 09-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.9.6.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.2.3 24-Jun-2000  thorpej Update from trunk:
Add MK... variables to enable/disable various aspects of building
crypto support into the system. See share/mk/bsd.README for more
a full description.
 1.10.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.10.2.1 20-Jun-2000  thorpej file Makefile was added on branch netbsd-1-5 on 2000-06-22 07:09:02 +0000
 1.28.10.1 18-May-2008  yamt sync with head.
 1.29.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.33.2.2 30-Oct-2012  yamt sync with head
 1.33.2.1 17-Apr-2012  yamt sync with head
 1.16 14-Dec-2018  christos more const
 1.15 20-Mar-2006  christos branches: 1.15.82; 1.15.84;
Remove KRB4 dependent code (Jukka Salmi)
 1.14 19-Feb-2005  christos PAM support from FreeBSD.
 1.13 06-Feb-2005  perry de-__P (really de-P)
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.10 14-Jul-2003  itojun be friendly to unifdef(1)
 1.9 06-Jan-2001  christos protect against multiple inclusions, and remove redundant decls.
 1.8 02-Jul-1999  simonb branches: 1.8.8;
More trailing white space.
 1.7 27-Jul-1998  mycroft const poisoning.
 1.6 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.5 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.4 05-Jun-1995  pk Prototypes (PR#1104).
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.8.1 05-Apr-2001  he Pull up revision 1.9 (requested by assar):
Upgrade Heimdal to version 0.3e.
 1.15.84.1 10-Jun-2019  christos Sync with HEAD
 1.15.82.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.25 19-Sep-2021  andvar s/Plese/Please/ in comment, and fix an article in obio_wdc.c comment.
 1.24 16-Dec-2018  maya unifdef RSA_ENCPWD. The matching code does not exist.
 1.23 15-Dec-2018  maya G/C SPX support

It was presented as a draft in 1993. I don't see any mentions since. it
was not enabled.
 1.22 14-Dec-2018  christos more const
 1.21 21-Mar-2012  matt branches: 1.21.30; 1.21.32;
Use C89 functions definitions.
Remove use of __P
 1.20 09-Jan-2012  christos PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.19 20-Mar-2006  christos branches: 1.19.42;
Goodbye KerberosIV
 1.18 19-Feb-2005  christos PAM support from FreeBSD.
 1.17 06-Feb-2005  perry de-__P (really de-P)
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.15 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.14 15-Jul-2003  itojun use bounded string op
 1.13 14-Jul-2003  itojun be friendly to unifdef(1)
 1.12 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.11 22-Jun-2000  thorpej Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.10 01-Feb-2000  thorpej branches: 1.10.4;
assar missed one net_write -> telnet_net_write
 1.9 27-Jul-1998  mycroft const poisoning.
 1.8 03-Mar-1998  thorpej Fix printf format on the Alpha.
 1.7 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.6 09-Oct-1997  lukem WARNSify
 1.5 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.4 05-Jun-1995  pk Prototypes (PR#1104).
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.4.1 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.19.42.1 17-Apr-2012  yamt sync with head
 1.21.32.1 10-Jun-2019  christos Sync with HEAD
 1.21.30.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.11 06-Feb-2005  perry de-__P (really de-P)
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.9 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.8 12-Sep-1999  aidan Make kerberos5 authentication work, and kerberos5 forwarding mostly work.
 1.7 30-Mar-1998  mycroft Add explicit int types for egcs.
 1.6 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.5 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.4 05-Jun-1995  pk Prototypes (PR#1104).
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11 29-Oct-2024  kre PR bin/58787 libtelnet - avoid using a global variable

From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
 1.10 05-Jan-2019  maya branches: 1.10.2; 1.10.10; 1.10.12;
Match the function prototype of encrypthandler instead of casting to it.
Make GCC 9 snapshot happier with the code

While here, remove unnecessary braces around return (KNF).
 1.9 09-Jan-2012  christos branches: 1.9.38; 1.9.40;
PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.8 06-Feb-2005  agc branches: 1.8.48;
Another fall-out from the de-__Ping round.
 1.7 06-Feb-2005  perry remove unneeded definition of "P" macro
 1.6 06-Feb-2005  perry de-__P (really de-P), and fix the broken prototype for printsub
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.4 22-Jun-2000  thorpej branches: 1.4.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.3 25-Feb-1994  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.4.2.1 22-Jun-2000  thorpej file enc-proto.h was added on branch netbsd-1-5 on 2000-06-22 07:09:02 +0000
 1.8.48.1 17-Apr-2012  yamt sync with head
 1.9.40.1 10-Jun-2019  christos Sync with HEAD
 1.9.38.1 18-Jan-2019  pgoyette Synch with HEAD
 1.10.12.1 02-Aug-2025  perseant Sync with HEAD
 1.10.10.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1013):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.10.2.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1927):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.18 29-Oct-2024  kre PR bin/58787 libtelnet - avoid using a global variable

From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
 1.17 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.16 21-Mar-2012  matt branches: 1.16.34; 1.16.42; 1.16.44;
Use C89 functions definitions.
Remove use of __P
 1.15 09-Jan-2012  christos PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.14 24-Jul-2011  mbalmer branches: 1.14.2;
Correct typo, while here, unfold lines.
 1.13 17-Jan-2007  hubertf Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
 1.12 06-Feb-2005  perry de-__P (really de-P)
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.10 15-Jul-2003  itojun use bounded string op
 1.9 29-Aug-2002  itojun backout previous, <des.h> is part of kerberos 4 API
 1.8 29-Aug-2002  itojun openssl/des.h, not des.h
 1.7 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.6 30-Nov-2001  lukem fix WARNS=2 warnings
 1.5 06-Jan-2001  christos eliminate redundant decls.
 1.4 22-Jun-2000  thorpej branches: 1.4.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.3 25-Feb-1994  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.3 05-Apr-2001  he Pull up revision 1.5 (requested by assar):
Upgrade Heimdal to version 0.3e.
 1.4.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.4.2.1 22-Jun-2000  thorpej file enc_des.c was added on branch netbsd-1-5 on 2000-06-22 07:09:02 +0000
 1.14.2.1 17-Apr-2012  yamt sync with head
 1.16.44.1 02-Aug-2025  perseant Sync with HEAD
 1.16.42.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1013):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.16.34.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1927):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.20 29-Oct-2024  kre PR bin/58787 libtelnet - avoid using a global variable

From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
 1.19 23-Feb-2022  andvar branches: 1.19.2; 1.19.4;
fix various typos in comments, mainly immediatly/immediately/,
as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.
 1.18 05-Jan-2019  maya branches: 1.18.2;
Match the function prototype of encrypthandler instead of casting to it.
Make GCC 9 snapshot happier with the code

While here, remove unnecessary braces around return (KNF).
 1.17 21-Mar-2012  matt branches: 1.17.30; 1.17.32;
Use C89 functions definitions.
Remove use of __P
 1.16 09-Jan-2012  christos PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.15 23-Dec-2011  christos Avoid buffer overflow, reported by Colin Percival at FreeBSD
 1.14 17-Jan-2007  hubertf branches: 1.14.18; 1.14.22; 1.14.26; 1.14.34;
Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
 1.13 06-Feb-2005  perry branches: 1.13.10; 1.13.14;
de-__P (really de-P)
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 15-Jul-2003  itojun use bounded string op
 1.10 20-Jan-2003  simonb The Double-Semi-Colon Police.
 1.9 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.8 06-Jan-2001  christos eliminate redundant decls.
 1.7 22-Jun-2000  thorpej Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.6 27-Feb-1998  christos branches: 1.6.10;
WARNSify and RCSID cleanups
 1.5 09-Oct-1997  lukem WARNSify
 1.4 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.10.2 05-Apr-2001  he Pull up revision 1.8 (requested by assar):
Upgrade Heimdal to version 0.3e.
 1.6.10.1 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.13.14.1 31-Dec-2011  snj Pull up following revision(s) (requested by christos in ticket #1440):
lib/libtelnet/encrypt.c: revision 1.15
Avoid buffer overflow, reported by Colin Percival at FreeBSD
 1.13.10.1 31-Dec-2011  snj Pull up following revision(s) (requested by christos in ticket #1440):
lib/libtelnet/encrypt.c: revision 1.15
Avoid buffer overflow, reported by Colin Percival at FreeBSD
 1.14.34.1 17-Apr-2012  yamt sync with head
 1.14.26.1 31-Dec-2011  snj Pull up following revision(s) (requested by christos in ticket #1704):
lib/libtelnet/encrypt.c: revision 1.15
Avoid buffer overflow, reported by Colin Percival at FreeBSD
 1.14.22.1 31-Dec-2011  snj Pull up following revision(s) (requested by christos in ticket #1704):
lib/libtelnet/encrypt.c: revision 1.15
Avoid buffer overflow, reported by Colin Percival at FreeBSD
 1.14.18.1 31-Dec-2011  snj Pull up following revision(s) (requested by christos in ticket #1704):
lib/libtelnet/encrypt.c: revision 1.15
Avoid buffer overflow, reported by Colin Percival at FreeBSD
 1.17.32.1 10-Jun-2019  christos Sync with HEAD
 1.17.30.1 18-Jan-2019  pgoyette Synch with HEAD
 1.18.2.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1927):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.19.4.1 02-Aug-2025  perseant Sync with HEAD
 1.19.2.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1013):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.10 29-Oct-2024  kre PR bin/58787 libtelnet - avoid using a global variable

From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
 1.9 09-Jan-2012  christos branches: 1.9.42; 1.9.50; 1.9.52;
PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.8 06-Feb-2005  perry branches: 1.8.48;
de-__P (really de-P)
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.6 22-Jun-2000  thorpej Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.5 27-Feb-1998  christos branches: 1.5.10;
WARNSify and RCSID cleanups
 1.4 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.5.10.1 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.8.48.1 17-Apr-2012  yamt sync with head
 1.9.52.1 02-Aug-2025  perseant Sync with HEAD
 1.9.50.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1013):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.9.42.1 18-Nov-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1927):

lib/libtelnet/encrypt.h: revision 1.10
libexec/telnetd/telnetd.c: revision 1.59
libexec/telnetd/sys_term.c: revision 1.50
lib/libtelnet/encrypt.c: revision 1.20
lib/libtelnet/enc_des.c: revision 1.18
lib/libtelnet/enc-proto.h: revision 1.11
libexec/telnetd/state.c: revision 1.33
libexec/telnetd/state.c: revision 1.35
libexec/telnetd/telnetd.c: revision 1.60

Fix memory leak - free resources allocated by getaddrinfo

Fix off by one in telrcv()

In case of "\r" in the data buffer, the code was unconditionally looking ahead
to next character, even if "\r" was last character in the buffer. That
condition leads to read outside of the data (one byte after the array)
Thanks christos@ for the review
PR bin/58787 libtelnet - avoid using a global variable


From RVP -- make 'encrypt_debug_mode' be a static (file scope)
variable instead of extern, and convert the (had been recently
anyway) unused function encrypt_debug() into an accensor function
for it.

This is the minor (almost irrelevant) change from PR bin/58787
PR bin/58787 telnetd - handle auto authentication better
Apparently from FreeBSD via RVP -- but FreeBSD deleted telnetd
more than 2 years ago, so I assume instead from

https://github.com/cschuber/freebsd-telnet/tree/main/contrib/telnet
 1.3 06-Feb-2005  perry de-__P (really de-P)
 1.2 15-Jul-2003  itojun use bounded string op
 1.1 22-Jun-2000  thorpej branches: 1.1.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.1.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.1.2.1 22-Jun-2000  thorpej file forward.c was added on branch netbsd-1-5 on 2000-06-22 07:09:03 +0000
 1.14 14-Dec-2018  christos more const
 1.13 21-Mar-2012  matt branches: 1.13.30; 1.13.32;
Use C89 functions definitions.
Remove use of __P
 1.12 09-Jan-2012  christos PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.11 28-Oct-2004  dsl branches: 1.11.48;
Use (unsigned char) cast to sanitise arguments to ctype functions.
 1.10 27-Oct-2004  dsl Fix a load of international alphabet problems with isxxx() and toupper()
Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the correct
piece of memory is looked at for the bit mask.
gcc optimises out the '& 0xff' (on i386 at least).
Fixes problems found by gcc when the splurious (int) cast is removed
from the #defines in ctype.h
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.8 06-Nov-1998  christos char -> unsigned char
 1.7 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.6 09-Oct-1997  lukem WARNSify
 1.5 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.4 05-Jun-1995  pk Prototypes (PR#1104).
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.48.1 17-Apr-2012  yamt sync with head
 1.13.32.1 10-Jun-2019  christos Sync with HEAD
 1.13.30.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.11 21-Mar-2012  matt Use C89 functions definitions.
Remove use of __P
 1.10 06-Feb-2005  perry branches: 1.10.48;
de-__P (really de-P)
 1.9 23-Apr-2004  christos sprinkle const.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.7 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.6 09-Oct-1997  lukem WARNSify
 1.5 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.4 05-Jun-1995  pk Prototypes (PR#1104).
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.48.1 17-Apr-2012  yamt sync with head
 1.17 20-Mar-2006  christos Goodbye KerberosIV
 1.16 19-Mar-2006  christos Coverity CID 1247: Don't use negative index.
 1.15 06-Feb-2005  perry de-__P (really de-P)
 1.14 21-Oct-2003  fvdl Don't compare an int to NULL.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.12 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.11 15-Jul-2003  itojun use bounded string op
 1.10 05-Nov-2002  thorpej Restructure the Duff's device in kerberos4_cksum() to avoid
a bogus unreachable-code warning from GCC 3.x.
 1.9 29-Aug-2002  itojun backout previous, <des.h> is part of kerberos 4 API
 1.8 29-Aug-2002  itojun openssl/des.h, not des.h
 1.7 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.6 30-Nov-2001  lukem fix WARNS=2 warnings
 1.5 06-Jan-2001  christos eliminate redundant decls.
 1.4 22-Jun-2000  thorpej branches: 1.4.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.3 25-Feb-1994  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.3 05-Apr-2001  he Pull up revision 1.5 (requested by assar):
Upgrade Heimdal to version 0.3e.
 1.4.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.4.2.1 22-Jun-2000  thorpej file kerberos.c was added on branch netbsd-1-5 on 2000-06-22 07:09:03 +0000
 1.21 12-Apr-2021  mrg pass the right enum to krb5_auth_con_setkeytype().
 1.20 26-Apr-2014  joerg Avoid enum type mismatch.
 1.19 09-Jan-2012  christos branches: 1.19.6; 1.19.16;
PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.18 24-Apr-2011  elric branches: 1.18.4;
Stop using functions that are deprecated in Heimdal.
 1.17 22-Mar-2006  christos Coverity CID 2757: Avoid leaking key_block
 1.16 19-Mar-2006  christos Revert part of previous free'ing because it was really a bug in -lkrb5.
Coverity CID 918: Avoid NULL deref (not strictly necessary).
 1.15 19-Mar-2006  christos Coverity CID 1907: Free keyblock, not just the contents.
 1.14 19-Apr-2005  christos check pwd != NULL
 1.13 09-Apr-2005  christos Use getpwnam_r. From john nemeth.
 1.12 07-Aug-2003  agc branches: 1.12.6;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.10 20-Sep-2002  thorpej context -> telnet_context in two places.
 1.9 20-Sep-2002  joda make sure the client creates a subkey; also make the server check that
it actually got a subkey, and if not use the session key
 1.8 17-Sep-2001  assar update infrastructure for krb4 1.1 and heimdal 0.4e
 1.7 11-Feb-2001  assar update for new libkrb5
 1.6 06-Jan-2001  christos eliminate redundant decls.
 1.5 17-Jul-2000  thorpej Handle krb5_init_context() failure, rather than dumping core.
 1.4 22-Jun-2000  thorpej branches: 1.4.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.3 25-Feb-1994  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.4 05-Apr-2001  he Pull up revisions 1.6-1.7 (requested by assar):
Upgrade Heimdal to version 0.3e.
 1.4.2.3 23-Jul-2000  thorpej Pull up rev. 1.5:
Handle krb5_init_context() failure, rather than dumping core.
 1.4.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.4.2.1 22-Jun-2000  thorpej file kerberos5.c was added on branch netbsd-1-5 on 2000-06-22 07:09:03 +0000
 1.12.6.2 09-Jul-2005  tron Pull up revision 1.14 (requested by lukem in ticket #536):
check pwd != NULL
 1.12.6.1 09-Jul-2005  tron Pull up revision 1.13 (requested by lukem in ticket #536):
Use getpwnam_r. From john nemeth.
 1.18.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.18.4.1 17-Apr-2012  yamt sync with head
 1.19.16.1 10-Aug-2014  tls Rebase.
 1.19.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6 06-Feb-2005  perry de-__P (really de-P)
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.4 22-Jun-2000  thorpej branches: 1.4.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.3 25-Feb-1994  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.4.2.1 22-Jun-2000  thorpej file key-proto.h was added on branch netbsd-1-5 on 2000-06-22 07:09:03 +0000
 1.9 20-Mar-2006  christos Goodbye KerberosIV
 1.8 19-Apr-2005  christos check pwd != NULL
 1.7 09-Apr-2005  christos Use getpwnam_r. From john nemeth.
 1.6 06-Feb-2005  perry branches: 1.6.2;
de-__P (really de-P)
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.4 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.3 15-Jul-2003  itojun use bounded string op
 1.2 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.1 22-Jun-2000  thorpej branches: 1.1.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.1.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.1.2.1 22-Jun-2000  thorpej file krb4encpwd.c was added on branch netbsd-1-5 on 2000-06-22 07:09:03 +0000
 1.6.2.2 09-Jul-2005  tron Pull up revision 1.8 (requested by lukem in ticket #536):
check pwd != NULL
 1.6.2.1 09-Jul-2005  tron Pull up revision 1.7 (requested by lukem in ticket #536):
Use getpwnam_r. From john nemeth.
 1.3 01-Mar-1995  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10 06-Feb-2005  perry de-__P (really de-P)
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.8 01-Feb-2000  assar (printd): update prorotype with const
(net_write): rename to telnet_net_write
 1.7 27-Jul-1998  mycroft const poisoning.
 1.6 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.5 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.4 05-Jun-1995  pk Prototypes (PR#1104).
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13 21-Mar-2012  matt Use C89 functions definitions.
Remove use of __P
 1.12 07-Aug-2003  agc branches: 1.12.54;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.11 14-Jul-2003  itojun be friendly to unifdef(1)
 1.10 22-Jun-2000  thorpej Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.9 01-Feb-2000  assar branches: 1.9.4;
(printd): const-poision
 1.8 28-Jul-1998  msaitoh add missing "const".
 1.7 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.6 09-Oct-1997  lukem WARNSify
 1.5 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.4 05-Jun-1995  pk Prototypes (PR#1104).
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.4.1 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.12.54.1 17-Apr-2012  yamt sync with head
 1.10 14-Dec-2018  christos more const
 1.9 09-Jan-2012  christos branches: 1.9.38; 1.9.40;
PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.8 06-Feb-2005  perry branches: 1.8.48;
de-__P (really de-P)
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.6 27-Jul-1998  mycroft const poisoning.
 1.5 27-Feb-1998  christos WARNSify and RCSID cleanups
 1.4 24-Feb-1996  jtk update libtelnet with changes through 95.10.23 version
 1.3 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.48.1 17-Apr-2012  yamt sync with head
 1.9.40.1 10-Jun-2019  christos Sync with HEAD
 1.9.38.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.4 19-Feb-2005  christos constify, whitespace.
 1.3 19-Feb-2005  christos Fix whitespace.
 1.2 19-Feb-2005  christos Fix pk to use BN_ instead of libmp.
 1.1 19-Feb-2005  christos PAM support from FreeBSD.
 1.2 19-Feb-2005  christos constify, whitespace.
 1.1 19-Feb-2005  christos PAM support from FreeBSD.
 1.11 11-Jan-2009  christos bump shared libraries.
 1.10 20-Mar-2006  christos Goodbye KerberosIV
 1.9 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.8 12-Apr-2001  itojun use openssl 0.9.6a. shlib major # is bumped for libcrypto, libssl and
all kerberos libraries.
 1.7 11-Feb-2001  assar update for new libkrb5
 1.6 20-Jun-2000  thorpej branches: 1.6.2;
Merge a bunch of things from crypto-us and crypto-intl into basesrc,
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate
bsd.crypto.mk.

There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
 1.5 24-Jun-1999  tls branches: 1.5.6;
bump shlib version number to match crypto-us version number (which was bumped b/c of new libdes version number, sigh)
 1.4 25-Feb-1999  abs Add a note to update src/distrib/sets/lists/base/shl.*, and add a missing
RCS Id.
 1.3 05-Jan-1998  perry RCSID Police.
 1.2 25-Feb-1994  cgd new libtelnet from ftp.cray.com. Encryption support ripped out, pending
figuring out what to do about it...
 1.1 08-Nov-1993  cgd add shlib_version file, with version 0.0
 1.5.6.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6.2.3 29-Aug-2002  he Pull up revision 1.8 (requested by itojun,he):
Update OpenSSL to version 0.9.6g. Includes major version bump for
libcrypto and all the dependent libraries.
 1.6.2.2 05-Apr-2001  he Pull up revision 1.7 (requested by assar):
Upgrade Heimdal to version 0.3e.
 1.6.2.1 20-Jun-2000  he file shlib_version was added on branch netbsd-1-5 on 2001-04-05 23:25:50 +0000
 1.9 15-Dec-2018  maya G/C SPX support

It was presented as a draft in 1993. I don't see any mentions since. it
was not enabled.
 1.8 13-Dec-2018  maya Remove unused code
 1.7 19-Apr-2005  christos branches: 1.7.82; 1.7.84;
check pwd != NULL
 1.6 09-Apr-2005  christos Use getpwnam_r. From john nemeth.
 1.5 07-Aug-2003  agc branches: 1.5.6;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.4 15-Jul-2003  itojun use bounded string op. bump shlib major for libtelnet due to API change.
 1.3 15-Jul-2003  itojun use bounded string op
 1.2 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.1 22-Jun-2000  thorpej branches: 1.1.2;
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.1.2.2 22-Jun-2000  thorpej Update from trunk:
Bring the telnet situation back into better shape. Specifically,
pull in just about all of the differences from the crypto-us telnet
suite (which includes Kerberos 4 and connection encryption support).
Also bring in the Kerberos 5 support from the Heimdal telnet, and
frob a little so that it can work with the non-Heimdal telnet suite.

There is still some work left to do, specifically:
- Add Heimdal's ticket forwarding support to the Berkeley Kerberos 4
module.
- Add connection encryption support to the Heimdal Kerberos 5
module. Hints on this can be taken from the MIT Kerberos 5
module which still exists in crypto-us.

However, even with the shortcomings listed above, this is a
better situation than using the stock Heimdal telnet suite,
which does not understand the IPSec policy stuff, and is also
based on much older code which contains bugs that we have already
fixed in the NetBSD sources.
 1.1.2.1 22-Jun-2000  thorpej file spx.c was added on branch netbsd-1-5 on 2000-06-22 07:09:03 +0000
 1.5.6.2 09-Jul-2005  tron Pull up revision 1.7 (requested by lukem in ticket #536):
check pwd != NULL
 1.5.6.1 09-Jul-2005  tron Pull up revision 1.6 (requested by lukem in ticket #536):
Use getpwnam_r. From john nemeth.
 1.7.84.1 10-Jun-2019  christos Sync with HEAD
 1.7.82.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.12 30-Oct-2021  nia libtelnet: convert malloc(x * y) to reallocarr
 1.11 09-Jan-2012  christos PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
 1.10 01-Jul-2011  christos branches: 1.10.2;
- use defines for lengths
- strlcpy/snprintf
- KNK
 1.9 01-Jul-2011  joerg Fix memset usage. XXX should use static allocate and proper sizeof()
 1.8 25-Oct-2005  christos eliminate unused passpromptlen and copy a default password each time we
don't receive one in SRA_CONTINUE.
 1.7 25-Oct-2005  christos XXX: SRA does not have a protocol feature to pass back a password prompt
which is needed for things like S/KEY. We abuse the SRA_CONTINUE message
passing the password prompt there. That is usually NULL, so SRA
implementations usually ignore it. While I am here, if telnet_gets() fails
[user hit <eof> for example], then we exit.
 1.6 05-May-2005  lukem Don't perform a check for "secure" tty for root logins when using PAM;
that is what we provide pam_securetty(8) for.

Fix the -DNOPAM build option by allowing it to compile
(even though we don't use this source file when USE_PAM=no).
 1.5 05-May-2005  lukem PAM may change the user name during the authentication process;
ensure that we deal with this so that SRA authenticated logins
will pass the changed user name to login(1).
 1.4 05-May-2005  lukem Fix the check for insecure root logins in rootterm():
- It was originally referring to a bogus version of `line'.
(problem solved by using 'extern char *line' instead of 'extern char line[]')
- It wasn't stripping the leading "/dev/" off `line' before calling getttynam(3)
 1.3 19-Apr-2005  christos check pwd != NULL
 1.2 09-Apr-2005  christos Use getpwnam_r. From john nemeth.
 1.1 19-Feb-2005  christos branches: 1.1.2;
PAM support from FreeBSD.
 1.1.2.5 09-Jul-2005  tron Pull up revision 1.3 (requested by lukem in ticket #536):
check pwd != NULL
 1.1.2.4 09-Jul-2005  tron Pull up revision 1.2 (requested by lukem in ticket #536):
Use getpwnam_r. From john nemeth.
 1.1.2.3 07-May-2005  tron Pull up revision 1.6 (requested by lukem in ticket #253):
Don't perform a check for "secure" tty for root logins when using PAM;
that is what we provide pam_securetty(8) for.
Fix the -DNOPAM build option by allowing it to compile
(even though we don't use this source file when USE_PAM=no).
 1.1.2.2 07-May-2005  tron Pull up revision 1.5 (requested by lukem in ticket #252):
PAM may change the user name during the authentication process;
ensure that we deal with this so that SRA authenticated logins
will pass the changed user name to login(1).
 1.1.2.1 07-May-2005  tron Pull up revision 1.4 (requested by lukem in ticket #248):
Fix the check for insecure root logins in rootterm():
- It was originally referring to a bogus version of `line'.
(problem solved by using 'extern char *line' instead of 'extern char line[]')
- It wasn't stripping the leading "/dev/" off `line' before calling getttynam(3)
 1.10.2.1 17-Apr-2012  yamt sync with head

RSS XML Feed