]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
remove "." path components from required mount paths
authorStephane Chazelas <stephane.chazelas@gmail.com>
Wed, 6 Mar 2019 22:16:55 +0000 (22:16 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Mar 2019 09:12:03 +0000 (10:12 +0100)
unit_require_mounts_for may be passed path arguments that contain "."
components like for user's home directories where "." is sometimes used
to specify some form of anchor point.

This change stops considering such path as an error and removes the "."
components instead.

Closes: #11910
src/core/unit.c

index 4e6323d1bdf3a76e13df8e5af2e62eea22d15f1f..185ec3f6a7ad951bfde2a759410862b1902fcced 100644 (file)
@@ -4609,7 +4609,7 @@ int unit_require_mounts_for(Unit *u, const char *path, UnitDependencyMask mask)
         if (!p)
                 return -ENOMEM;
 
-        path = path_simplify(p, false);
+        path = path_simplify(p, true);
 
         if (!path_is_normalized(path))
                 return -EPERM;