[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
Thu Jul 12 14:04:14 UTC 2018
configure.ac | 12 ++++++++++--
wsd/LOOLWSD.cpp | 4 ++--
2 files changed, 12 insertions(+), 4 deletions(-)
New commits:
commit b2a5e0c5bf61fa96f1e8f00c92d76e4e3555a5ae
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sat Jun 23 19:52:27 2018 -0400
configure: support disabling anonymization
And inform the user of the anonymization level.
Change-Id: I95cf832d5c4103744207214ffbf4e85d177ff190
Reviewed-on: https://gerrit.libreoffice.org/56567
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/configure.ac b/configure.ac
index eda74b178..a4acf22b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,6 +138,7 @@ LOOLWSD_ANONYMIZE_FILENAMES=false
LOOLWSD_ANONYMIZE_USERNAMES=false
LOLEAFLET_LOGGING="false"
debug_msg="secure mode: product build"
+anonym_msg=""
if test "$enable_debug" = "yes"; then
AC_DEFINE([ENABLE_DEBUG],1,[Whether to compile in some extra debugging support code and disable some security pieces])
ENABLE_DEBUG=true
@@ -161,18 +162,24 @@ if test -n "$with_logfile" ; then
fi
AC_SUBST(LOOLWSD_LOGFILE)
-if test -n "$enable_anonymize_filenames" ; then
+if test "$enable_anonymize_filenames" = "yes" ; then
LOOLWSD_ANONYMIZE_FILENAMES=true
+ anonym_msg="filenames anonymized; "
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
+if test "$enable_anonymize_usernames" = "yes" ; then
LOOLWSD_ANONYMIZE_USERNAMES=true
+ anonym_msg="${anonym_msg}usernames anonymized; "
fi
AC_DEFINE_UNQUOTED([LOOLWSD_ANONYMIZE_USERNAMES],[$LOOLWSD_ANONYMIZE_USERNAMES],[Enable permanent usernames anonymization in logs])
AC_SUBST(LOOLWSD_ANONYMIZE_USERNAMES)
+if "x$anonym_msg" = "x"; then
+ anonym_msg="no anonymization of usernames or filenames"
+fi
+
MAX_CONNECTIONS=20
AS_IF([test -n "$with_max_connections" && test "$with_max_connections" -gt "0"],
[MAX_CONNECTIONS="$with_max_connections"])
@@ -451,6 +458,7 @@ Configuration:
LO integration tests ${lo_msg}
SSL support $ssl_msg
Debug & low security $debug_msg
+ Anonymization $anonym_msg
\$ make # to compile"
if test -n "$with_lo_path"; then
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index b22075b0e..aa21a6c60 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -762,14 +762,14 @@ void LOOLWSD::initialize(Application& self)
}
// Get anonymization settings.
-#ifdef LOOLWSD_ANONYMIZE_USERNAMES
+#if 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
+#if LOOLWSD_ANONYMIZE_FILENAMES
AnonymizeFilenames = true;
#else
AnonymizeFilenames = getConfigValue<bool>(conf, "logging.anonymize.filenames", false);
More information about the Libreoffice-commits
mailing list