dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
594167
From 848b8dde6fe096b317abf0b4996f21c8fe6a39ce Mon Sep 17 00:00:00 2001
594167
From: Yu Watanabe <watanabe.yu+github@gmail.com>
594167
Date: Wed, 2 Feb 2022 15:06:27 +0900
594167
Subject: [PATCH] mkdir: CHASE_NONEXISTENT cannot used in
594167
 chase_symlinks_and_stat()
594167
594167
(cherry picked from commit e22916e61d1fdb7b46918b605ebf783d9017f9d8)
594167
594167
Related: #2017035
594167
---
594167
 src/basic/mkdir.c | 2 +-
594167
 1 file changed, 1 insertion(+), 1 deletion(-)
594167
594167
diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
594167
index 88782ab0d4..51a0d74e87 100644
594167
--- a/src/basic/mkdir.c
594167
+++ b/src/basic/mkdir.c
594167
@@ -42,7 +42,7 @@ int mkdir_safe_internal(
594167
         if ((flags & MKDIR_FOLLOW_SYMLINK) && S_ISLNK(st.st_mode)) {
594167
                 _cleanup_free_ char *p = NULL;
594167
 
594167
-                r = chase_symlinks_and_stat(path, NULL, CHASE_NONEXISTENT, &p, &st, NULL);
594167
+                r = chase_symlinks_and_stat(path, NULL, 0, &p, &st, NULL);
594167
                 if (r < 0)
594167
                         return r;
594167
                 if (r == 0)