1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-09 22:38:01 -08:00
Commit Graph

39 Commits

Author SHA1 Message Date
deraadt
3aaa63eb46 When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
2019-06-28 13:34:58 +00:00
millert
bf198cc6eb I am retiring my old email address; replace it with my OpenBSD one. 2019-01-25 00:19:25 +00:00
krw
426a6f8cd3 Another use for fcntl() and thus of the superfluous 3rd parameter
is when sanitising standard fd's before calling daemon().

Use a tweaked version of the ssh(1) function in all three places
found using fcntl() this way.

ok jca@ beck@
2016-04-02 14:37:42 +00:00
tim
49afeee2d5 Pledge; OK millert@ 2015-11-01 14:02:37 +00:00
deraadt
b9fc9a728f 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)
2015-01-16 06:39:28 +00:00
sobrado
a9050c90c4 Usage -> usage. 2008-11-12 16:13:46 +00:00
jmc
9490d37cb6 convert to new .Dd format; 2007-05-31 19:19:00 +00:00
deraadt
775a26833e rfc 3834 support: Auto-Submitted: auto-generated on lots of things; from Tamas TEVESZ; ok millert 2006-12-11 20:50:54 +00:00
millert
36f527ec92 3rd arg to F_GETFL fcntl doesn't need to be a pointer, 0 is fine. 2005-10-26 17:06:39 +00:00
jmc
3789a8615e - simplify SYNOPSIS
- sync usage()
2005-07-06 21:50:24 +00:00
millert
06f016962e Use an ISC-tyle license for all my code; it is simpler and more permissive. 2003-06-03 01:52:39 +00:00
millert
3b08765c1d Don't call setusercontext() to change uid unless uid == 0; found by mpech@ 2003-05-06 15:34:08 +00:00
mpech
2e2d720a6f While I'm here sync usage() w/ manual. 2003-05-06 10:45:49 +00:00
millert
3adef2e46b o Don't close stdout in interactive mode; mpech@
Extra paranoia:
o Close keyfile by hand each time in -a mode so we don't leak an fd
to sendmail
o If any of std{out,in,err} are not open, open /dev/null in their stead.
o If stdout is not open and -i was specified, just exit since there
  is nowhere to print the info.

Thanks for mpech@ for his testing and bug finding ;-)
2003-05-02 20:10:46 +00:00
millert
9868a9fbaa Add missing period. 2003-04-30 18:40:28 +00:00
millert
f3d5c213e2 Don't try to close key.keyfile in -a mode, skeygetnext() will have
already done it and we are headed for exit anyway.
2003-04-28 20:58:35 +00:00
millert
21a5bbfab5 Replace strcpy() of a constant w/ strlcpy() for easy grepping;
from Raymond M Schneider
2003-03-14 04:29:04 +00:00
david
af599a0aaa date should be written formally: .Dd Month day, year
ok henning@ jmc@
2003-03-06 04:07:37 +00:00
millert
8959c9bf12 Don't call fclose() on a NULL file handle; from markus@
Also:
Use ANSI function headers
Use pid_t for pids
Never do exit(-1)
2002-05-29 15:32:10 +00:00
millert
fc7f3601ee Change S/Key stuff from using a flat file (/etc/skeykeys) to a directory
where each user gets their own file, which is owned by that user.

An old S/Key database may be converted by running "skeyinit -C" as root.

Programs that need to access the S/Key database no longer need to be
setuid root.  They must now be setgid auth instead.
2002-05-16 03:50:42 +00:00
millert
c72b5b24e1 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. 2002-02-16 21:27:05 +00:00
deraadt
c96f6a27c3 correct type on last arg to execl(); nordin@cse.ogi.edu 2001-07-09 07:02:08 +00:00
aaron
f1ba34738e Change all option list specifications to ".Bl -tag -width Ds". Most man
pages just needed their -width parameter tweaked to "Ds", which provides
a nice width of 6 constant characters. For consistency more than anything.
2000-11-09 17:51:53 +00:00
pjanzen
188a098f4a Change the message if the S/Key sequence has expired. millert@ ok 2000-09-20 21:53:49 +00:00
millert
fed231abe2 Add calls to setusercontext() and login_get*(). We basically call
setusercontext() in most places where previously we did a setlogin().
Add default login.conf file and put root in the "daemon" login class.
2000-08-20 18:42:36 +00:00
aaron
61b98182b9 Insert more missing .El directives. Our troff really should identify these and
spit out a warning.
2000-07-06 04:06:53 +00:00
aaron
05c781429d Various cleanups and standardizations. 2000-03-11 21:40:02 +00:00
aaron
8cf461a5aa Finish standardizing options list introduction. 2000-03-05 00:28:49 +00:00
aaron
2e0eb34f9e - remove trailing white space
- remove arguments from .Os macros
- remove arguments from .Nm macros, where appropriate
- some more Dq/Sq/Ql insanity
- still lots to do in the usr.bin tree... :/
1999-06-05 01:21:16 +00:00
aaron
9e17188366 usr.bin/ man page cleanups, n-s 1998-09-27 16:57:47 +00:00
millert
9141dda38a Remove the advertising clause in my old license, it impedes free use
of the code as a large number of similar clauses makes it impossible
to write an ad for a product using the code...
1998-06-21 22:13:35 +00:00
deraadt
e189ddde44 $OpenBSD$ 1997-09-21 11:34:32 +00:00
millert
5670b75323 use setlogin(2). 1997-09-09 00:04:19 +00:00
millert
d4eb3024e8 Add -a (audit all users) flag and do our pipes. 1997-07-24 03:43:58 +00:00
millert
42cc5412ff Use _PATH_SKEYKEYS and fix a typo. 1997-07-23 07:02:02 +00:00
millert
d97c6bd808 close keyfile nicely. 1997-07-23 06:31:17 +00:00
millert
94f6040efb Add a seteuid() just in case someone decides to make this setuid
by some uid other than 0.
1997-07-23 05:17:46 +00:00
millert
c2ff5ecd1a copyright 1997-07-23 04:31:17 +00:00
millert
0165dd6fc4 Replace skeyaudit.sh with a setuid binary (necessary for mode 0600 skeykeys) 1997-07-23 04:24:33 +00:00