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

New commits:
commit 98db79f562f04333e16422c88964d248f7b14395
Author: Pranav Kant <[email protected]>
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 <[email protected]>
    Tested-by: Andras Timar <[email protected]>
    Reviewed-by: Michael Meeks <[email protected]>
    Tested-by: Michael Meeks <[email protected]>
    (cherry picked from commit c36136b0cf264d4f8bdd7736a939dc69a33bf0c9)
    Reviewed-on: https://gerrit.libreoffice.org/39896

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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to