Systemd/src
Zbigniew Jędrzejewski-Szmek 0c062fd3eb systemd: do not pass .wants fragment path to manager_load_unit
When loading units, sometimes we'd first encounter a unit from .wants or
.requires directory. A typical case would be when multi-user.target.wants/
contains a symlink to some unit. We would prepare to load this unit using
/etc/systemd/system/multi-user.target.wants/foo.service as the fragment
path. This is always wrong. Instead, let's use NULL as the path and let
manager_load_unit() figure out the path on its own.

Fixes #9921.

    path=0x5625ed9b01a0 "/usr/lib/systemd/system/local-fs.target.wants/systemd-remount-fs.service", e=0x0,
    _ret=0x7ffe64645000) at ../src/core/manager.c:1887
    name=0x5625ed9b01ce "systemd-remount-fs.service",
    path=0x5625ed9b01a0 "/usr/lib/systemd/system/local-fs.target.wants/systemd-remount-fs.service", e=0x0,
    _ret=0x7ffe64645000) at ../src/core/manager.c:1961
    name=0x5625ed9b01ce "systemd-remount-fs.service",
    path=0x5625ed9b01a0 "/usr/lib/systemd/system/local-fs.target.wants/systemd-remount-fs.service",
    add_reference=true, mask=UNIT_DEPENDENCY_FILE) at ../src/core/unit.c:2946
    dir_suffix=0x5625ebb179ed ".wants") at ../src/core/load-dropin.c:95
    path=0x0, e=0x0, _ret=0x7ffe646452c0) at ../src/core/manager.c:1965
    name=0x5625ebb186f8 "local-fs.target", path=0x0, add_reference=true,
    mask=UNIT_DEPENDENCY_MOUNTINFO_IMPLICIT) at ../src/core/unit.c:2946
    where=0x5625ed9b3cc0 "/tmp", options=0x5625ed947110 "rw,nosuid,nodev,seclabel",
    fstype=0x5625ed95be90 "tmpfs", flags=0x7ffe64645395) at ../src/core/mount.c:1439
    where=0x5625ed9b3cc0 "/tmp", options=0x5625ed947110 "rw,nosuid,nodev,seclabel",
    fstype=0x5625ed95be90 "tmpfs", set_flags=false) at ../src/core/mount.c:1567
    at ../src/core/mount.c:1635
    ret_retval=0x7ffe64645660, ret_shutdown_verb=0x7ffe646456c0, ret_fds=0x7ffe646456d8,
    ret_switch_root_dir=0x7ffe646456b0, ret_switch_root_init=0x7ffe646456b8,
    ret_error_message=0x7ffe646456c8) at ../src/core/main.c:1669
2018-09-15 19:43:58 +02:00
..
ac-power tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
activate tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
analyze analyze: use temporary var to simplify code 2018-08-23 11:30:57 +02:00
ask-password tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
backlight tree-wide: replace device_enumerator_scan_devices()+FOREACH_DEVICE_AND_SUBSYSTEM() by FOREACH_DEVICE() 2018-09-10 16:48:37 +09:00
basic socket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails 2018-09-14 13:00:38 +02:00
binfmt tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
boot meson: disable _all_ tests when -Dtests=false 2018-09-13 12:07:34 +02:00
busctl tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
cgls tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
cgroups-agent tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
cgtop tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
core systemd: do not pass .wants fragment path to manager_load_unit 2018-09-15 19:43:58 +02:00
coredump Merge pull request #9783 from poettering/get-user-creds-flags 2018-08-21 10:09:33 +02:00
cryptsetup cryptsetup-generator: introduce basic keydev support 2018-09-04 16:54:53 +02:00
debug-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
delta tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
detect-virt tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
dissect tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
environment-d-generator Drop my copyright headers 2018-06-14 13:03:20 +02:00
escape tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
firstboot tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
fsck fsck: use our usual syntax for defining bit masks 2018-08-10 13:27:43 -07:00
fstab-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
fuzz tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
getty-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
gpt-auto-generator gpt-auto-generator: replace udev_device by sd_device 2018-08-23 04:57:39 +09:00
hibernate-resume tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
hostname Merge pull request #9406 from yuwata/rfe-9228 2018-08-23 11:11:13 +02:00
hwdb tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
import importd, basic/string-util: use case-insensitive comparison for HTTP headers 2018-09-03 22:59:27 +02:00
initctl initctl: do not ignore errors in function 2018-08-07 10:06:49 +09:00
journal Merge pull request #10070 from keszybz/test-reporting 2018-09-15 15:55:15 +09:00
journal-remote tree-wide: use DEFINE_TRIVIAL_REF_UNREF_FUNC() macro or friends where applicable 2018-08-27 14:01:46 +09:00
kernel-install kernel-install: don't try to run depmod when kernel doesn't support modules 2018-08-08 10:42:04 +02:00
libsystemd Merge pull request #9958 from yuwata/sd-device-enum-set 2018-09-15 18:33:18 +02:00
libsystemd-network tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
libudev libudev-util: adjust type of returned value by util_string_hash32() 2018-09-10 18:27:36 +09:00
locale tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
login Merge pull request #9958 from yuwata/sd-device-enum-set 2018-09-15 18:33:18 +02:00
machine tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
machine-id-setup tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
modules-load tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
mount tree-wide: replace device_enumerator_scan_devices()+FOREACH_DEVICE_AND_SUBSYSTEM() by FOREACH_DEVICE() 2018-09-10 16:48:37 +09:00
network tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
notify Merge pull request #9783 from poettering/get-user-creds-flags 2018-08-21 10:09:33 +02:00
nspawn tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
nss-myhostname nss: do not modify errno when NSS_STATUS_NOTFOUND or NSS_STATUS_SUCCESS 2018-07-25 10:23:22 +02:00
nss-mymachines Merge pull request #9504 from poettering/nss-deadlock 2018-07-26 10:16:25 +02:00
nss-resolve Merge pull request #9504 from poettering/nss-deadlock 2018-07-26 10:16:25 +02:00
nss-systemd nss: do not modify errno when NSS_STATUS_NOTFOUND or NSS_STATUS_SUCCESS 2018-07-25 10:23:22 +02:00
partition tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
path tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
portable tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
quotacheck tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
random-seed random-seed: write the machine ID into /dev/urandom as well 2018-08-20 12:42:28 +02:00
rc-local-generator tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
remount-fs tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
reply-password tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
resolve test: remove support for suffix in get_testdata_dir() 2018-09-12 09:49:03 -07:00
rfkill rfkill: replace udev_device by sd_device 2018-08-23 04:57:39 +09:00
run Merge pull request #9783 from poettering/get-user-creds-flags 2018-08-21 10:09:33 +02:00
shared Merge pull request #9958 from yuwata/sd-device-enum-set 2018-09-15 18:33:18 +02:00
sleep tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
socket-proxy tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
stdio-bridge stdio-bridge: support --machine 2018-08-06 14:30:53 -07:00
sulogin-shell tree-wide: shorten error logging a bit 2018-08-07 10:14:33 +09:00
sysctl tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
system-update-generator Correct a number of trivial typos. 2018-06-18 22:44:44 +02:00
systemctl Merge pull request #10061 from xnox/fix-logindless-scheduled-shutdown 2018-09-12 20:45:31 +02:00
systemd meson: disable _all_ tests when -Dtests=false 2018-09-13 12:07:34 +02:00
sysusers tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
sysv-generator tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test Merge pull request #10070 from keszybz/test-reporting 2018-09-15 15:55:15 +09:00
time-wait-sync tree-wide: drop empty lines in comments 2018-07-23 08:44:24 +02:00
timedate bus-util: make --property= optionally take value 2018-09-12 12:11:25 +09:00
timesync tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
tmpfiles tmpfiles: use fd_get_path() even less excessively 2018-08-21 19:48:08 +02:00
tty-ask-password-agent tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
udev udevadm-util: drop unused function print_version() 2018-09-10 18:27:36 +09:00
update-done tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
update-utmp tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
user-sessions tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
vconsole tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
veritysetup tree-wide: add clickable man page link to all --help texts 2018-08-20 11:33:04 +02:00
volatile-root tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00