From b15533d4ac959352b74a167bb6174e2a39cad2ec Mon Sep 17 00:00:00 2001 From: David Kubek Date: Thu, 9 Nov 2023 12:57:32 +0100 Subject: [PATCH] Update repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py Co-authored-by: Toshio Kuratomi --- .../actors/targetuserspacecreator/libraries/userspacegen.py | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py index ef8850a295..d594ec64fa 100644 --- a/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py +++ b/repos/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py @@ -390,6 +390,7 @@ def _copy_decouple(srcdir, dstdir): # Ensure parent directory exists parent_dir = os.path.dirname(target_filepath) + # Note: This is secure because we know that parent_dir is located inside of `$target_userspace/etc/pki` which is a directory that is not writable by unprivileged users. If this function is used elsewhere we may need to be more careful before running `mkdir -p`. run(['mkdir', '-p', parent_dir]) if os.path.islink(source_filepath):