summaryrefslogtreecommitdiff
path: root/sbin/init
AgeCommit message (Collapse)Author
2017-06-16s/CPU_LIDSUSPEND/CPU_LIDACTION/Martin Natano
ok mlarkin
2017-05-03Use the safe idiom of cleaning sensitive data from memory with explicit_bzero,Ricardo Mestre
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@
2017-03-02Add a new sysctl machdep.lidaction. The sysctl works as follows:Martin Natano
machdep.lidaction=0 # do nothing machdep.lidaction=1 # suspend machdep.lidaction=2 # hibernate lidsuspend is just an alias for lidaction, so if you change one, the other one will have the same value. The plan is to remove machdep.lidsuspend eventually when people have upgraded their /ets/sysctl.conf. discussed with deraadt, who came up with the new MIB name no objections mlarkin ok stsp halex jcs
2016-10-06fix HISTORY;Ingo Schwarze
patches from Sevan Janiyan <venture37 at geeklan dot co dot uk>; verified using minnie.tuhs.org/cgi-bin/utree.pl
2016-09-05for consistency, hyphenate "single-user";Jason McIntyre
from rob pierce
2016-09-05replace obsolete getpass() by readpassphrase()Gleydson Soares
OK tedu millert
2016-09-04Use an RB tree instead of BDB to map process->session, ok tedu millertNicholas Marriott
2016-08-27Pull in <sys/time.h> for struct timespecPhilip Guenther
ok deraadt@
2016-05-10Do not close the stdio file desciptors in init(8), but dup2(2) themAlexander Bluhm
from /dev/null. The code is taken from daemon(3). Also move this operation to the beginning. OK millert@ deraadt@
2016-02-01Remove variable unneeded since introduction of crypt_checkpassJeremie Courreges-Anglas
ok millert@
2015-12-23Use NULL rather than 0 for pointers. No binary change.mmcc
2015-12-10Remove NULL-checks before free(). ok tb@mmcc
2015-11-18use _shadow getpwnam (and crypt_checkpass)Ted Unangst
2015-09-25there's no need to keep init secret these days, and the (unused)Ted Unangst
immutable flags would just be a pita. remove custom bin mode.
2015-08-20<stdlib.h> is included, so do not need to cast result fromTheo de Raadt
malloc, calloc, realloc* ok krw millert
2015-07-14Use volatile sig_atomic_t for requested_transition since it isTodd C. Miller
modified inside signal handlers. Instead of returning a function pointer, the state functions now return an enum for the next state. This is used as an index into an array of function pointers to do the actual state change in transition(). OK deraadt@
2015-03-18Make init(8) static PIE.Pascal Stumpf
ok deraadt@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2014-12-06Do not define the variable pid twice to avoid a compiler warning.Alexander Bluhm
OK millert@
2014-04-22malloc/memset->calloc. with bonus null check. from peter malone.Ted Unangst
2014-01-03Do not raise the securelevel when transitioning from catatonia toTodd C. Miller
multiuser since we are not actually going multiuser. Fixes a problem where the securelevel was raised for rc.shutdown even when reboot was run from single user mode. OK deraadt@
2013-02-11Ignore sysctl failure for CPU_LIDSUSPEND when errno is EOPNOTSUPP.Todd C. Miller
Just because CPU_LIDSUSPEND is defined in cpu.h does mean it is actually supported by the hardware. OK halex@
2012-10-11fix "disable lidsuspend on shutdown":Alexander Hall
- pull in machine/cpu.h so we can actually see CPU_LIDSUSPEND if it's there - fix the resulting compilation errors now that the code is actually used "Just go for it" deraadt@
2012-04-06no need to (unsigned) a small constantTheo de Raadt
2011-09-04knock out useless Pp;Jason McIntyre
2011-05-10Some cleanup and simplifications:Ingo Schwarze
- Explain single user mode once, not three times. - Do not claim that the boot program talked to init; it cannot do so. - Mention that the OpenBSD kernel does not support init -f. - And some minor rewordings and reorderings. Feedback and ok jmc@.
2010-10-15tweak previous;Jason McIntyre
2010-10-15freebsd uses SIGINT to request a reboot, we may as well be consistent.David Gwynne
pointed out by kettenis@ and deraadt@
2010-10-14add a SIGQUIT handler that does the same as USR1 and USR2, except itDavid Gwynne
reboots the machine instead just halting or powering down. diff from Jonathan Matthew manpage tweaks from jmc@ ok deraadt@
2010-09-29Add missing err.h includeDavid Coppa
OK deraadt@
2010-09-19more wacky macro fixing;Jason McIntyre
2010-08-07disable lidsuspend when we are powering downPeter Hessler
"I like this" marco@, "Sure" deraadt@
2010-03-14.Pd -> .PqJason McIntyre
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2007-09-03malloc(n * m) -> calloc(n, m); ok espieTheo de Raadt
2007-05-31convert to new .Dd format;Jason McIntyre
2007-01-29sort FILES;Jason McIntyre
2007-01-29add /fastboot to FILES, since these pages discuss that file;Jason McIntyre
2006-07-25correct .Xr; from marcus poppJason McIntyre
2006-06-22let's just use "getty" as the plural of `getty', because "getty's" isJason McIntyre
very painful, and "gettys" is misleading;
2006-06-22accept SIGUSR2. Like SIGUSR1, except it makes RB_POWERDOWN mandatory.Theo de Raadt
This will be used by kernel components which are trying to really really power the system down. suggested and tested by jason
2006-03-19Fix mem leaks in error path. From NetBSD's coverity analysis. ok pat@Otto Moerbeek
deraadt@
2005-12-10better wording, helped by krw and roughly ok deraadt;Jason McIntyre
2005-11-12use snprintf; dhill@mindcry.orgTheo de Raadt
2005-03-13turn off accounting when switching to single user;Markus Friedl
report bluhm at genua.de; ok henning, krw, deraadt
2004-03-16errno is not specified to be int, but something from errno.h. ok millert@Ted Unangst
2004-02-24sort options;Jason McIntyre
2003-10-30malloc failures in init? never. but try to be reasonable for one dumb oneTheo de Raadt
2003-07-29spacesTheo de Raadt
2003-06-03- section reorderJason McIntyre
- some mdoc fixes