From: Zbigniew Jędrzejewski-Szmek Date: Fri, 18 Sep 2020 12:48:40 +0000 (+0200) Subject: core: don't try to load units from non-absolute paths X-Git-Tag: v247-rc1~176^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=526e3cbbdd530f4081b638fbb6e1e1c641ea57d9;p=thirdparty%2Fsystemd.git core: don't try to load units from non-absolute paths The error message disagreed with the check that was actually performed. Adjust the check. --- diff --git a/src/core/manager.c b/src/core/manager.c index b3f6df8661f..d85d938e7ba 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1973,10 +1973,9 @@ int manager_load_unit_prepare( assert(m); assert(_ret); - /* This will prepare the unit for loading, but not actually - * load anything from disk. */ + /* This will prepare the unit for loading, but not actually load anything from disk. */ - if (path && !is_path(path)) + if (path && !path_is_absolute(path)) return sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "Path %s is not absolute.", path); if (!name) {