libreoffice-online/kit
Ashod Nakashian bc8da0cb33 wsd: support read-only systemplate
For various reasons, systemplate may be read-only
or under a different owner and therefore impossible
to update the dynamic files in it.

To support such a scenario, we first link the
eight dynamic files in /etc when creating systemplate.
If this fails, we copy the files.

When creating jails, we always check that all the
dynamic files are up-to-date. If they are, nothing
further is necessary and we bind-mount, if enabled
and possible.

However, if the dynamic files are not up-to-date,
we disable bind-mounting and force linking
the files in the jails. Failing that, we copy them,
which is not ideal, but allows us to ensure the
dynamic files are up-to-date as we copy them too.

Ideally, the dynamic files in question would be
hard-link (or at least soft-linked) in systemplate
at creation. From then on we would bind-mount
the jails and everything would work perfectly and
no files would need updating. This patch is fallback
for when this scheme fails, which should be exceedingly
rare anyway, but which still ensures correct operation.

Change-Id: I09c6f057c49396579aaddb1b8bf4af0930dd4247
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100834
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-08-17 13:51:56 +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 Kit: add initial state dumping on USR1. 2020-07-18 18:21:14 +02:00
Kit.cpp wsd: support read-only systemplate 2020-08-17 13:51:56 +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 TestStubs: add more stubs for sanitizers 2019-05-28 09:10:45 +02:00
Watermark.hpp Use #pragma once 2020-04-18 15:00:18 +02:00