[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - configure.ac wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue Jun 19 11:29:38 UTC 2018
configure.ac | 2 ++
wsd/LOOLWSD.cpp | 14 ++++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 7e3d01535df6606eddee0c53adf07dcf8e83be10
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Tue Jun 19 07:21:22 2018 -0400
wsd: force anonymization when enabled with configure
This prevents disabling from loolwsd.xml when
the flags to anonymize are baked in at compile time.
Change-Id: If38ad3815bc9f18ed51b6626fc8c03528e7b8327
Reviewed-on: https://gerrit.libreoffice.org/56089
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/configure.ac b/configure.ac
index 4635514a4..eda74b178 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,11 +164,13 @@ AC_SUBST(LOOLWSD_LOGFILE)
if test -n "$enable_anonymize_filenames" ; then
LOOLWSD_ANONYMIZE_FILENAMES=true
fi
+AC_DEFINE_UNQUOTED([LOOLWSD_ANONYMIZE_FILENAMES],[$LOOLWSD_ANONYMIZE_FILENAMES],[Enable permanent filenames anonymization in logs])
AC_SUBST(LOOLWSD_ANONYMIZE_FILENAMES)
if test -n "$enable_anonymize_usernames" ; then
LOOLWSD_ANONYMIZE_USERNAMES=true
fi
+AC_DEFINE_UNQUOTED([LOOLWSD_ANONYMIZE_USERNAMES],[$LOOLWSD_ANONYMIZE_USERNAMES],[Enable permanent usernames anonymization in logs])
AC_SUBST(LOOLWSD_ANONYMIZE_USERNAMES)
MAX_CONNECTIONS=20
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 0a7de556b..b22075b0e 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -762,10 +762,20 @@ void LOOLWSD::initialize(Application& self)
}
// Get anonymization settings.
- AnonymizeFilenames = getConfigValue<bool>(conf, "logging.anonymize.filenames", false);
- setenv("LOOL_ANONYMIZE_FILENAMES", AnonymizeFilenames ? "1" : "0", true);
+#ifdef LOOLWSD_ANONYMIZE_USERNAMES
+ AnonymizeUsernames = true;
+#else
AnonymizeUsernames = getConfigValue<bool>(conf, "logging.anonymize.usernames", false);
+#endif
setenv("LOOL_ANONYMIZE_USERNAMES", AnonymizeUsernames ? "1" : "0", true);
+
+#ifdef LOOLWSD_ANONYMIZE_FILENAMES
+ AnonymizeFilenames = true;
+#else
+ AnonymizeFilenames = getConfigValue<bool>(conf, "logging.anonymize.filenames", false);
+#endif
+ setenv("LOOL_ANONYMIZE_FILENAMES", AnonymizeFilenames ? "1" : "0", true);
+
if (AnonymizeFilenames || AnonymizeUsernames)
{
if (LogLevel == "trace")
More information about the Libreoffice-commits
mailing list