desktop/source/lib/init.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 282cf792f23830e98b0ee5a5bd9923714604c8ba
Author:     Michael Meeks <[email protected]>
AuthorDate: Sat Nov 25 21:24:49 2023 +0000
Commit:     Szymon Kłos <[email protected]>
CommitDate: Thu Nov 30 15:49:49 2023 +0100

    lok: import allowed paths from the SAL_ALLOWED_PATHS.
    
    Do this on second init, in order to be able to reset this for
    each child kit process.
    
    Change-Id: I6939ea3677ea2b84c8944b63a9a9120e880a6bfa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159961
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2e6960e9ee52..3c658388306a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7766,6 +7766,15 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
         }
     }
 
+#ifdef LINUX
+    {
+        const char *pAllowedPaths = getenv("SAL_ALLOWED_PATHS");
+        if (pAllowedPaths)
+            osl_setAllowedPaths(
+                OUString(pAllowedPaths, strlen(pAllowedPaths), 
RTL_TEXTENCODING_UTF8).pData);
+    }
+#endif
+
     // What stage are we at ?
     if (pThis == nullptr)
     {

Reply via email to