aboutsummaryrefslogtreecommitdiff
path: root/crypto/telnet/telnetd
Commit message (Collapse)AuthorAgeFilesLines
* Very big makeover in the way telnet, telnetd and libtelnet are built.Mark Murray2003-07-1613-7703/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, there were two copies of telnet; a non-crypto version that lived in the usual places, and a crypto version that lived in crypto/telnet/. The latter was built in a broken manner somewhat akin to other "contribified" sources. This meant that there were 4 telnets competing with each other at build time - KerberosIV, Kerberos5, plain-old-secure and base. KerberosIV is no longer in the running, but the other three took it in turns to jump all over each other during a "make buildworld". As the crypto issue has been clarified, and crypto _calls_ are not a problem, crypto/telnet has been repo-copied to contrib/telnet, and with this commit, all telnets are now "contribified". The contrib path was chosen to not destroy history in the repository, and differs from other contrib/ entries in that it may be worked on as "normal" BSD code. There is no dangerous crypto in these sources, only a very weak system less strong than enigma(1). Kerberos5 telnet and Secure telnet are now selected by using the usual macros in /etc/make.conf, and the build process is unsurprising and less treacherous. Notes: svn path=/head/; revision=117675
* Fix up external variables named "debug" that have a horrible habitMark Murray2003-05-111-1/+1
| | | | | | | | | | | 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) Notes: svn path=/head/; revision=114911
* Use __FBSDID vs. rcsid[]. Also protect sccs[] and copyright[] from GCC 3.3.David E. O'Brien2003-05-048-32/+32
| | | | Notes: svn path=/head/; revision=114630
* Catch up with "base" telnet.Mark Murray2002-09-251-3/+3
| | | | | | | s/FALL THROUGH/FALLTHROUGH/ for lint(1). Notes: svn path=/head/; revision=103956
* Don't risk catching a signal while handling a signal for a dying child, as weJuli Mallett2002-05-271-0/+8
| | | | | | | | | | | | can then end up not properly clearing wtmp/utmp entries. PR: bin/37934 Submitted by: Sandeep Kumar <skumar@juniper.net> Reviewed by: markm MFC after: 2 weeks Notes: svn path=/head/; revision=97341
* Don't use non-signal-safe functions (exit(3) in this case) inSheldon Hearn2002-02-051-1/+1
| | | | | | | | | | | | | | signal handlers. In this case, use _exit(2) instead, following the call to shutdown(2). This fixes rare telnetd hangs. PR: misc/33672 Submitted by: Umesh Krishnaswamy <umesh@juniper.net> MFC after: 1 month Notes: svn path=/head/; revision=90242
* mdoc(7) police: remove -r from SYNOPSIS, sort -p in DESCRIPTION.Ruslan Ermilov2001-12-141-6/+5
| | | | Notes: svn path=/head/; revision=87882
* Fixed bugs from previous revision.Ruslan Ermilov2001-12-041-1/+2
| | | | | | | Removed -s from SYNOPSIS and restored -S in DESCRIPTION. Notes: svn path=/head/; revision=87358
* More help for alpha WARNS=2. This code is, erm, unusual. Anyone whoMark Murray2001-12-031-4/+4
| | | | | | | feels like rewriting it will meet no objection from me. Notes: svn path=/head/; revision=87267
* Damn. The previous mega-commit was incomplete WRT ANSIfication. ThisMark Murray2001-11-303-103/+95
| | | | | | | fixes that. Notes: svn path=/head/; revision=87155
* Very large style makeover.Mark Murray2001-11-3010-1133/+387
| | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=87139
* Manually unifdef(1) CRAY, UNICOS, hpux and sun uselsess code.Mark Murray2001-08-297-885/+5
| | | | Notes: svn path=/head/; revision=82497
* Remove description of an option that only applies to UNICOS < 7.0.Dima Dorfman2001-08-251-13/+0
| | | | | | | | | | That define may still be present in the source, but I don't think anyone has plans to try to use it. Obtained from: NetBSD Notes: svn path=/head/; revision=82326
* Code merge and diff reduce with "base" telnet. This is the "later"Mark Murray2001-08-208-50/+76
| | | | | | | | telnet, so it was treated as the reference code, except where later commits were made to "base" telnet. Notes: svn path=/head/; revision=81965
* mdoc(7) police: s/BSD/.Bx/ where appropriate.Ruslan Ermilov2001-08-141-3/+6
| | | | Notes: svn path=/head/; revision=81622
* output_data(), output_datalen() and netflush() didn't actually guaranteeKris Kennaway2001-07-236-45/+50
| | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=80224
* More potential buffer overflow fixes.Ruslan Ermilov2001-07-204-35/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=80038
* vsnprintf() can return a value larger than the buffer size.Ruslan Ermilov2001-07-191-1/+1
| | | | | | | | Submitted by: assar Obtained from: OpenBSD Notes: svn path=/head/; revision=79992
* Fixed the exploitable remote buffer overflow.Ruslan Ermilov2001-07-196-314/+219
| | | | | | | | | Reported on: bugtraq Obtained from: Heimdal, NetBSD Reviewed by: obrien, imp Notes: svn path=/head/; revision=79981
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-2/+1
| | | | Notes: svn path=/head/; revision=79528
* Synch: Add $FreeBSD$.Jeroen Ruigrok van der Werven2001-02-071-0/+1
| | | | Notes: svn path=/head/; revision=72139
* Fix typo: seperate -> separate.Jeroen Ruigrok van der Werven2001-02-061-1/+1
| | | | | | | | | Seperate does not exist in the english language. Submitted to look at by: kris Notes: svn path=/head/; revision=72089
* Fix typo: wierd -> weird.Jeroen Ruigrok van der Werven2001-02-061-1/+1
| | | | | | | There is no such thing as wierd in the english language. Notes: svn path=/head/; revision=72083
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-9/+9
| | | | Notes: svn path=/head/; revision=71899
* Prepare for mdoc(7)NG.Ruslan Ermilov2001-01-101-2/+6
| | | | Notes: svn path=/head/; revision=70890
* (scrub_env): change to only accept a listed set of variables,Assar Westerlund2000-12-101-23/+37
| | | | | | | including only non-filename contents for TERMCAP Notes: svn path=/head/; revision=69825
* Add more environment variables to be filtered through scrub_env().Jeroen Ruigrok van der Werven2000-11-301-0/+7
| | | | | | | Synched from normal telnet. Notes: svn path=/head/; revision=69389
* String paranoia fix. Synched from normal telnet.Jeroen Ruigrok van der Werven2000-11-301-2/+2
| | | | Notes: svn path=/head/; revision=69387
* String paranoia. Merged from regular telnet.Jeroen Ruigrok van der Werven2000-11-301-2/+2
| | | | Notes: svn path=/head/; revision=69384
* Correct definition of MAXHOSTNAMELEN in ifdef'ed code.Kris Kennaway2000-11-261-1/+1
| | | | | | | | Submitted by: Edwin Groothuis <mavetju@chello.nl> PR: bin/22787 Notes: svn path=/head/; revision=69223
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-2/+2
| | | | Notes: svn path=/head/; revision=68965
* Avoid use of direct troff requests in mdoc(7) manual pages.Ruslan Ermilov2000-11-101-2/+0
| | | | Notes: svn path=/head/; revision=68575
* Add missing $FreeBSD$ to files that are NOT still on vendor a branch.Peter Wemm2000-07-161-0/+1
| | | | Notes: svn path=/head/; revision=63248
* Freefall/Internat diff reducer.Mark Murray2000-02-241-1/+1
| | | | Notes: svn path=/head/; revision=57414
* another tcp apps IPv6 updates.(should be make world safe)Yoshinobu Inoue2000-01-272-36/+59
| | | | | | | | | | ftp, telnet, ftpd, faithd also telnet related sync with crypto, secure, kerberosIV Obtained from: KAME project Notes: svn path=/head/; revision=56668
* $Id$ -> $FreeBSD$Peter Wemm1999-08-288-8/+8
| | | | Notes: svn path=/head/; revision=50479
* According to Mark Murray, Makefiles do not belong here. I guess we'reNick Sayer1999-08-161-24/+0
| | | | | | | going to have to figure something else out. Notes: svn path=/head/; revision=49901
* Add SRA authentication to src/crypto/telnet.Nick Sayer1999-08-161-0/+24
| | | | | | | | | | | | | | | | | | | | | | | SRA does a Diffie-Hellmen exchange and then DES-encrypts the authentication data. If the authentication is successful, it also sets up a session key for DES encryption. SRA was originally developed at Texas A&M University. This code is probably export restricted (despite the fact that I originally found it at a University in Germany). SRA is not perfect. It is vulnerable to monkey-in-the-middle attacks and does not use tremendously large DH constants (and thus an individual exchange probably could be factored in a few days on modern CPU horsepower). It does not, however, require any changes in user or administrative behavior and foils session hijacking and sniffing. The goal of this commit is that telnet and telnetd end up in the DES distribution and that therefore an encrypted session telnet becomes standard issue for FreeBSD. Notes: svn path=/head/; revision=49887
* MF libexec/telnetd: Determine the host name using an array size ofBrian Somers1999-04-081-2/+3
| | | | | | | | MAXHOSTNAMELEN and call trimdomain() before implementing the -u option. Notes: svn path=/head/; revision=45493
* MF libexec/telnetd: MAXHOSTNAMELEN & -u fixes.Brian Somers1999-04-072-8/+16
| | | | Notes: svn path=/head/; revision=45428
* Use realhostname().Brian Somers1999-04-061-39/+9
| | | | Notes: svn path=/head/; revision=45395
* MF src/libexec/telnetd: Verify the reverse DNS lookupBrian Somers1999-04-061-2/+18
| | | | | | | | ala rlogind. Suggested by: markm Notes: svn path=/head/; revision=45377
* Old stuff laying around: Don't use getstr which can conflict with somePeter Wemm1998-12-161-5/+5
| | | | | | | curses/termcap/terminfo implementations and causes recursion. Notes: svn path=/head/; revision=41858
* Old stuff from a source tree: copy (verbatum) the code to expand thePeter Wemm1998-12-161-2/+31
| | | | | | | %s/%m in the default /etc/gettytab. Notes: svn path=/head/; revision=41856
* Remove redundant decl. of time(). Causes problems on alphaGary Palmer1998-09-011-2/+1
| | | | Notes: svn path=/head/; revision=38728
* MFC: sprintf paranoiaWarner Losh1998-01-221-7/+8
| | | | Notes: svn path=/head/; revision=32688
* MFC: no \n in syslog strings. Change -P to -p in flags. EOF -> -1. Use err(3).Philippe Charnier1997-12-089-139/+165
| | | | Notes: svn path=/head/; revision=31622
* PR: bin/771 and bin/1037 are resolved by this changeFrank Durda IV1997-10-081-0/+16
| | | | | | | | | | | | | | | | | | | This change changes the default handling of linemode so that older and/or stupider telnet clients can still get wakeup characters like <ESC> and <CTRL>D to work correctly multiple times on the same line, as in csh "set filec" operations. It also causes CR and LF characters to be read by apps in certain terminal modes consistently, as opposed to returning CR sometimes and LF sometimes, which broke existing apps. The change was shown to fix the problem demonstrated in the FreeBSD telnet client, along with the telnet client in Solaris, SCO, Windows '95 & NT, DEC OSF, NCSA, and others. A similar change was incorporated in the non-crypto version of telnetd. This resolves bin/771 and bin/1037. Notes: svn path=/head/; revision=30212
* Bring the FreeBSD changes to the virgin sources.Mark Murray1997-09-0710-108/+174
| | | | Notes: svn path=/head/; revision=29181
* Initial import of BSD telnet. This will be used to build the kerberisedMark Murray1997-09-0413-0/+9252
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) Notes: svn path=/vendor-crypto/telnet/dist/; revision=29088