2aacef
From 2bd9f97275480842c99117123daab69cbb8f45f4 Mon Sep 17 00:00:00 2001
2aacef
From: Lennart Poettering <lennart@poettering.net>
2aacef
Date: Fri, 2 Dec 2022 23:50:57 +0100
2aacef
Subject: [PATCH] chase-symlink: when converting directory O_PATH fd to real
2aacef
 fd, don't bother with /proc/
2aacef
2aacef
Replaces: #25581
2aacef
(cherry picked from commit 2075b6dd394e09a0f203b9cc7e3253908397f933)
2aacef
2aacef
Related: #2138081
2aacef
---
2aacef
 src/basic/chase-symlinks.c | 2 +-
2aacef
 1 file changed, 1 insertion(+), 1 deletion(-)
2aacef
2aacef
diff --git a/src/basic/chase-symlinks.c b/src/basic/chase-symlinks.c
2aacef
index afab54f067..ac55311f4d 100644
2aacef
--- a/src/basic/chase-symlinks.c
2aacef
+++ b/src/basic/chase-symlinks.c
2aacef
@@ -471,7 +471,7 @@ int chase_symlinks_and_opendir(
2aacef
                 return r;
2aacef
         assert(path_fd >= 0);
2aacef
 
2aacef
-        d = opendir(FORMAT_PROC_FD_PATH(path_fd));
2aacef
+        d = xopendirat(path_fd, ".", O_NOFOLLOW);
2aacef
         if (!d)
2aacef
                 return -errno;
2aacef