]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/chase-symlinks.c
Merge pull request #25338 from DaanDeMeyer/at-fixes
[thirdparty/systemd.git] / src / basic / chase-symlinks.c
index 35fa97773b75f45e4d8b9006e9c2a1880775bbae..0bb07000bad8922b10e83a4793cb6bd059997df0 100644 (file)
@@ -460,9 +460,7 @@ int chase_symlinks(
                                               SYNTHETIC_ERRNO(ECHRNG),
                                               "Specified path '%s' is outside of specified root directory '%s', refusing to resolve.",
                                               absolute, root);
-        }
 
-        if (root) {
                 fd = open(root, O_CLOEXEC|O_DIRECTORY|O_PATH);
                 if (fd < 0)
                         return -errno;