aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* init.d/sysfs: mount efivars read onlyHEADmasterWilliam Hubbs9 days2-1/+8
| | | | This fixes #134.
* fix argument parsing for the sysvinit shutdown wrapperWilliam Hubbs10 days1-11/+15
| | | | This fixes #140.
* scripts/shutdown: fix arguments to be sysvinit shutdown compatibleWilliam Hubbs10 days1-4/+13
| | | | This fixes #140.
* Fix link to shutdown for MKSYSVINIT=yesWilliam Hubbs10 days1-1/+1
|
* init.d/hostname: fix default parameter syntaxNuno Silva10 days1-1/+1
| | | | | | | | | | The syntax for expanding a variable with a default value is ${parameter:-word} not ${parameter-word} although the latter still works for a reason I could not explain. This fixes #143.
* init.d/hostname: fix indentationNuno Silva10 days1-3/+4
| | | | This is for #143.
* scripts/Makefile: make symlinks absolute instead of relativeudeved10 days1-5/+5
| | | | This closes #142.
* scripts/Makefile: respect SBINDIR with MKSYSVINITudeved10 days1-5/+5
| | | | This is for #142.
* kill_all: include limits.h for PATH_MAXJory A. Pratt2017-06-081-0/+1
|
* version 0.28William Hubbs2017-06-081-1/+1
|
* fix compile issue for muslWilliam Hubbs2017-06-081-0/+1
|
* Update ChangeLog0.27William Hubbs2017-06-071-86/+191
|
* man: update openrc-shutdown man pageWilliam Hubbs2017-06-071-8/+17
| | | | Add the new wtmp options and fix some cross references.
* scripts/shutdown: pass --single to openrc-shutdownWilliam Hubbs2017-06-071-1/+6
| | | | | | Sysvinit shutdown has a default of single user mode, but openrc-shutdown makes you choose a default action. Because of this, the shutdown wrapper needs to pass --single to openrc-shutdown.
* openrc-shutdown: add --single option and clean up option processingWilliam Hubbs2017-06-051-4/+12
|
* init.d/bootmisc: use openrc-shutdown instead of halt to write halt recordWilliam Hubbs2017-06-051-1/+1
| | | | | This fixes #139 and fixes #128. and fixes #124.
* add support for writing reboot and shutdown records to wtmpWilliam Hubbs2017-06-045-24/+121
|
* openrc-init: add optional sysvinit compatibilityWilliam Hubbs2017-05-317-1/+29
|
* Change killprocs to use kill_all instead of killall5William Hubbs2017-05-302-3/+6
| | | | | X-Gentoo-Bug:376977 X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=376977
* openrc-init: fix buffer overflow in init.ctlSergei Trofimovich2017-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How to reproduce 1-byte overflow: ``` $ FEATURES=-test CFLAGS="-fsanitize=address -O0 -ggdb3" emerge -1 openrc ================================================================= ==1==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff0efd8710 at pc 0x000000402076 bp 0x7fff0efd7d50 sp 0x7fff0efd7d40 WRITE of size 1 at 0x7fff0efd8710 thread T0 #0 0x402075 (/sbin/openrc-init+0x402075) #1 0x3cf6e2070f in __libc_start_main (/lib64/libc.so.6+0x3cf6e2070f) #2 0x4013b8 (/sbin/openrc-init+0x4013b8) Address 0x7fff0efd8710 is located in stack of thread T0 at offset 2432 in frame #0 0x401cfb (/sbin/openrc-init+0x401cfb) This frame has 3 object(s): [32, 160) 'signals' [192, 344) 'sa' [384, 2432) 'buf' <== Memory access at offset 2432 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ?? ``` The problem here is in the code handling reads from 'init.ctl': ``` int main(int argc, char **argv) { ... char buf[2048]; for (;;) { /* This will block until a command is sent down the pipe... */ fifo = fopen(RC_INIT_FIFO, "r"); count = fread(buf, 1, 2048, fifo); buf[count] = 0; ... } ``` `buf[count] = 0;` writes outside the buffer when `fread()` returns non-truncated read. This fixes #138.
* mk/cc.mk: make implicit function declarations fatal (#136)Sergei Trofimovich2017-05-301-1/+2
| | | | | Avoids issues with missing prototypes causing truncation of pointers. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* rc-logger.c: fix crash on fclose(NULL) (#137)Sergei Trofimovich2017-05-301-1/+1
| | | | | | | Only close the log if we successfully opened it. Reported-by: Brian Evans <grknight@gentoo.org> Tested-by: Brian Evans <grknight@gentoo.org> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* typo fixWilliam Hubbs2017-05-222-2/+2
| | | | | X-Gentoo-Bug: 618888 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=618888
* openrc-shutdown: add dry-run optionWilliam Hubbs2017-05-222-11/+23
|
* openrc-shutdown: move to single user mode by defaultWilliam Hubbs2017-05-222-2/+7
| | | | | To be more compatible with sysvinit, move to single user mode if no options are specified on the command line.
* init: add ability to switch to single user modeWilliam Hubbs2017-05-221-0/+10
|
* add kill_all helperWilliam Hubbs2017-05-193-1/+256
| | | | | | | This is similar to the sysvinit killall5 utility. It should only be used in service scripts, so it will not be installed in the path. This closes #129.
* rc_status: calculate time differences in time_t and display seconds in uptimeWilliam Hubbs2017-05-151-21/+24
|
* supervise-daemon: save start time and respawn count before dropping privsWilliam Hubbs2017-05-121-7/+8
|
* version 0.27William Hubbs2017-05-121-1/+1
|
* update ChangeLog0.26William Hubbs2017-05-111-46/+111
|
* man/rc-status: document changes for supervised daemonsWilliam Hubbs2017-05-111-0/+7
| | | | | | rc-status now shows the amount of time a supervised daemon has been active as well as the number of times it has been respawned during the current respawn period.
* rc-status: show uptimes and respawn counts for supervised daemonsWilliam Hubbs2017-05-111-2/+48
|
* fix to_time_t to honor dstWilliam Hubbs2017-05-111-0/+1
|
* fix from_time_t functionWilliam Hubbs2017-05-113-6/+5
|
* Move time_t conversions to rc-misc.c so they can be sharedWilliam Hubbs2017-05-113-3/+38
|
* supervise-daemon: save start time and respawn countWilliam Hubbs2017-05-111-3/+14
| | | | | This will allow rc-status to display an uptime and restart count for supervised processes.
* supervise-daemon: fix our status when we give up on the child processWilliam Hubbs2017-05-111-1/+11
|
* supervise-daemon:create multiple options from --respawn-limitWilliam Hubbs2017-05-104-41/+81
| | | | | | | | This creates --respawn-delay, --respawn-max and --respawn-period. It was suggested that it would be easier to follow if the options were separated. This is for #126.
* supervise-daemon: add a --respawn-limit optionWilliam Hubbs2017-05-094-1/+63
| | | | | | | | Allow limiting the number of times supervise-daemon will attempt to respawn a daemon once it has died to prevent infinite respawning. Also, set a reasonable default limit (10 times in a 5 second period). This is for issue #126.
* supervise-daemon: mark all open file descriptors FD_CLOEXECWilliam Hubbs2017-04-291-1/+1
|
* supervise-daemon:remove the controlling tty in the supervisorWilliam Hubbs2017-04-291-0/+7
|
* supervise-daemon: fix access to tty_fd and devnull_fdWilliam Hubbs2017-04-291-6/+4
| | | | Both the child and supervisor need access to these file descriptors.
* supervise-daemon: mark the service started when the supervisor is activeWilliam Hubbs2017-04-291-4/+4
|
* version 0.26William Hubbs2017-04-191-1/+1
|
* update ChangeLog0.25William Hubbs2017-04-171-25/+158
|
* init: send term/kill signals as final step of shutdownWilliam Hubbs2017-04-171-0/+5
|
* reword the bugs section of the openrc-init man pageWilliam Hubbs2017-04-141-3/+3
|
* init: fix signal handlingWilliam Hubbs2017-04-131-3/+17
| | | | | The only signals we handle are SIGINT and SIGCHLD, so block all others and unblock them in the child process before we start a rurnlevel.
* init: add re-exec capabilityWilliam Hubbs2017-04-123-6/+37
| | | | | This will allow the re-execution of the init process after upgrading OpenRC.