Systemd/src/core
Jonathon Kowalski 791cd15993 Fail RequisiteOf units with oneshots
Fixes: #11422

Oneshots going to inactive directly without ever entering UNIT_ACTIVE is
considered success. This however means that if something both Requires=
and Requisites= a unit of such nature, the verify-active job getting
merged into the start job makes it lose this property of failing the
depending jobs, as there, the start job has the result JOB_DONE on
success, so we never walk over RequisiteOf units.

This change makes sure that such units always go down. It is also only
meaningful with After=, but so is Requisite= itself. Also, we also catch
cases like a oneshot having RemainAfterExit= true making us start up
properly in such a setting, but then removing it, reloading the unit,
and restarting it. In such a case, we go down due to restart propagation
before them, and our start job waits on theirs, properly failing with
the JOB_DEPENDENCY result.

This covers cases where ConditionXYZ= creates a similar situation as
well.
2019-02-15 13:42:54 +01:00
..
all-units.h core: undo the dependency inversion between unit.h and all unit types 2018-05-15 14:24:34 -04:00
audit-fd.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
audit-fd.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
automount.c automount: don't pass non-blocking pipe to kernel. 2019-02-08 10:33:26 +01:00
automount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
bpf-devices.c Delete duplicate lines 2019-01-12 16:02:26 +01:00
bpf-devices.h cgroups: beef up DeviceAllow= syntax a bit 2018-11-29 20:21:39 +01:00
bpf-firewall.c tree-wide: drop missing.h from headers and use relevant missing_*.h 2018-12-06 13:31:16 +01:00
bpf-firewall.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
cgroup.c core: downgrade CPUQuotaPeriodSec= clamping logs to debug 2019-02-14 11:04:42 -08:00
cgroup.h core: add CPUQuotaPeriodSec= 2019-02-14 11:04:42 -08:00
chown-recursive.c chown-recursive: TAKE_FD() is your friend 2018-10-26 15:13:26 +02:00
chown-recursive.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-automount.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-automount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-cgroup.c core: downgrade CPUQuotaPeriodSec= clamping logs to debug 2019-02-14 11:04:42 -08:00
dbus-cgroup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-device.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-device.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-execute.c Split out part of mount-util.c into mountpoint-util.c 2018-11-29 21:03:44 +01:00
dbus-execute.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-job.c core: before returning new job path to clients, force out JobNew signals 2018-12-01 12:53:26 +01:00
dbus-job.h core: before returning new job path to clients, force out JobNew signals 2018-12-01 12:53:26 +01:00
dbus-kill.c Make Watchdog Signal Configurable 2018-09-26 16:14:29 +02:00
dbus-kill.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-manager.c meson: generate version tag from git 2018-12-21 13:43:20 +01:00
dbus-manager.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-mount.c cgroup: drastically simplify caching of cgroups members mask 2018-11-23 13:41:37 +01:00
dbus-mount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-path.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-path.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-scope.c cgroup: drastically simplify caching of cgroups members mask 2018-11-23 13:41:37 +01:00
dbus-scope.h pid1: add a new AbandonScope() method call on the Manager object 2018-11-09 17:08:59 +01:00
dbus-service.c core/dbus-service: empty assignment to PIDFile= resets the value 2019-02-06 17:58:52 +01:00
dbus-service.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-slice.c cgroup: drastically simplify caching of cgroups members mask 2018-11-23 13:41:37 +01:00
dbus-slice.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-socket.c Remove 'inline' attributes from static functions in .c files (#11426) 2019-01-15 08:12:28 +01:00
dbus-socket.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-swap.c cgroup: drastically simplify caching of cgroups members mask 2018-11-23 13:41:37 +01:00
dbus-swap.h tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
dbus-target.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-target.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-timer.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-timer.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-unit.c core: Fix -EOPNOTSUPP emergency action error string 2019-01-17 09:17:15 +01:00
dbus-unit.h core: whenever we change state of a unit, force out PropertiesChanged bus signal 2018-12-01 12:53:26 +01:00
dbus-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus.c core: shorten code by using new helper 2019-01-17 16:12:38 +01:00
dbus.h core: rename queued_message → pending_reload_message 2018-11-13 11:59:06 +01:00
device.c core/device: fix log message 2019-01-22 14:51:02 +09:00
device.h device: clean up DeviceFound flags set 2018-10-09 21:11:22 +02:00
dynamic-user.c Detect file truncation earlier in a few places 2019-02-02 16:25:32 +02:00
dynamic-user.h tree-wide: use unsigned for refcount 2018-08-27 13:48:04 +09:00
emergency-action.c core: allow to set exit status when using SuccessAction=/FailureAction=exit in units 2018-11-27 09:44:40 +01:00
emergency-action.h core: allow to set exit status when using SuccessAction=/FailureAction=exit in units 2018-11-27 09:44:40 +01:00
execute.c Add a warning about the difference in permissions between existing directories and unit settings. 2019-01-29 09:52:21 +09:00
execute.h core: fix KeyringMode for user services 2018-12-17 16:56:36 +01:00
hostname-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
hostname-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ima-setup.c Move LONG_LINE_MAX definition to fileio.h 2018-11-14 16:25:32 +01:00
ima-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ip-address-access.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
ip-address-access.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
job.c Fail RequisiteOf units with oneshots 2019-02-15 13:42:54 +01:00
job.h core: rework how we deserialize jobs 2018-12-12 11:15:07 +01:00
kill.c Make Watchdog Signal Configurable 2018-09-26 16:14:29 +02:00
kill.h Make Watchdog Signal Configurable 2018-09-26 16:14:29 +02:00
killall.c killall: (void)ify more things 2018-09-25 12:50:35 +02:00
killall.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
kmod-setup.c tree-wide: replace 'unsigned int' with 'unsigned' 2018-10-19 22:19:12 +02:00
kmod-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
load-dropin.c pid1: drop now-unused path parameter to add_dependency_by_name() 2018-09-15 19:57:52 +02:00
load-dropin.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
load-fragment-gperf-nulstr.awk build-sys: fix the script used for generating load_fragment_gperf_nulstr (#6646) 2017-08-26 23:21:23 +09:00
load-fragment-gperf.gperf.m4 core: add CPUQuotaPeriodSec= 2019-02-14 11:04:42 -08:00
load-fragment.c core: add CPUQuotaPeriodSec= 2019-02-14 11:04:42 -08:00
load-fragment.h cgroup: Add DisableControllers= directive to disable controller in subtree 2018-12-03 15:40:31 +00:00
locale-setup.c Make default locale a compile time option 2018-12-29 21:43:04 +09:00
locale-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
loopback-setup.c sd-netlink: make sd_netlink_slot take its description 2018-10-16 18:42:23 +09:00
loopback-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
machine-id-setup.c Split out part of mount-util.c into mountpoint-util.c 2018-11-29 21:03:44 +01:00
machine-id-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
macros.systemd.in rpm: use sh compatible redirects 2019-02-08 17:58:31 +01:00
main.c main: when generating the resource limit to pass to children, take FD_SETSIZE into consideration 2019-01-18 17:31:36 +01:00
manager.c core: export $PIDFILE env var for services, derived from PIDFile= 2019-02-15 11:32:19 +01:00
manager.h Revert "core/mount: minimize impact on mount storm." 2018-12-19 11:37:41 +01:00
meson.build meson: simplify handling of pkgconfigdatadir=no, pkgconfiglibdir=no 2018-12-21 13:43:20 +01:00
mount-setup.c mount-setup: don't consider it reason to fail if we can't relabel cgroupfs 2018-12-12 20:46:07 +01:00
mount-setup.h core: remove JoinControllers= configuration setting 2018-11-16 14:54:13 +01:00
mount.c mount: remove unused mount_is_auto and mount_is_automount 2019-02-15 00:16:54 +08:00
mount.h mount: replace three closely related mount flags into a proper flags enum 2018-12-07 17:35:32 +01:00
namespace.c tree-wide: use c99 static for array size declarations 2019-01-04 12:37:25 +01:00
namespace.h tree-wide: use c99 static for array size declarations 2019-01-04 12:37:25 +01:00
org.freedesktop.systemd1.conf systemd-analyze: make dump work for large # of units 2018-05-11 08:11:02 -07:00
org.freedesktop.systemd1.policy.in core: systemd1.manage-unit-files policy implies systemd1.manage-units 2018-05-18 00:02:58 +09:00
org.freedesktop.systemd1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
path.c core: whenever we change state of a unit, force out PropertiesChanged bus signal 2018-12-01 12:53:26 +01:00
path.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
scope.c core: whenever we change state of a unit, force out PropertiesChanged bus signal 2018-12-01 12:53:26 +01:00
scope.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
selinux-access.c tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
selinux-access.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
selinux-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
selinux-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
service.c core: export $PIDFILE env var for services, derived from PIDFile= 2019-02-15 11:32:19 +01:00
service.h service: when starting a service make a copy of the watchdog timeout and use that 2018-10-26 13:00:04 +02:00
show-status.c show-status: use free_and_replace() where we can 2018-11-26 18:24:12 +01:00
show-status.h show-status: fold two bool flags function arguments into a flags 2018-11-26 18:24:12 +01:00
shutdown.c tree-wide: (void)ify some setsid() and related calls 2018-12-01 12:50:45 +01:00
slice.c core: whenever we change state of a unit, force out PropertiesChanged bus signal 2018-12-01 12:53:26 +01:00
slice.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
smack-setup.c tree-wide: Remove O_CLOEXEC from fdopen 2018-12-12 20:47:40 +01:00
smack-setup.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
socket.c core/socket: drop unnecessary assignment to 'r' 2019-01-09 02:11:19 +09:00
socket.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
swap.c swap: always add in extras when we load a swap unit 2018-12-07 17:35:32 +01:00
swap.h core: replace udev_device by sd_device 2018-08-23 04:57:39 +09:00
system.conf.in core: remove JoinControllers= configuration setting 2018-11-16 14:54:13 +01:00
systemd.pc.in meson: define PROJECT_VERSION as the "bare" project version 2018-12-20 21:35:29 +01:00
target.c core: whenever we change state of a unit, force out PropertiesChanged bus signal 2018-12-01 12:53:26 +01:00
target.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
timer.c core: whenever we change state of a unit, force out PropertiesChanged bus signal 2018-12-01 12:53:26 +01:00
timer.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
transaction.c Enable some more debug logging for transaction building 2019-01-21 11:39:06 +01:00
transaction.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
triggers.systemd.in Drop my copyright headers 2018-06-14 13:03:20 +02:00
umount.c Split out part of mount-util.c into mountpoint-util.c 2018-11-29 21:03:44 +01:00
umount.h tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
unit-printf.c core: support %j in unit dependency resolution 2018-12-22 17:21:13 +09:00
unit-printf.h tree-wide: remove various unused functions 2018-12-02 13:35:34 +09:00
unit.c Return -EAGAIN instead of -EALREADY from unit_reload 2019-01-20 22:12:24 +00:00
unit.h core: downgrade CPUQuotaPeriodSec= clamping logs to debug 2019-02-14 11:04:42 -08:00
user.conf core: rename StartLimitInterval= to StartLimitIntervalSec= 2016-04-29 16:27:48 +02:00