libreoffice-online/kit
Ashod Nakashian 29a5a1f1e9 wsd: move jail setup to the script to support readonly systemplate
We now gracefully fallback to copying when/if systemplate
is readonly.

The bulk of the change is to support proper cleanup in
both cases.

First, we had to move as much of the jail bootstrapping
into the loolwsd-systemplate-setup script, so systemplate
will be as complete as possible before it is locked down.
Next, we needed to update the jail with graceful fallback
to linking/copying upon failure. For that, the jail setup
logic in Kit.cpp has been reworked to support not just
update failures, but also more comprehensive mounting
failures as well.

Finally, jail cleanup now is seamless. To support proper
cleanup when we had mounting enabled but had to fallback,
we mark jails that aren't mounted so we can 'rm -rf' the
contents safely and without fear or causing undue damage
(as unlikely as that is, technically we wouldn't want to
rm systemplate files, if mounting read-only had failed).

There are a few minor refactorings of JailUtil to make
it cleaner and more robust.

Change-Id: Iac34869cb84f45acf64fbbc46d46898367b496d2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101260
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-08-25 07:58:30 +02:00
..
ChildSession.cpp fix: error: ‘id’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 2020-08-06 16:00:34 +02:00
ChildSession.hpp Kit: add initial state dumping on USR1. 2020-07-18 18:21:14 +02:00
Delta.hpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
DummyLibreOfficeKit.cpp Include <cstdlib> for free() 2020-04-29 23:54:36 +02:00
DummyLibreOfficeKit.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
ForKit.cpp wsd: move jail setup to the script to support readonly systemplate 2020-08-25 07:58:30 +02:00
Kit.cpp wsd: move jail setup to the script to support readonly systemplate 2020-08-25 07:58:30 +02:00
Kit.hpp Move the setupKitEnvironment() function into a file of its own 2020-07-03 08:40:49 +02:00
KitHelper.hpp Also send parthash info when using draw (in case of PDF) 2020-06-28 00:37:24 +02:00
SetupKitEnvironment.hpp Calc: enable sheet-geometry data and printTwips messages 2020-07-08 16:42:12 +02:00
TestStubs.cpp
Watermark.hpp Use #pragma once 2020-04-18 15:00:18 +02:00