Commit Graph

27 Commits

Author SHA1 Message Date
Jeroen Ruigrok van der Werven
f09deb6962 Fix typo: wierd -> weird.
There is no such thing as wierd in the english language.
2001-02-06 09:25:10 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Kris Kennaway
f6fd83ed27 Correct definition of MAXHOSTNAMELEN in ifdef'ed code.
Submitted by:	Edwin Groothuis <mavetju@chello.nl>
PR:		bin/22787
2000-11-26 21:37:51 +00:00
Kris Kennaway
75dd9c65fa Don't use sizeof() on a pointer when we really wanted to measure
the length of the array.

Noticed by:	Christos Zoulas <christos@ZOULAS.COM>
Obtained from:	OpenBSD
2000-11-19 10:01:27 +00:00
Kris Kennaway
4147bd4426 Filter out some more magic environment variables used by libraries linked
with telnetd. This should really be done with a positive filter - i.e.
only allow through a configured list of variables.

Also do some buffer-safety cleanups while I'm here - I don't think these
are exploitable.
2000-10-31 05:29:54 +00:00
Yoshinobu Inoue
0cac72f42c several tcp apps IPv6 update
-inetd
 -rshd
 -rlogind
 -telnetd
 -rsh
 -rlogin

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
2000-01-25 14:52:10 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Brian Somers
d5cf830ef1 Determine the host name using an array size of
MAXHOSTNAMELEN and call trimdomain() before implementing
the -u option.

This allows local hosts of a lan with a long domain name to
appear properly in utmp by base host name (w/o domain) rather
than by IP number.
1999-04-08 21:36:27 +00:00
Brian Somers
aae211bc7e Really fix -u.... 1999-04-07 08:39:54 +00:00
Brian Somers
9e9a43bdec Ensure that things returned by gethostname() and
friends are terminated and allow for a maximum
host name length of MAXHOSTNAMELEN - 1.
Put parenthesis around sizeof args.
Make some variables static.
Fix telnetd -u (broken by my last commit)

Prompted by: bde
1999-04-07 08:27:45 +00:00
Brian Somers
32af26a501 Use realhostname() rather than various combinations of
gethostbyaddr() & gethostbyname().

Remove brokeness in ftpd for hosts of MAXHOSTNAMELEN length.
1999-04-06 23:06:00 +00:00
Brian Somers
51d8a6713f After receiving a connection and doing a reverse
lookup on the incoming IP, do a forward lookup on
the result and make sure that the IP is in the
resulting list.  If it's not, put the IP number
in utmp/wtmp instead of the rogue name.

Stolen from: rlogind
Suggested by: sef
1999-04-06 00:29:41 +00:00
Peter Wemm
3cc1b1bf9c Old stuff laying around: Don't use a function called getstr(), that has
nasty consequences when the system curses is ncurses as this conflicts
with a ncurses funciton and causes recursion.
1998-12-16 06:04:29 +00:00
Poul-Henning Kamp
5708bd4228 telnetd does not recognize the if (display file before login) gettytab flag.
PR:		6365
Reviewed by:	phk
Submitted by:	Jason Garman <init@risen.org>
1998-04-26 06:51:36 +00:00
Philippe Charnier
5f806c3ccf Use err(3). Remove progname and trailing \n in syslog strings. 1997-12-03 07:16:08 +00:00
Frank Durda IV
f05011e686 PR: bin/771 and bin/1037 are resolved by this change
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 will be incorporated in the crypto version of telnetd.

This resolves bin/771 and bin/1037.
1997-10-08 03:10:32 +00:00
Warner Losh
91477cc4d7 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:48:21 +00:00
Peter Wemm
9e522f7a18 Revert $FreeBSD$ to $Id$ 1997-02-22 14:22:49 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Paul Traina
a29e4eaa60 Some buffer overrun fixes and removed check for username starting with "-"
(replacied it with a getopt stopper (--) instead, which is more correct).

Obtained from: OpenBSD
1997-01-07 19:00:52 +00:00
Wolfram Schneider
148531ef1e add forgotten $Id$ 1996-09-22 21:56:57 +00:00
Peter Wemm
326bbdd92f Add a ``-P altlogin'' option which allows the sysadmin to specify an
alternate login(1) type program to run.
1996-08-13 07:51:45 +00:00
David Greenman
430ff9b689 Fixed bug introduced with the change of startslave()...two arguments
were chopped off of the function call and garbage was passed instead.
The solution involves making some variable globals as well as fixing the
call to have all the arguments.
1995-09-11 20:54:49 +00:00
Paul Traina
575ecb340a Delay starting login process until option negotiation is complete to
avoid race condition on connections with larger round-trip-times.

Submitted by:	John Capo & Peter Wemm
1995-09-05 17:34:29 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Geoff Rehmet
46592ab983 Remove the scary bits from telnetd - no more encryption left here.
Only crypt.c in libc remains.
Reviewed by:	Geoff Rehmet
1994-08-12 23:00:04 +00:00
Rodney W. Grimes
ea022d1687 BSD 4.4 Lite Libexec Sources 1994-05-27 12:39:25 +00:00