summaryrefslogtreecommitdiff
path: root/usr.bin/lock
Commit message (Collapse)AuthorAgeFilesLines
* lock(1): Add EXAMPLES sectionFernando Apesteguía2020-12-111-1/+6
| | | | | | | | | | | Add simple example showing the use of the flags: p, t, v Reviewed by: gbe@, yuripv@ Approved by: manpages (yuripv@) Differential Revision: https://reviews.freebsd.org/D27541 Notes: svn path=/head/; revision=368556
* Make lock(1) use PAM. This makes the -p option work again. (Well, kind of,Edward Tomasz Napierala2018-02-112-17/+38
| | | | | | | | | | | | | because the whole idea of this utility is rather broken.) This originally come from NetBSD, and was later reworked a bit. Reviewed by: des@ (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4981 Notes: svn path=/head/; revision=329123
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Correct sense of crypt(3) NULL checks in init(8) and lock(1)Conrad Meyer2017-10-031-1/+1
| | | | | | | | | | | | | | | | | | In r231994, an attempt was made to fix crypt(3) failure returns (NULL). However, instead of treating crypt(3) failure as authentication failure, some of the changes treated crypt(3) failure as authentication success. This is wrong. r324225 fixed this for ppp, which also inspired this review. The other changes in the 231994 revision were audited for correctness and look ok. Reviewed by: jhb Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12571 Notes: svn path=/head/; revision=324229
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-2/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-192-2/+5
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | Sync from headSimon J. Gerraty2012-11-041-19/+18
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | Missed comma.Sergey Kandaurov2014-08-261-1/+1
| | | | | | | | | | | | Notes: svn path=/head/; revision=270659
* | | More man pages that need to know about vt in addition to syscons.Stefan Eßer2014-08-261-0/+3
| | | | | | | | | | | | | | | | | | | | | MFC after: 3 dayS Notes: svn path=/head/; revision=270657
* | | Remove LOG_ODELAY because it does nothing.Neel Natu2014-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: jilles CR: https://reviews.freebsd.org/D611 Notes: svn path=/head/; revision=270111
* | | Rollback r266496.Aleksandr Rybalko2014-05-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Different meaning of flags for lock(1) and vidcontrol(1) confuse me. Pointy hat to: ray Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=266539
* | | Sync lock(1) on VT_LOCKSWITCH usage with syscons(4), vt(4) and vidcontrol(1).Aleksandr Rybalko2014-05-211-2/+2
| |/ |/| | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=266496
* | Check the return error of set[e][ug]id. While this can never fail in theEitan Adler2012-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 Notes: svn path=/head/; revision=241848
* | Rework all non-contributed files that use `struct timezone'.Ed Schouten2012-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. Notes: svn path=/head/; revision=239991
* Handle NULL return from crypt(3). Mostly from DragonFlyKevin Lo2012-02-221-2/+3
| | | | Notes: svn path=/head/; revision=231994
* Add missing static keywords to lock(1)Ed Schouten2011-11-061-12/+12
| | | | Notes: svn path=/head/; revision=227169
* Fix style bug introduced in r216696.Ed Schouten2010-12-271-1/+2
| | | | | | | Additional indentation caused the line to become longer than 80 columns. Notes: svn path=/head/; revision=216737
* Slightly improve output of lock(1).Ed Schouten2010-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. Notes: svn path=/head/; revision=216696
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-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 Notes: svn path=/head/; revision=216370
* Make WARNS=6 safe.Gavin Atkinson2010-06-282-5/+4
| | | | | | | Tested by: make universe Notes: svn path=/head/; revision=209567
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-131-0/+1
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-111-1/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-1/+2
| | | | Notes: svn path=/head/; revision=131491
* Two fixes here:Colin Percival2004-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) Notes: svn path=/head/; revision=124824
* Eliminate last three uses of varargs.h in the tree. These three filesAlexander Kabaev2003-09-011-1/+0
| | | | | | | | were including varargs.h file but did not use any of its macros, so they escaped the clean-up before. Notes: svn path=/head/; revision=119632
* Introduce options definition the standard way.Philippe Charnier2003-06-091-3/+2
| | | | Notes: svn path=/head/; revision=116112
* Document the fact that VTY locking is easily bypassable when DDBMaxime Henrion2003-02-271-1/+5
| | | | | | | is compiled in the kernel. Also add some useful xrefs to lock(1). Notes: svn path=/head/; revision=111633
* Make this work without COMPAT_43 by using tcgetattr()/tcsetattr() insteadTim J. Robbins2003-02-101-10/+10
| | | | | | | of ioctl TIOCGETP/TIOCSETP. Notes: svn path=/head/; revision=110609
* ANSIify function definitions.David Malone2002-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 Notes: svn path=/head/; revision=102944
* Add a -v option that prevents switching virtual terminals while thisDima Dorfman2002-07-282-13/+47
| | | | | | | | terminal is locked. This permits the user to easily lock the entire console from a single terminal. Notes: svn path=/head/; revision=100806
* Correct a comment: Typing in the root password at the "Key:" promptDima Dorfman2002-07-101-2/+2
| | | | | | | doesn't (and shouldn't) work. Notes: svn path=/head/; revision=99709
* Fix indentation: Don't use space where tabs will do; specifically,Dima Dorfman2002-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 Notes: svn path=/head/; revision=99708
* Consistently use FBSDIDDavid E. O'Brien2002-06-301-2/+2
| | | | Notes: svn path=/head/; revision=99112
* Use `The .Nm utility'Philippe Charnier2002-04-201-2/+3
| | | | Notes: svn path=/head/; revision=95124
* remove __PWarner Losh2002-03-221-2/+4
| | | | Notes: svn path=/head/; revision=92920
* Remove leaf node WARNS?=2 (that mainly I added). This shouldMark Murray2002-02-081-1/+0
| | | | | | | help the GCC3 transition and CURRENT in general. Notes: svn path=/head/; revision=90415
* Warns cleanups:David Malone2001-12-032-8/+8
| | | | | | | | Signal handlers are supposed to take an int as an arg. Don't locally declare crypt or ttyname. Notes: svn path=/head/; revision=87286
* Set BINOWN=root explicitly for setuid root binaries.Ruslan Ermilov2001-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. Notes: svn path=/head/; revision=83391