History log of /freebsd-10.1-release/contrib/telnet/telnetd/state.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 241021 28-Sep-2012 kevlo

Make sure that each va_start has one and only one matching va_end,
especially in error cases.


# 180931 28-Jul-2008 jhb

Don't attempt authentication at all if it has been disabled via '-a off'.
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


# 114630 04-May-2003 obrien

Use __FBSDID vs. rcsid[]. Also protect sccs[] and copyright[] from GCC 3.3.


# 103956 25-Sep-2002 markm

Catch up with "base" telnet.
s/FALL THROUGH/FALLTHROUGH/ for lint(1).


# 87139 30-Nov-2001 markm

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.


# 82497 29-Aug-2001 markm

Manually unifdef(1) CRAY, UNICOS, hpux and sun uselsess code.


# 81965 20-Aug-2001 markm

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.


# 80224 23-Jul-2001 kris

output_data(), output_datalen() and netflush() didn't actually guarantee
to do what they are supposed to: under some circumstances output data would
be truncated, or the buffer would not actually be flushed (possibly leading
to overflows when the caller assumes the operation succeeded). Change the
semantics so that these functions ensure they complete the operation before
returning.

Comment out diagnostic code enabled by '-D reports' which causes an
infinite recursion and an eventual crash.

Patch developed with assistance from ru and assar.


# 80038 20-Jul-2001 ru

More potential buffer overflow fixes.

o Fixed `nfrontp' calculations in output_data(). If `remaining' is
initially zero, it was possible for `nfrontp' to be decremented.

Noticed by: dillon

o Replaced leaking writenet() with output_datalen():

: * writenet
: *
: * Just a handy little function to write a bit of raw data to the net.
: * It will force a transmit of the buffer if necessary
: *
: * arguments
: * ptr - A pointer to a character string to write
: * len - How many bytes to write
: */
: void
: writenet(ptr, len)
: register unsigned char *ptr;
: register int len;
: {
: /* flush buffer if no room for new data) */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: if ((&netobuf[BUFSIZ] - nfrontp) < len) {
: /* if this fails, don't worry, buffer is a little big */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: netflush();
: }
:
: memmove(nfrontp, ptr, len);
: nfrontp += len;
:
: } /* end of writenet */

What an irony! :-)

o Optimized output_datalen() a bit.


# 79992 19-Jul-2001 ru

vsnprintf() can return a value larger than the buffer size.

Submitted by: assar
Obtained from: OpenBSD


# 79981 19-Jul-2001 ru

Fixed the exploitable remote buffer overflow.

Reported on: bugtraq
Obtained from: Heimdal, NetBSD
Reviewed by: obrien, imp


# 63249 16-Jul-2000 peter

Forced commit. This is to try and help folks that used the international
crypto repo and have slightly different files but with the same version.
cvsup in 'checkout mode' has no trouble with this, but cvs can get really
silly about it.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 31622 08-Dec-1997 charnier

MFC: no \n in syslog strings. Change -P to -p in flags. EOF -> -1. Use err(3).


# 29181 07-Sep-1997 markm

Bring the FreeBSD changes to the virgin sources.


# 29089 04-Sep-1997 markm

This commit was generated by cvs2svn to compensate for changes in r29088,
which included commits to RCS files with non-trunk default branches.


# 29088 04-Sep-1997 markm

Initial import of BSD telnet. This will be used to build the kerberised
telnet, and after userland diffs have been merged in, will be used to
build the non-kerberised sources as well. (See unifdef(1) for details)