network: open persistent directory without O_PATH

Addresses https://github.com/systemd/systemd/pull/31811#discussion_r1557549629.
This commit is contained in:
Yu Watanabe
2024-04-10 04:59:43 +09:00
parent edda10f2ae
commit fb6f98ae63
+1 -1
View 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");