Commit Graph

21 Commits

Author SHA1 Message Date
Gavin Atkinson
84f70ae360 Make WARNS=6 safe.
Tested by:	make universe
2010-06-28 08:30:10 +00:00
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Colin Percival
54ca359425 Two fixes here:
1. If fgets fails, don't go into an infinite cpu-intensive loop.  Instead,
check to see if the terminal still exists, and sleep(1) otherwise.
2. When we check to see if the terminal still exists, make sure we're not
mislead by EINTR.  This could have been a security issue, but fortunately
the current implementation of tcgetattr doesn't EINTR.

PR: bin/60758
Approved by: rwatson (mentor)
2004-01-22 04:24:15 +00:00
Alexander Kabaev
84c0a48249 Eliminate last three uses of varargs.h in the tree. These three files
were including varargs.h file but did not use any of its macros,
so they escaped the clean-up before.
2003-09-01 04:12:18 +00:00
Tim J. Robbins
f8e84641ec Make this work without COMPAT_43 by using tcgetattr()/tcsetattr() instead
of ioctl TIOCGETP/TIOCSETP.
2003-02-10 02:08:49 +00:00
David Malone
f4ac32def2 ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
2002-09-04 23:29:10 +00:00
Dima Dorfman
16a8de73d2 Add a -v option that prevents switching virtual terminals while this
terminal is locked.  This permits the user to easily lock the entire
console from a single terminal.
2002-07-28 07:13:53 +00:00
Dima Dorfman
046e2b07fa Correct a comment: Typing in the root password at the "Key:" prompt
doesn't (and shouldn't) work.
2002-07-10 04:05:33 +00:00
Dima Dorfman
d80646a4a0 Fix indentation: Don't use space where tabs will do; specifically,
don't use spaces at the beginning of a line where tabs are normally
used (the worst thing was that half of this file was right (tabs) and
half was wrong (spaces), making for painful reading).

Reviewed by:	/sbin/md5, diff -b
2002-07-10 04:03:33 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
David Malone
4285ad09c9 Warns cleanups:
Signal handlers are supposed to take an int as an arg.
Don't locally declare crypt or ttyname.
2001-12-03 21:01:52 +00:00
Jacques Vidrine
64ff567e0a Fix a style bug that I introduced (both sys/param.h and sys/types.h
included).

Caught by:	sheldonh@freebsd.org
1999-10-12 13:53:30 +00:00
Jacques Vidrine
65c543c764 log root unlock attempts
PR:	bin/13932
1999-10-12 13:33:48 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Bruce Evans
375557fcad Don't assume that time_t is long. 1998-06-29 17:06:00 +00:00
Philippe Charnier
a4a2bc1716 Use err(3). Add usage(). 1997-07-21 12:09:34 +00:00
Warner Losh
1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Ollivier Robert
2280509ca1 Closes PR bin/1567
/usr/bin/lock can be used to lock a terminal much like xlock does
for your X-windows session.  Problem is, /usr/bin/lock cannot lock
your terminal indefinately.  Rather you must specify a timeout
value, after which, your terminal is unlocked and become unsecured.

I have added a ``-n'' no timeout option to /usr/bin/lock
Currently the only way to get this functionality is to use a huge
timeout value and hope it is long enought (in time).  This method
also requires you to know the maxium number of minutes you are
allowed to specify.

Submitted by:	David E. O'Brien <obrien@Nuxi.cs.ucdavis.edu>
1996-09-14 09:00:52 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00