core: do not attempt to add 'private' symlinks when RootImage/RootDirectory are used

A bind mount is added directly from private on the host to the actual
destination directory, no need for the symlinks (which cannot be created
as the bind mount happens first and creates the target as an actual directory)

Fixes https://github.com/systemd/systemd/issues/22264
This commit is contained in:
Luca Boccassi
2022-01-28 00:54:10 +00:00
parent 6d7c999ab5
commit 3fa80e5e75
4 changed files with 23 additions and 4 deletions
+1 -1
View File
@@ -3373,7 +3373,7 @@ static int compile_symlinks(
return r;
}
if (!exec_directory_is_private(context, dt))
if (!exec_directory_is_private(context, dt) || exec_context_with_rootfs(context))
continue;
private_path = path_join(params->prefix[dt], "private", context->directories[dt].items[i].path);