Age | Commit message (Collapse) | Author |
|
This fixes #315.
|
|
This fixes #313.
|
|
|
|
|
|
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.
|
|
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.
|
|
This fixes #299.
|
|
This reverts commit 084877eb52971faf8f52c780ddd08ed9af140eb6.
The mentioned commit caused some systems to have some services reported
as crashed.
This fixes #297.
This fixes #298.
|
|
|
|
This fixes #296.
|
|
This fixes #295.
|
|
|
|
|
|
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
|
|
This fixes #265.
|
|
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
|
|
|
|
|
|
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.
|
|
|
|
This is for #288.
|
|
This fixes #226.
|
|
This fixes #290.
|
|
This fixes #261.
|
|
This fixes #261.
|
|
git grep shows no usage, and `make test` passes
This fixes #256.
|
|
- use rc-service <service> describe to get action list
This is for #285.
|
|
- handle `rc-service -<flag> <service> <action>` correctly
This is for #285.
|
|
This fixes #283.
|
|
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.
|
|
|
|
|
|
X-Gentoo-Bug: 670290
X-Gentoo-Bug-URL: https://bugs.gentoo.org/670290
|
|
These are designed to emulate the sysvinit equivalents, so pass "now" as
the time argument if no arguments are given.
This fixes #268.
|
|
Clean up code indented with mixed tabs and spaces.
No actual code changes.
This fixes #280.
|
|
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.
|
|
These are not standard.
For more information see issue #279.
This fixes #279.
|
|
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.
|
|
Fix misleading indentation and other erroneous whitespace.
This fixes #273.
|
|
This time it was done correctly.
I missed a '\' the last time.
|
|
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].
|
|
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.
|
|
For some reason removing this broke the build.
This reverts commit 5246ea7b6f8c6a247403f725f8301457f6ddfffd.
|
|
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.
|
|
|
|
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.
|
|
This will make it easier to track down why the supervisor intermittently
hangs after it runs for a long time.
|
|
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.
|
|
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.
|
|
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.
|