[Libreoffice-commits] online.git: 2 commits - loolwsd-systemplate-setup loolwsd.xml.in wsd/LOOLWSD.cpp wsd/Storage.cpp

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 25 10:25:37 UTC 2019


 loolwsd-systemplate-setup |    3 +++
 loolwsd.xml.in            |    2 +-
 wsd/LOOLWSD.cpp           |    2 +-
 wsd/Storage.cpp           |    5 ++++-
 4 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit b0403c7d457935e137a2bbaf5574f8d7a181a5b7
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Fri Oct 25 11:24:33 2019 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Oct 25 11:24:33 2019 +0100

    Copy linked /etc/localtime (and also timezone) into the systemplate.
    
    Change-Id: I77fc24aa0f2fc94ee889a87bc10332c85ea57808

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 09d5265fc..2500beac4 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -28,6 +28,7 @@ find etc/hosts etc/nsswitch.conf etc/resolv.conf \
      lib/libresolv* lib64/libresolv* lib/*/libresolv* \
      var/cache/fontconfig \
      etc/fonts \
+     etc/timezone \
      etc/localtime \
      usr/lib/locale/en_US.utf8 \
      usr/lib/locale/C.UTF-8 \
@@ -40,6 +41,8 @@ find etc/hosts etc/nsswitch.conf etc/resolv.conf \
 	 -type f 2>/dev/null
 
 find etc/fonts \
+     etc/timezone \
+     etc/localtime \
      etc/resolv.conf \
      lib/ld-* lib64/ld-* \
      lib/libnss_* lib64/libnss_* lib/*/libnss_* \
commit 2f534842cd13af298a0b7b126b389b018cefdfff
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Oct 24 17:00:07 2019 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Oct 25 10:57:24 2019 +0100

    fallback to ssl.enable for storage.ssl.enable for back-compat.
    
    Implements TODO from 5d57f5aef38d08196952bf22cd310001cbedea1e
    
    Change-Id: I32bc4cc2b875a4ec44bc8d254af7b03c8016e887

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 70a6751e2..7086fe167 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -126,7 +126,7 @@
             <host desc="Hostname to allow" allow="false">localhost</host>
         </webdav>
         <ssl desc="SSL settings">
-            <enable type="bool" desc="Controls whether SSL encryption between storage and loolwsd is enabled. If default is false, must first be compiled with SSL support to enable." default="@ENABLE_SSL@">@ENABLE_SSL@</enable>
+            <enable type="bool" desc="Controls whether SSL encryption between storage and loolwsd is enabled. Defaults when empty to following the ssl.enable setting"></enable>
             <cert_file_path desc="Path to the cert file" relative="false"></cert_file_path>
             <key_file_path desc="Path to the key file" relative="false"></key_file_path>
             <ca_file_path desc="Path to the ca file" relative="false"></ca_file_path>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index c610606a9..33c3b1955 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -853,7 +853,7 @@ void LOOLWSD::initialize(Application& self)
             { "ssl.key_file_path", LOOLWSD_CONFIGDIR "/key.pem" },
             { "ssl.termination", "true" },
             { "storage.filesystem[@allow]", "false" },
-            { "storage.ssl.enable", "false" },
+//            "storage.ssl.enable" - deliberately not set; for back-compat
             { "storage.webdav[@allow]", "false" },
             { "storage.wopi.host[0]", "localhost" },
             { "storage.wopi.host[0][@allow]", "true" },
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 9590c88ff..1ffdcdc78 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -125,7 +125,10 @@ void StorageBase::initialize()
     // Init client
     Poco::Net::Context::Params sslClientParams;
 
-    SSLEnabled = LOOLWSD::getConfigValue<bool>("storage.ssl.enable", false);
+    // Fallback to ssl.enable if not set - for back compatibility & simplicity.
+    SSLEnabled = LOOLWSD::getConfigValue<bool>(
+        "storage.ssl.enable", LOOLWSD::getConfigValue<bool>("ssl.enable", true));
+
 #if ENABLE_DEBUG
     char *StorageSSLEnabled = getenv("STORAGE_SSL_ENABLE");
     if (StorageSSLEnabled != NULL)


More information about the Libreoffice-commits mailing list