OpenBSD CVS

CVS log for src/usr.bin/lock/lock.c


[BACK] Up to [local] / src / usr.bin / lock

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 24 20:23:09 2019 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, HEAD
Changes since 1.45: +7 -5 lines
Diff to previous 1.45 (colored)

Make sure that -n overrides -t even when -n precedes -t, like it
does in FreeBSD and in NetBSD, and fully document that behaviour.
Input, feedback, and OK jca@.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jul 21 22:44:44 2019 UTC (4 years, 9 months ago) by jca
Branch: MAIN
Changes since 1.44: +5 -2 lines
Diff to previous 1.44 (colored)

While -n is now the default, it's been useful since 1996.  Keep it for compat.

Agreement from schwarze@ (who proposed a thorough but longer diff) and millert@
ok tb@ kn@ cheloha@

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jul 21 14:39:32 2019 UTC (4 years, 9 months ago) by jca
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Amend comment: entering the root password won't unlock the terminal

Mention -p (user password) while here.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Jul 19 18:32:19 2019 UTC (4 years, 10 months ago) by cheloha
Branch: MAIN
Changes since 1.42: +10 -24 lines
Diff to previous 1.42 (colored)

lock(1): remove default timeout

It makes little sense from a security standpoint to unlock the terminal
and expose the user's session after fifteen minutes by default.

Default behavior is now to reserve the terminal forever.  Add instructions
to the manpage to help the user employ the -t timeout option more safely.

Manpage greatly improved by jmc@; bug(s) caught by millert@; with input
from claudio@.

ok millert@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jul 5 14:11:26 2019 UTC (4 years, 10 months ago) by cheloha
Branch: MAIN
Changes since 1.41: +18 -6 lines
Diff to previous 1.41 (colored)

lock(1): make "-n" and "-t timeout" mutually exclusive.

It doesn't make sense to simultaneously say "never time out" and "release
this terminal in a few minutes".

Input from kn@.

"just go for it" deraadt@

Revision 1.41 / (download) - annotate - [select for diffs], Wed Sep 6 21:02:31 2017 UTC (6 years, 8 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

After recent changes, we need to clear hash, not s1.

From Scott Cheloha
ok deraadt

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 8 22:27:17 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.39: +17 -17 lines
Diff to previous 1.39 (colored)

this program was infected with lint era casts. i think we're past that now.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 8 22:22:04 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.38: +6 -10 lines
Diff to previous 1.38 (colored)

remove ARGSUSED, from Scott Cheloha.
and while we're cleaning, switch __progname to getprogname.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jul 8 22:19:23 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.37: +5 -2 lines
Diff to previous 1.37 (colored)

use crypt_newhash to protect the password. from Scott Cheloha

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jul 8 22:14:48 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.36: +4 -6 lines
Diff to previous 1.36 (colored)

clean up some unused variables. also, making a variable global isn't the
best way to zero initialize it if that's all you need.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jul 8 22:07:39 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.35: +10 -13 lines
Diff to previous 1.35 (colored)

instead of using time(), refer to getitimer to find out how long the
timeout is.
from Scott Cheloha

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jul 8 22:01:09 2017 UTC (6 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.34: +4 -3 lines
Diff to previous 1.34 (colored)

can just continue after readpassphrase returns null, the sighandler will
have already printed a message.
from Scott Cheloha

Revision 1.34 / (download) - annotate - [select for diffs], Wed May 3 09:51:39 2017 UTC (7 years ago) by mestre
Branch: MAIN
Changes since 1.33: +10 -4 lines
Diff to previous 1.33 (colored)

Use the safe idiom of cleaning sensitive data from memory with explicit_bzero,
instead of relying on other methods, after readpassphrase. Some programs on
this diff won't benefit that much since it happens near the terminal path, but
someone might copy the unsafe idiom to another program and place it where it
may leak sensitive data.

Discussed aeons ago with tb@, OK deraadt@ and beck@

Revision 1.33 / (download) - annotate - [select for diffs], Sat May 28 16:11:10 2016 UTC (7 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored)

repair braces. from ilya.kaliman/gsoares/natano

Revision 1.32 / (download) - annotate - [select for diffs], Thu Oct 15 02:35:04 2015 UTC (8 years, 7 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

lock needs pledge(proc exec) to use bsd auth system. from trondd

Revision 1.31 / (download) - annotate - [select for diffs], Sat Oct 10 20:35:01 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

normalize a few more tame request orderings, to help review

Revision 1.30 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:08 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.29 / (download) - annotate - [select for diffs], Wed Oct 7 04:05:24 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.28: +4 -1 lines
Diff to previous 1.28 (colored)

tame "stdio getpw rpath wpath tty".  "tty" allows this to use
readpassphrase().

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:09 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.27 / (download) - annotate - [select for diffs], Thu Aug 22 04:43:40 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored)

Correct format string mismatches turned up by -Wformat=2

suggestions and ok millert@

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jun 13 15:26:06 2010 UTC (13 years, 11 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

Prevent a segmentation fault.  It could occur when login_getclass fails and
the key "s/key" is entered with supplied -a or -p option.

ok millert (with better error message)

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:39 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.24: +1 -14 lines
Diff to previous 1.24 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.24 / (download) - annotate - [select for diffs], Fri Sep 18 20:58:35 2009 UTC (14 years, 8 months ago) by martynas
Branch: MAIN
Changes since 1.23: +21 -5 lines
Diff to previous 1.23 (colored)

like login(1), back off password guesses after login-backoff;  and
reset cnt after login-tries.  tweak & ok millert@

Revision 1.23 / (download) - annotate - [select for diffs], Wed Apr 26 02:35:08 2006 UTC (18 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.22: +8 -6 lines
Diff to previous 1.22 (colored)

pleasing lint, without displeasing future developers

Revision 1.22 / (download) - annotate - [select for diffs], Wed Apr 26 02:32:41 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.21: +6 -5 lines
Diff to previous 1.21 (colored)

merge parts of strtonum() cleanup from tan.dang@gmail.com

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jul 14 14:42:28 2005 UTC (18 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

- better synopsis
- sort options
- sync usage()

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:10 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.19: +3 -7 lines
Diff to previous 1.19 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 15 21:49:40 2002 UTC (21 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

knf

Revision 1.18 / (download) - annotate - [select for diffs], Sun Aug 4 01:08:54 2002 UTC (21 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +9 -13 lines
Diff to previous 1.17 (colored)

ansi

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jun 23 03:07:21 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

uid_t and gid_t are unsigned

Revision 1.16 / (download) - annotate - [select for diffs], Wed May 8 18:04:43 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (colored)

_exit() not exit() in signal handler.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:48 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Nov 2 16:25:11 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +11 -8 lines
Diff to previous 1.13 (colored)

avoid stdio in signal handler

Revision 1.13 / (download) - annotate - [select for diffs], Tue May 29 21:38:15 2001 UTC (22 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.12: +72 -121 lines
Diff to previous 1.12 (colored)

adapt to BSD authentication and clean things up a bit while I am at it

Revision 1.12 / (download) - annotate - [select for diffs], Sat Mar 6 20:27:40 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.11: +0 -12 lines
Diff to previous 1.11 (colored)

back out changes that should not have escaped my local tree

Revision 1.11 / (download) - annotate - [select for diffs], Sat Mar 6 20:19:19 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.10: +14 -2 lines
Diff to previous 1.10 (colored)

add missing reference to infocmp

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jul 27 21:47:07 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.9: +20 -19 lines
Diff to previous 1.9 (colored)

A bit of KNF

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jul 27 21:29:59 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.8: +19 -10 lines
Diff to previous 1.8 (colored)

-Wall

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jan 15 23:42:45 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.7 / (download) - annotate - [select for diffs], Wed Oct 16 00:09:20 1996 UTC (27 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.6: +15 -9 lines
Diff to previous 1.6 (colored)

s/key support now works (s/key lookup must be done with euid == 0)

Revision 1.6 / (download) - annotate - [select for diffs], Fri Sep 6 01:57:15 1996 UTC (27 years, 8 months ago) by downsj
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.5: +33 -13 lines
Diff to previous 1.5 (colored)

Add -n/no timeout option.  FreeBSD PR bin/1567, obrien@Nuxi.cs.ucdavis.edu.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 6 18:10:23 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +5 -4 lines
Diff to previous 1.4 (colored)

type cleanup

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jul 25 01:54:39 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +11 -12 lines
Diff to previous 1.3 (colored)

readable

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 26 05:35:56 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Fri May 24 09:19:50 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.1: +5 -4 lines
Diff to previous 1.1 (colored)

use protos

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:33 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:33 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.