summaryrefslogtreecommitdiffstats
path: root/kit
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2022-07-17 12:04:44 -0400
committerHenry Castro <hcastro@collabora.com>2022-08-02 07:51:52 -0400
commitb3540550e863cff8c957f00c69aefbf8ae70bca3 (patch)
tree70b099e73ce57ed6bf0afc672a5237a61f19ae83 /kit
parentwsd: remove default arg from SigUtil::killChild (diff)
downloadonline-b3540550e863cff8c957f00c69aefbf8ae70bca3.tar.gz
online-b3540550e863cff8c957f00c69aefbf8ae70bca3.zip
wsd: mark copied jails early
This avoids the case where we fail to create the jail completely, get killed, or crash. All of which might leave the jail unremoved. Change-Id: I4c6b6a038110186af7be9f358a42902b224188e0 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Diffstat (limited to 'kit')
-rw-r--r--kit/Kit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 9e10072753..c48df7e109 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -2609,6 +2609,9 @@ void lokit_main(
LOG_INF("Mounting is disabled, will link/copy " << sysTemplate << " -> "
<< jailPathStr);
+ // Create a file to mark this a copied jail.
+ JailUtil::markJailCopied(jailPathStr);
+
const std::string linkablePath = childRoot + "/linkable";
linkOrCopy(sysTemplate, jailPath, linkablePath, LinkOrCopyType::All);
@@ -2625,9 +2628,6 @@ void lokit_main(
"read-only, running the installation scripts with the owner's account "
"should update these files. Some functionality may be missing.");
}
-
- // Create a file to mark this a copied jail.
- JailUtil::markJailCopied(jailPathStr);
}
// Setup the devices inside /tmp and set TMPDIR.