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

New commits:
commit c36136b0cf264d4f8bdd7736a939dc69a33bf0c9
Author: Pranav Kant <pran...@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
    (cherry picked from commit af13e5927d216dd53e672056d64f11766d001457)
    Reviewed-on: https://gerrit.libreoffice.org/39856
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>

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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to