]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: don't try to load units from non-absolute paths
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 18 Sep 2020 12:48:40 +0000 (14:48 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 23 Sep 2020 12:49:37 +0000 (14:49 +0200)
The error message disagreed with the check that was actually performed. Adjust the check.

src/core/manager.c

index b3f6df8661f06f7abce9e412cafeafda24d28d1c..d85d938e7bab25f665bc3e4194da3b671636b2aa 100644 (file)
@@ -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) {