aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-25add ability for openrc-shutdown to communicate with sysvinitWilliam Hubbs
This fixes #315.
2019-07-24Fix build with ClangMartin Wilke
This fixes #313.
2019-07-22Add Sony Interactive Entertainment as an authorWilliam Hubbs
2019-03-29supervise-daemon: allow --respawn-max to be zeroWilliam Hubbs
2019-02-26remove hidden-visibility.hWilliam Hubbs
I am removing this on the advice of a member of the Gentoo toolchain team. It was explained to me that this doesn't offer any significant benefits to OpenRC. If anyone ffeels differently, please open a pull request reverting this and adding an explanation of what it does and how to know which functions to mark hidden in the future. This fixes #301.
2019-02-25openrc-init: fix waitpid checksWilliam Hubbs
The do_openrc() function was not waiting properly for the child process which started the runlevel to return. We need to repeatedly call waitpid() until its return value matches the pid of the child process or the child process does not exist. This fixes #216. This fixes #300.
2019-02-23librc: fix potential buffer overflow in pid_is_argvWilliam Hubbs
This fixes #299.
2019-02-23Revert "src/librc/librc-daemon.c: fix buffer overrun in pid_is_argv"William Hubbs
This reverts commit 084877eb52971faf8f52c780ddd08ed9af140eb6. The mentioned commit caused some systems to have some services reported as crashed. This fixes #297. This fixes #298.
2019-02-22Update ChangeLogWilliam Hubbs
2019-02-22move ci scripts to their own directoryWilliam Hubbs
This fixes #296.
2019-02-22combine test directoriesWilliam Hubbs
This fixes #295.
2019-02-22remove unused test ignore patternsWilliam Hubbs
2019-02-22remove unused test data filesWilliam Hubbs
2019-02-21librc/librc-depend.c: fix NULL pointer dereferenceGeorgy Yakovlev
In some cases deptree or depinfo can be NULL, check before dereferencing. Fixes https://github.com/OpenRC/openrc/issues/293 Fixes https://github.com/OpenRC/openrc/pulls/294 X-Gentoo-Bug: 659906 X-Gentoo-Bug-URL: https://bugs.gentoo.org/659906
2019-02-19use cirrus-ci for FreeBSD buildsGeorgy Yakovlev
This fixes #265.
2019-02-19src/test/runtests.sh: drop 'readelf'-based testsSergei Trofimovich
The 'readelf'-based tests cover a few situations: 1. undefined symbols in shared libraries 2. unexpected exports in shared libraries Bug #575958 shows that [2.] implementation is too simplistic in assuming that presence of relocation equals to export presence. It is incorrect for PLT stubs and local symbols. Let's just drop these tests. If one needs to cover [1.] it is better to use LDFLAGS=-Wl,--no-undefined. This closes #292. X-Reported-by: Benda Xu X-Gentoo-Bug: https://bugs.gentoo.org/575958 X-Gentoo-Bug-URL: https://bugs.gentoo.org/575958
2019-02-15rc-status: style fixesWilliam Hubbs
2019-02-15update ChangeLogWilliam Hubbs
2019-02-15rc-status: add -f option to allow formatting outputWilliam Hubbs
The -f option can be used when showing the status of services in runlevels to allow making the output more easily parsable. Currently, the .ini format is the only one supported.
2019-02-14rc-status.c: small style changesWilliam Hubbs
2019-02-13add experimental support for an alternate shell for service scriptsWilliam Hubbs
This is for #288.
2019-02-12librc: fix realpath() return value checkEdan Bedrik
This fixes #226.
2019-02-12improve shutdown documentationWilliam Hubbs
This fixes #290.
2019-02-11travis: try enabling musl-gccAustin English
This fixes #261.
2019-02-11fix build with muslcAustin English
This fixes #261.
2019-02-11test/skel.runtests.sh: remove unused fileAustin English
git grep shows no usage, and `make test` passes This fixes #256.
2019-01-21zsh-completion: _rc-service support extra actionsFelix Neumärker
- use rc-service <service> describe to get action list This is for #285.
2019-01-21zsh-completion: _rc-service fix flag/command combinationsFelix Neumärker
- handle `rc-service -<flag> <service> <action>` correctly This is for #285.
2019-01-18man/openrc.8: add openrc-run.8 to see alsoKim Jahn
This fixes #283.
2019-01-01man: supervise-daemon: fix various style issuesMike Frysinger
The .Dt header is supposed to be all caps. This was mixing case. The options block was being incorrectly indented due to a missing .El. Some of the new options were missing the .It block, so add that. Finally, the -D option was missing capitalization.
2018-12-29travis-ci: add IRC notificationsWilliam Hubbs
2018-12-28start-stop-daemon: fix compiler warningWilliam Hubbs
2018-12-27bash-completions/rc-service: allow tab to be used againWilliam Hubbs
X-Gentoo-Bug: 670290 X-Gentoo-Bug-URL: https://bugs.gentoo.org/670290
2018-12-27scripts: fix halt, poweroff and reboot wrappersartoo
These are designed to emulate the sysvinit equivalents, so pass "now" as the time argument if no arguments are given. This fixes #268.
2018-12-27fix leading whitespacephilhofer
Clean up code indented with mixed tabs and spaces. No actual code changes. This fixes #280.
2018-12-27fix potential out-of-bounds readsphilhofer
readlink(3) does not nul-terminate the result it sticks into the supplied buffer. Consequently, the code rc = readlink(path, buf, sizeof(buf)); does not necessarily produce a C string. The code in rc_find_pid() produces some C strings this way and passes them to strlen() and strcmp(), which can lead to an out-of-bounds read. In this case, since the code already takes care to zero-initialize the buffers before passing them to readlink(3), only allow sizeof(buf)-1 bytes to be returned. (While fixing this issue, I fixed two other locations that used the same problematic pattern.) This fixes #270.
2018-12-25Do not use UT_LINESIZE or __UT_LINESIZEWilliam Hubbs
These are not standard. For more information see issue #279. This fixes #279.
2018-12-24src/librc/librc-daemon.c: fix buffer overrun in pid_is_argvphilhofer
The contents of /proc/<pid>/cmdline are read into a stack buffer using bytes = read(fd, buffer, sizeof(buffer)); followed by appending a null terminator to the buffer with buffer[bytes] = '\0'; If bytes == sizeof(buffer), then this write is out-of-bounds. Refactor the code to use rc_getfile instead, since PATH_MAX is not the maximum size of /proc/<pid>/cmdline. (I hit this issue in practice while compiling Linux; it tripped the stack-smashing protector.) This is roughly the same buffer overflow condition that was fixed by commit 0ddee9b7d2b8dea810e252ca6a95c457876df120 This fixes #269.
2018-12-24src/rc/supervise-daemon.c: formatting fixesphilhofer
Fix misleading indentation and other erroneous whitespace. This fixes #273.
2018-12-23remove /run migration script againWilliam Hubbs
This time it was done correctly. I missed a '\' the last time.
2018-12-23src/rc/supervise-daemon.c: do not pass NULL to strcmpphilhofer
The following will cause a segfault due to NULL being passed to strcmp(3) $ RC_SVCNAME=foo supervise-daemon Fix the bounds check on argc in main. If argc<=1, then it is not safe to dereference argv[1].
2018-12-23src/rc/openrc-run.c: remove duplicate statementphilhofer
The statement ll = strlen(applet); appears twice in the same block without any intervening assignment to the variables 'll' or 'applet' Remove the second (duplicate) statement.
2018-12-23Revert "remove /run migration script"William Hubbs
For some reason removing this broke the build. This reverts commit 5246ea7b6f8c6a247403f725f8301457f6ddfffd.
2018-12-23remove /run migration scriptWilliam Hubbs
We have used /run for some time now and we have had this migration script for 6 years. Linux users should have upgraded by now to a version of OpenRC which stores its information in /run.
2018-12-21fix compiler warningsWilliam Hubbs
2018-12-20supervise-daemon: do not use the exec_service() functionWilliam Hubbs
In order to run healthcheck() and the unhealthy() function, add an exec_command call to the supervisor. Another difference is This function also logs errors instead of attempting to display them. This is for #271.
2018-12-18Add debug logging to start-stop-daemon and rc-supervisorWilliam Hubbs
This will make it easier to track down why the supervisor intermittently hangs after it runs for a long time.
2018-12-08standardize the default shellWilliam Hubbs
I do not know of a need to have the default shell be a build-time configurable setting. All *nix systems I am aware of have /bin/sh as a default posix compatible shell. If some systems running OpenRC do not make that assumption about /bin/sh, I will consider bringing this back, so feel free to open an issue.
2018-12-07rc-cgroup.sh: remove shebang lineWilliam Hubbs
This is not a stand-alone script, so it does not need the shebang line. This also means it is not necessary to run this through sed.
2018-12-06init.d/agetty: set default respawn period to 60 secondsWilliam Hubbs
Without a respawn period setting, the supervisor will give up on respawning agetty after it is respawned respawn_max times. For most daemons giving up like this is reasonable, but not for agettys. Agettys should always be respawned unless they are respawning too fafst,. If an agetty is respawning faster than 10 times in 60 seconds, this seems to be too fast.