diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-02 12:17:20 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-02 12:17:20 -0500 |
commit | 17e78d1825bcc6cb9af25c9b1598ef32c82da6af (patch) | |
tree | c9afdf3f2dd2e2899975afed2a9684ad440ecfa9 /src/core/load-dropin.c | |
parent | 3ef21542b20bc62760a423aebeebb4c9e014131c (diff) | |
download | systemd-17e78d1825bcc6cb9af25c9b1598ef32c82da6af.tar.gz |
systemctl: also use chase_symlinks for dropins
The general rule is:
- code in shared/ should take an "original_root" argument (possibly NULL)
and pass it along down to chase_symlinks
- code in core/ should always use specify original_root==NULL, since we
don't support running the manager from non-root directory
- code in systemctl and other tools should pass arg_root.
For any code that is called from tools which support --root, chase_symlinks
must be used to look up paths.
Diffstat (limited to 'src/core/load-dropin.c')
-rw-r--r-- | src/core/load-dropin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c index f83fa09301..fc07151d37 100644 --- a/src/core/load-dropin.c +++ b/src/core/load-dropin.c @@ -57,9 +57,11 @@ int unit_load_dropin(Unit *u) { char **p; STRV_FOREACH(p, u->manager->lookup_paths.search_path) { - unit_file_process_dir(u->manager->unit_path_cache, *p, t, ".wants", UNIT_WANTS, + unit_file_process_dir(NULL, u->manager->unit_path_cache, *p, t, + ".wants", UNIT_WANTS, add_dependency_consumer, u, NULL); - unit_file_process_dir(u->manager->unit_path_cache, *p, t, ".requires", UNIT_REQUIRES, + unit_file_process_dir(NULL, u->manager->unit_path_cache, *p, t, + ".requires", UNIT_REQUIRES, add_dependency_consumer, u, NULL); } } |