summaryrefslogtreecommitdiffstats
path: root/contrib/telnet/telnetd/utility.c
Commit message (Collapse)AuthorAgeFilesLines
* In contrib/telnet/telnetd/utility.c, fix a few warnings about formatdim2011-12-161-4/+4
| | | | | | strings not being literals. MFC after: 1 week
* Use __FBSDID vs. rcsid[]. Also protect sccs[] and copyright[] from GCC 3.3.obrien2003-05-041-4/+4
|
* Very large style makeover.markm2001-11-301-70/+44
| | | | | | | | | | | | | 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.
* Code merge and diff reduce with "base" telnet. This is the "later"markm2001-08-201-5/+1
| | | | | telnet, so it was treated as the reference code, except where later commits were made to "base" telnet.
* output_data(), output_datalen() and netflush() didn't actually guaranteekris2001-07-231-18/+21
| | | | | | | | | | | | | 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.
* More potential buffer overflow fixes.ru2001-07-201-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixed the exploitable remote buffer overflow.ru2001-07-191-255/+144
| | | | | | Reported on: bugtraq Obtained from: Heimdal, NetBSD Reviewed by: obrien, imp
* String paranoia. Merged from regular telnet.asmodai2000-11-301-2/+2
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Old stuff from a source tree: copy (verbatum) the code to expand thepeter1998-12-161-2/+31
| | | | %s/%m in the default /etc/gettytab.
* MFC: no \n in syslog strings. Change -P to -p in flags. EOF -> -1. Use err(3).charnier1997-12-081-9/+17
|
* Bring the FreeBSD changes to the virgin sources.markm1997-09-071-4/+21
|
* Initial import of BSD telnet. This will be used to build the kerberisedmarkm1997-09-041-0/+1192
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)
OpenPOWER on IntegriCloud