]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: open persistent directory without O_PATH
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Apr 2024 19:51:27 +0000 (04:51 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Apr 2024 19:59:43 +0000 (04:59 +0900)
Addresses https://github.com/systemd/systemd/pull/31811#discussion_r1557549629.

src/network/networkd-manager.c

index 77dfc65a8a7545b23112a3fa211077d53a640d46..8e8b27d78db00cdfa520c03ff2ed7e380b1180f7 100644 (file)
@@ -568,7 +568,7 @@ static int persistent_storage_open(void) {
         if (r <= 0)
                 return -EBADF;
 
-        fd = open("/var/lib/systemd/network/", O_CLOEXEC | O_DIRECTORY | O_PATH);
+        fd = open("/var/lib/systemd/network/", O_CLOEXEC | O_DIRECTORY);
         if (fd < 0)
                 return log_debug_errno(errno, "Failed to open /var/lib/systemd/network/, ignoring: %m");