]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/execute.c
core: resolve binary names immediately before execution
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Sep 2020 08:27:51 +0000 (10:27 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 18 Sep 2020 13:28:48 +0000 (15:28 +0200)
commit9f71ba8d955b7705cd6f664ff2ab437632e2c43b
treeb94d71c7b2dafe28fdc278126c0f4b52fa653560
parent92673045b55dd58c568a0b31ada4516d55933024
core: resolve binary names immediately before execution

This has two advantages:
- we save a bit of IO in early boot because we don't look for executables
  which we might never call
- if the executable is in a different place and it was specified as a
  non-absolute path, it is OK if it moves to a different place. This should
  solve the case paths are different in the initramfs.

Since the executable path is only available quite late, the call to
mac_selinux_get_child_mls_label() which uses the path needs to be moved down
too.

Fixes #16076.
src/core/execute.c
src/core/load-fragment.c