1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

remove "." path components from required mount paths

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
This commit is contained in:
Stephane Chazelas 2019-03-06 22:16:55 +00:00 committed by Lennart Poettering
parent 4ab97a0597
commit 106bf8e445

View 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;