libreoffice-online/common
Ashod Nakashian f9402ea965 mount: handle symlinks and improve updating systemplate
We should have no symlinks in the jail whatsoever, except
those we create to files known to exist in the jail.

Unfortunately, some systems have some of the /etc files
as symlinks. When we create hard-links to these files,
they can't be accessed from the jail, since the path
they point to isn't replicated in systemplate and jails.

First change here is to always link to the source file or,
when copying, to copy the source rather than a symlink.

Next, to detect modifications, we compare not just the
size and timestamp, but also the contents. This way we
can be certain that any modification will be detected.

Finally, when we copy at least one file in the
systemplate/etc directory, we flag it by creating the
'copied' file. This way we have a reliable indicator
and don't need to second guess if the files are
hard-linked or copied.

We also avoid some noisy errors when we fail to update
systemplate when it's read-only by first checking
if systemplate is writable or not and insue a friendly
log instead.

Change-Id: Ie8c3e70ea4ec19ee098309f8666c00639fa7319b
2020-10-19 07:34:26 +02:00
..
Authorization.cpp wsd: allow URIs without access_header or access_token 2020-10-07 08:13:29 -04:00
Authorization.hpp fix license headers 2020-10-01 11:56:43 +02:00
Clipboard.hpp fix license headers 2020-10-01 11:56:43 +02:00
Common.hpp fix license headers 2020-10-01 11:56:43 +02:00
Crypto.cpp fix license headers 2020-10-01 11:56:43 +02:00
Crypto.hpp fix license headers 2020-10-01 11:56:43 +02:00
FileUtil.cpp mount: handle symlinks and improve updating systemplate 2020-10-19 07:34:26 +02:00
FileUtil.hpp mount: handle symlinks and improve updating systemplate 2020-10-19 07:34:26 +02:00
JailUtil.cpp mount: handle symlinks and improve updating systemplate 2020-10-19 07:34:26 +02:00
JailUtil.hpp fix license headers 2020-10-01 11:56:43 +02:00
JsonUtil.hpp fix license headers 2020-10-01 11:56:43 +02:00
Log.cpp fix license headers 2020-10-01 11:56:43 +02:00
Log.hpp fix license headers 2020-10-01 11:56:43 +02:00
LOOLWebSocket.hpp fix license headers 2020-10-01 11:56:43 +02:00
Message.hpp fix license headers 2020-10-01 11:56:43 +02:00
MessageQueue.cpp fix license headers 2020-10-01 11:56:43 +02:00
MessageQueue.hpp fix license headers 2020-10-01 11:56:43 +02:00
MobileApp.cpp fix license headers 2020-10-01 11:56:43 +02:00
MobileApp.hpp fix license headers 2020-10-01 11:56:43 +02:00
Png.hpp fix license headers 2020-10-01 11:56:43 +02:00
Protocol.cpp fix license headers 2020-10-01 11:56:43 +02:00
Protocol.hpp fix license headers 2020-10-01 11:56:43 +02:00
Rectangle.hpp fix license headers 2020-10-01 11:56:43 +02:00
RenderTiles.hpp fix license headers 2020-10-01 11:56:43 +02:00
Seccomp.cpp fix license headers 2020-10-01 11:56:43 +02:00
Seccomp.hpp fix license headers 2020-10-01 11:56:43 +02:00
security.h fix license headers 2020-10-01 11:56:43 +02:00
Session.cpp fix license headers 2020-10-01 11:56:43 +02:00
Session.hpp fix license headers 2020-10-01 11:56:43 +02:00
SigUtil.cpp fix license headers 2020-10-01 11:56:43 +02:00
SigUtil.hpp fix license headers 2020-10-01 11:56:43 +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 fix license headers 2020-10-01 11:56:43 +02:00
StringVector.hpp Fix typos 2020-10-07 12:51:08 +02:00
Unit.cpp fix license headers 2020-10-01 11:56:43 +02:00
Unit.hpp fix license headers 2020-10-01 11:56:43 +02:00
UnitHTTP.hpp fix license headers 2020-10-01 11:56:43 +02:00
Util.cpp wsd: correction in conversion from timestamp to ISO8601 2020-10-16 04:27:53 +05:30
Util.hpp Introduce Util::make_unique() 2020-10-08 09:53:37 +02:00