| Age | Commit message (Collapse) | Author |
|
services started by init don't get any supplementary groups, but anything
started from a shell would inherit the groups, causing inconsistent
behaviour
we can either clear all groups, or always initalize root's groups. since
other init systems does not initialize anything, including us at boot,
let's just always clear them unconditionally
|
|
When the created notified pipe (often on 4) is the same number as
the notification fd target, dup2() does not clear the FD_CLOEXEC
flag, so the fd gets closed right when exec'ing the daemon,
reporting readiness failure. Fix this by explicitly testing for
the case and clearing the flag when necessary.
Note that this happens because of a call to close_range() right
before the test. close_range() is the real problem, it should
never be used and this bug is a perfect illustration of why; but
getting rid of close_range() is a much more invasive change that
I don't want to commit to right now, especially since navi's plan
is to eventually deprecate start-stop-daemon.
|
|
|
|
check for writtability after the open attempt, and still creating the
file beforehand if it doesn't exist
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
O_CLOEXEC and O_NOFOLLOW are posix for a while now, no need to check.
|
|
path is not modified in that function, and basename_c already returns a
null-terminated string, so there's no need to allocate a copy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bug: https://github.com/OpenRC/openrc/issues/940
|
|
odd line breaks were annoying me a lot
|
|
|
|
makes the code simpler, since we don't have to care about signals and
forking directly, and faster.
|
|
|
|
this turns mouninfo into a multicall binary which can also do
parallel unmounting. most mountinfo code is unchanged; only
notable change is find_mounts() now returns the number of mounts
found and also takes the "process" function as an argument; so
that is_mounted() can be implemented on top of it.
do_unmount mostly follows the logic of previous code. some
notable changes:
- do_unmount is now "lazy" when it comes to retrying failed
unmounts. it will greedily keep running unmount as long as it
can before it looks at the "waiting" queue.
- it will check if the mountpoint is still mounted or not when
umount returns non-zero exit code. this is due to the fact that
multiple umount calls might race to unmount a shared mount. so
if umount fails _but_ the mountpoint is no longer mounted, we
assume success.
- do_unmount used to fail if fuser did not find any pids using
the mount. the new code tries one more time; the rationale being
that there's a gap between the umount call and the fuser call,
and so whatever was using the mount before might have stopped
using it now and so it's worth another attempt.
Fixes: https://github.com/OpenRC/openrc/issues/662
Closes: https://github.com/OpenRC/openrc/pull/698
|
|
Currently, the warning states that the user should increase the value of respawn-delay,
even though the code checks if respawn-delay is more than the cap and period value.
Thus, the correct warning is to recommend the opposite.
Fixes https://github.com/OpenRC/openrc/issues/939
|
|
Originally, rc-update displayed service names with a padding of 20
characters. However, some services like "systemd-tmpfiles-setup-dev"
required longer padding and caused the displayed service table to
be missaligned.
Therefore, padding is increased to 26 characters.
Bug: https://github.com/OpenRC/openrc/issues/937
Signed-off-by: Tomas Fabrizio Orsi <torsi@fi.uba.ar>
|
|
|
|
|
|
|
|
Fixes: https://bugs.gentoo.org/963052
|
|
|
|
we don't support it for user sessions yet, so this will silence some
unnecessary errors when the system instance is using krunlevels
|
|
this passed by unnoticed during a refactor, where svc_lock was moved
down. defer would've prevented this.
|
|
|
|
|
|
|
|
allows system administrators to disable autostarting without changing
pam configuration files.
|
|
|
|
svc_exec is always called with `command, NULL`, the second argument is
never actually used.
|
|
probing procfs is the recommeded method on github[1], as well as the one
used by systemd[2], though we also do two additional checks mentioned by
Kangie in https://github.com/OpenRC/openrc/issues/871.
1: https://github.com/microsoft/WSL/issues/423#issuecomment-221627364
2: https://github.com/systemd/systemd/blob/main/src/basic/virt.c#L658
|
|
|
|
Fixes: https://github.com/OpenRC/openrc/issues/880
|
|
4d8a5c4 added the timeout logic from svc_wait into svc_exec, with the
goal of avoiding stalling the boot process should a service hang,
however we failed to mention the change in NEWS, and some critical
services like postgres rely on inifinite timeout for `stop()`.
this logic was also sharing the `timeout` keyword from `depend()`, which
is not very clean
let's revert the timeout logic, and properly re-introduce it later, with
effort put into making sure no issues happen.
Bug: https://github.com/OpenRC/openrc/issues/896
|
|
init.sh creates the directory, which means we never actually do it here
early at boot
Fixes: 22bfd3a
Fixes: https://github.com/OpenRC/openrc/pull/893
|
|
In the unlikely case the service timed out and the child process exited
just as we closed the file descriptor, the signal handler could try
writing to an invalid fd.
There is no other thread around so this is harmless but might as well
unset the variable first.
|