]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/manager: open our parent dir with O_PATH
authorMike Yuan <me@yhndnzj.com>
Thu, 23 Nov 2023 12:44:32 +0000 (20:44 +0800)
committerMike Yuan <me@yhndnzj.com>
Thu, 23 Nov 2023 12:44:32 +0000 (20:44 +0800)
src/core/manager.c

index dadfc513698ac7600d9eb574eb82427684f4afa5..37e4f70950083af0968f35f6ab52e90b148d6605 100644 (file)
@@ -1030,7 +1030,7 @@ int manager_new(RuntimeScope runtime_scope, ManagerTestRunFlags test_run_flags,
                 if (r < 0)
                         return r;
 
-                self_dir_fd = open_parent(self_exe, O_CLOEXEC|O_DIRECTORY, 0);
+                self_dir_fd = open_parent(self_exe, O_CLOEXEC|O_PATH|O_DIRECTORY, 0);
                 if (self_dir_fd < 0)
                         return self_dir_fd;