libreoffice-online/common
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
..
Authorization.cpp wsd: parse headers with Poco::MessageHeader 2020-08-11 20:04:20 +02:00
Authorization.hpp android: Remove unneeded dependency + add some comments. 2020-07-02 11:08:19 +02:00
Clipboard.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
Common.hpp wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
Crypto.cpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
Crypto.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
FileUtil.cpp wsd: support read-only systemplate 2020-08-17 13:51:56 +02:00
FileUtil.hpp Make FileUtil.{hpp,cpp} compile for iOS again 2020-07-08 15:20:14 +02:00
JailUtil.cpp wsd: move jail setup to the script to support readonly systemplate 2020-08-25 07:58:30 +02:00
JailUtil.hpp wsd: move jail setup to the script to support readonly systemplate 2020-08-25 07:58:30 +02:00
JsonUtil.hpp wsd: minor cosmetics 2020-08-17 14:15:37 +02:00
Log.cpp Don't bother outputting the thread id in hex for iOS to log 2020-07-10 10:56:57 +02:00
Log.hpp Add LOG_INF_NOFILE that doesn't display the source file location 2020-07-14 16:52:28 +02:00
LOOLWebSocket.hpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
Message.hpp wsd: use more efficient StringVector::equals 2020-06-23 06:42:25 +02:00
MessageQueue.cpp wsd: match LOK callback type as integer 2020-07-02 21:49:31 +02:00
MessageQueue.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
MobileApp.cpp tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app 2020-06-26 13:09:51 +02:00
MobileApp.hpp tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app 2020-06-26 13:09:51 +02:00
Png.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
Protocol.cpp wsd: move string-to-integer helper to Util 2020-07-02 02:38:35 +02:00
Protocol.hpp wsd: move string-to-integer helper to Util 2020-07-02 02:38:35 +02:00
Rectangle.hpp wsd: improved TileCache 2020-07-14 15:35:20 +02:00
RenderTiles.hpp Notify WSD of tiles which we didn't need to render. 2020-08-07 20:01:40 +02:00
Seccomp.cpp wsd: single-char string literals -> char 2020-06-02 01:31:26 +02:00
Seccomp.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
security.h wsd: faster jail setup via bind-mount 2020-07-01 05:42:43 +02:00
Session.cpp allow saving a PDF, add "view_comment" state 2020-07-27 16:40:12 +02:00
Session.hpp allow saving a PDF, add "view_comment" state 2020-07-27 16:40:12 +02:00
SigUtil.cpp Fix iOS build: checkDumpGlobalState() is needed 2020-07-15 13:00:05 +02:00
SigUtil.hpp Forkit: add dump_forkit_state and re-factor state checks to simplify. 2020-07-14 17:28:32 +02:00
SpookyV2.cpp loplugin:includeform 2017-12-20 21:21:05 +05:30
SpookyV2.h Use #pragma once 2020-04-18 15:00:18 +02:00
StringVector.cpp wsd: optimized tokenization 2020-06-02 17:25:19 +02:00
StringVector.hpp wsd: use more efficient StringVector::equals 2020-06-23 06:42:25 +02:00
Unit.cpp wsd: add http-headers unit-test 2020-07-01 07:37:10 +02:00
Unit.hpp wsd: add http-headers unit-test 2020-07-01 07:37:10 +02:00
UnitHTTP.hpp Use #pragma once 2020-04-18 15:00:18 +02:00
Util.cpp wsd: parse headers with Poco::MessageHeader 2020-08-11 20:04:20 +02:00
Util.hpp wsd: parse headers with Poco::MessageHeader 2020-08-11 20:04:20 +02:00