[Libreoffice-commits] online.git: common/Log.cpp

Pranav Kant pranavk at collabora.co.uk
Wed Jul 12 09:46:16 UTC 2017


 common/Log.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit af13e5927d216dd53e672056d64f11766d001457
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Wed Jul 12 15:08:59 2017 +0530

    Open the log channel explicitly to avoid file creation inside jail
    
    Change-Id: Ida66861e0e1c5925dbbf53d564a829eaf0fd15c7

diff --git a/common/Log.cpp b/common/Log.cpp
index e4a9e995..0b19d88f 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -158,6 +158,12 @@ namespace Log
         else
             channel = static_cast<Poco::Channel*>(new Poco::ConsoleChannel());
 
+        /**
+         * Open the channel explicitly, instead of waiting for first log message
+         * This is important especially for the kit process where opening the channel
+         * after chroot can cause file creation inside the jail instead of outside
+         * */
+        channel->open();
         auto& logger = Poco::Logger::create(Source.name, channel, Poco::Message::PRIO_TRACE);
 
         logger.setLevel(logLevel.empty() ? std::string("trace") : logLevel);


More information about the Libreoffice-commits mailing list