summaryrefslogtreecommitdiffstats
path: root/usr.bin/lock
Commit message (Collapse)AuthorAgeFilesLines
* Check the return error of set[e][ug]id. While this can never fail in theeadler2012-10-221-1/+3
| | | | | | | | | | current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days
* Rework all non-contributed files that use `struct timezone'.ed2012-09-011-18/+15
| | | | | | | | | | | | | | This structure is not part of POSIX. According to POSIX, gettimeofday() has the following prototype: int gettimeofday(struct timeval *restrict tp, void *restrict tzp); Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is not used). Remove dead error handling code. Also use NULL for a nul-pointer instead of integer 0. While there, change all pieces of code that only use tv_sec to use time(3), as this provides less overhead.
* Handle NULL return from crypt(3). Mostly from DragonFlykevlo2012-02-221-2/+3
|
* Add missing static keywords to lock(1)ed2011-11-061-12/+12
|
* Fix style bug introduced in r216696.ed2010-12-271-1/+2
| | | | Additional indentation caused the line to become longer than 80 columns.
* Slightly improve output of lock(1).ed2010-12-251-1/+8
| | | | | | - Remove the /dev/ portion of the TTY name. - In case we use lock -p, print the username that was used to obtain the password hash.
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-112-8/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Make WARNS=6 safe.gavin2010-06-282-5/+4
| | | | Tested by: make universe
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-0/+2
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+1
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-1/+0
| | | | Tested with: make universe
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+2
|
* Two fixes here:cperciva2004-01-221-2/+4
| | | | | | | | | | | 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)
* Eliminate last three uses of varargs.h in the tree. These three fileskan2003-09-011-1/+0
| | | | | were including varargs.h file but did not use any of its macros, so they escaped the clean-up before.
* Introduce options definition the standard way.charnier2003-06-091-3/+2
|
* Document the fact that VTY locking is easily bypassable when DDBmux2003-02-271-1/+5
| | | | is compiled in the kernel. Also add some useful xrefs to lock(1).
* Make this work without COMPAT_43 by using tcgetattr()/tcsetattr() insteadtjr2003-02-101-10/+10
| | | | of ioctl TIOCGETP/TIOCSETP.
* ANSIify function definitions.dwmalone2002-09-041-4/+2
| | | | | | | | | 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
* Add a -v option that prevents switching virtual terminals while thisdd2002-07-282-13/+47
| | | | | terminal is locked. This permits the user to easily lock the entire console from a single terminal.
* Correct a comment: Typing in the root password at the "Key:" promptdd2002-07-101-2/+2
| | | | doesn't (and shouldn't) work.
* Fix indentation: Don't use space where tabs will do; specifically,dd2002-07-101-30/+30
| | | | | | | | 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
* Consistently use FBSDIDobrien2002-06-301-2/+2
|
* Use `The .Nm utility'charnier2002-04-201-2/+3
|
* remove __Pimp2002-03-221-2/+4
|
* Remove leaf node WARNS?=2 (that mainly I added). This shouldmarkm2002-02-081-1/+0
| | | | help the GCC3 transition and CURRENT in general.
* Warns cleanups:dwmalone2001-12-032-8/+8
| | | | | Signal handlers are supposed to take an int as an arg. Don't locally declare crypt or ttyname.
* Set BINOWN=root explicitly for setuid root binaries.ru2001-09-131-0/+1
| | | | | | This is not "useless", as one may have non-default setting for BINOWN in make.conf, and we still want these to be installed setuid root in this case.
* Remove whitespace at EOL.dd2001-07-151-1/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* Revert the libcrypt/libmd stuff back to how it was. This should not havepeter1999-12-181-2/+2
| | | | | | | | happened as it was working around problems elsewhere (ie: binutils/ld not doing the right thing according to the ELF design). libcrypt has been adjusted to not need the runtime -lmd. It's still not quite right (ld is supposed to work damnit) but at least it doesn't impact all the users of libcrypt in Marcel's cross-build model.
* Add libmd (or move it after libcrypt). We don't want the linker to bemarcel1999-12-161-2/+3
| | | | | smart because it will definitely get it wrong. This popped up during cross-linking.
* Fix a style bug that I introduced (both sys/param.h and sys/types.hnectar1999-10-121-1/+0
| | | | | | included). Caught by: sheldonh@freebsd.org
* log root unlock attemptsnectar1999-10-121-1/+15
| | | | PR: bin/13932
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Remove useless `BINOWN=root' now that it is the default.obrien1998-09-191-1/+0
|
* Don't assume that time_t is long.bde1998-06-291-2/+4
|
* Use err(3). Add usage().charnier1997-07-211-28/+31
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Closes PR bin/1567roberto1996-09-142-9/+32
| | | | | | | | | | | | | | | /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>
* Add dependencies on libraries to DPADD. Someday this should be donebde1994-08-281-0/+1
| | | | | | automagically. -lfoo has to be right to work, but ${LIBFO0} is too easy to forget or misspell; nothing checks it and it should be different for shared libraries.
* LDADD= -lcryptcsgr1994-08-201-0/+1
| | | | Submitted by: Geoff
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-273-0/+298
OpenPOWER on IntegriCloud