]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
chase-symlink: when converting directory O_PATH fd to real fd, don't bother with...
authorLennart Poettering <lennart@poettering.net>
Fri, 2 Dec 2022 22:50:57 +0000 (23:50 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 2 Dec 2022 22:55:44 +0000 (23:55 +0100)
Replaces: #25581

src/basic/chase-symlinks.c

index 0bb07000bad8922b10e83a4793cb6bd059997df0..7a2aa9f94c1903ac35b2984a7adc1363f431d772 100644 (file)
@@ -557,7 +557,7 @@ int chase_symlinks_and_opendir(
                 return r;
         assert(path_fd >= 0);
 
-        d = opendir(FORMAT_PROC_FD_PATH(path_fd));
+        d = xopendirat(path_fd, ".", O_NOFOLLOW);
         if (!d)
                 return -errno;