Juli Mallett
2061e87111
Don't risk catching a signal while handling a signal for a dying child, as we
...
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
2002-05-27 08:10:24 +00:00
Sheldon Hearn
fa3e900453
Don't use non-signal-safe functions (exit(3) in this case) in
...
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
2002-02-05 15:20:02 +00:00
Mark Murray
7a32b4b1c6
Merge from master (crypto) telnet. WARNS fixes for alpha.
2001-12-03 12:41:19 +00:00
Mark Murray
33cc94ddaf
Merge the (in)complete ANSIfication work from src/crypto/telnet.
2001-11-30 22:37:28 +00:00
Mark Murray
e895047b95
After running a "make unifdef", commit the resultant diffs.
...
This code is now a complete sunset of the crypto (master) code.
2001-11-30 22:03:20 +00:00
Mark Murray
6b022d0047
Manually unifdef(1) CRAY, UNICOS, hpux and sun uselsess code.
2001-08-29 14:16:17 +00:00
Mark Murray
aa71cb52b5
Feature merging and diff reduction between this code and crypto telnet.
...
Also remove conditional (AUTHENTICATION) code as we have never compiled
it here, and it is doubtful that it even works in this scenario.
2001-08-20 12:12:27 +00:00
Brian Somers
7bc6d0158f
Fix the type of the NULL arg to execl()
...
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Guy Helmer
7582054e10
Fix the number of bytes allocated by realloc when more space is needed
...
for the vector of arguments.
MFC after: 1 week
2001-06-07 20:05:18 +00:00
Jeroen Ruigrok van der Werven
1debc9f69d
Synch: Properly constify sccsid[].
...
Replace bcopy() with memmove().
2001-02-07 22:25:56 +00:00
Assar Westerlund
ba688fa510
(scrub_env): change to only accept a listed set of variables,
...
including only non-filename contents for TERMCAP
2000-12-10 20:50:20 +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
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
Peter Wemm
7f3dea244c
$Id$ -> $FreeBSD$
1999-08-28 00:22:10 +00:00
Jordan K. Hubbard
ef4aaceaa0
Back out previous commit - it's not necessary now that tty.h properly includes
...
the queue macros.
1999-08-09 07:51:03 +00:00
Brian Feldman
3452a15dcf
Add a missing include (sys/queue.h for sys/tty.h SLIST usage.)
1999-08-09 02:19:38 +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
John Birrell
ad12d72a41
Remove a bogus prototype for time() and let time.h do that.
...
Change pointer casts from int to long. The code that looks to index -1
of argv is still broken on alpha.
1998-05-14 10:07:29 +00:00
Warner Losh
d3a9dd61ac
sprintf->snprintf paranoia. The one thing that looks like a hole in
...
the diff is in an ifdef that isn't enabled for FreeBSD.
Obtained from: OpenBSD(?)
1997-12-24 19:21:09 +00:00
Philippe Charnier
5f806c3ccf
Use err(3). Remove progname and trailing \n in syslog strings.
1997-12-03 07:16:08 +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
Andrey A. Chernov
d7582593f6
Remove LD_NOSTD_PATH unsetenv, isn't exist anymore
1995-10-24 06:50:45 +00:00
Andrey A. Chernov
d549e5cc7f
Fix original patch error with ! before strncmp
...
Zap only needed LD_* variables
1995-10-20 22:17:35 +00:00
Andrey A. Chernov
68942f23dd
Don't allow LD_* env. variables to be tricked
...
Submitted by: Sam Hartman <hartmans@mit.edu>
1995-10-20 17:26:40 +00:00
Paul Traina
b74fc1026f
Move erase cleanup outside linemode conditional
1995-09-06 02:03:36 +00:00
Paul Traina
e22b1cd1ca
Properly set the erase character for the login prompt.
...
Submitted by: John Capo <jc@irbs.com> & Peter Wemm
1995-09-05 17:38:31 +00:00
Andreas Schulz
c4dfd14ae0
Fix some typos in a comment BUAD -> BAUD.
1995-08-05 18:16:50 +00:00
Andrey A. Chernov
955db62afa
Use the same DECODE_BAUD trick like in new telnetd to obtain
...
termios speed.
Obtained from: Pre-Lite2 telnet
1995-08-02 11:20:05 +00:00
Rodney W. Grimes
6c06b4e2aa
Remove trailing whitespace.
1995-05-30 05:51:47 +00:00
Andrey A. Chernov
d3e6b9f393
Fix bug:
...
When hostname len > 8, name replaced with dot notation when -u flag
not specified (default case).
Use _PATH_* for utmp/wtmp.
1995-04-26 22:33:15 +00:00
Jordan K. Hubbard
1338e00966
Support for >32 PTYs.
...
Submitted by: Heikki Suonsivu <hsu@cs.hut.fi>
1995-02-09 11:11:01 +00:00
Guido van Rooij
e27eb9e8ec
Plug already known security hole. (Brought over from 1.1.5):
...
Fixed security problem with telnetd, which allowed
telnet -l -hcert.org localhost
to change the user's host in utmp.
Thanks to Matthew Green <mrgreen@@mame.mu.oz.au> for showing me this one.
Reviewed by: karl, guido
Submitted by: mrgreen@@mame.mu.oz.au
1994-08-15 20:06:13 +00:00
Rodney W. Grimes
ea022d1687
BSD 4.4 Lite Libexec Sources
1994-05-27 12:39:25 +00:00