lo.xcent.in          |    4 ++++
 sal/osl/unx/system.c |   14 ++++++++++++++
 2 files changed, 18 insertions(+)

New commits:
commit c7e95dec6f9a4d1decfb1defb3cfa202df9003dd
Author: Tor Lillqvist <t...@iki.fi>
Date:   Tue Jul 30 10:58:27 2013 +0300

    Allow access to document scope bookmarks
    
    Change-Id: If01cc2ae9f9018f08caa6a5c40025cfdabb0e20b

diff --git a/lo.xcent.in b/lo.xcent.in
index 8e9451c..946003b 100644
--- a/lo.xcent.in
+++ b/lo.xcent.in
@@ -6,6 +6,10 @@
        <string>@MACOSX_BUNDLE_IDENTIFIER@</string>
        <key>com.apple.security.app-sandbox</key>
        <true/>
+       <key>com.apple.security.files.bookmarks.document-scope</key>
+       <true/>
+       <key>com.apple.security.files.bookmarks.collection-scope</key>
+       <true/>
        <key>com.apple.security.files.user-selected.read-write</key>
        <true/>
        <key>com.apple.security.network.client</key>
commit 7f4d2380dd16523d1583b9b005009cb90ffa2ea5
Author: Tor Lillqvist <t...@iki.fi>
Date:   Tue Jul 30 10:57:50 2013 +0300

    Be a bit more lax when resolving bookmarks when sandboxed
    
    Change-Id: I6ada3e660ee58f7937425eea40a4bbd82754f4b1

diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c
index a857769..20621a6 100644
--- a/sal/osl/unx/system.c
+++ b/sal/osl/unx/system.c
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include "system.h"
 
 #ifdef NO_PTHREAD_RTL
@@ -140,7 +142,19 @@ struct hostent *gethostbyname_r(const char *name, struct 
hostent *result,
  */
 int macxp_resolveAlias(char *path, int buflen)
 {
+#if HAVE_FEATURE_MACOSX_SANDBOX
+  /* Avoid unnecessary messages in the system.log:
+   *
+   * kernel[0]: Sandbox: soffice(57342) deny file-read-data /Users
+   * kernel[0]: Sandbox: soffice(57342) deny file-read-data /Users/tml
+   *
+   * etc. It is quite unlikely anyway, I hope, that anything except
+   * the last component of a path name would be a bookmark.
+   */
+  char *unprocessedPath = path + strlen(path) - 1;
+#else
   char *unprocessedPath = path;
+#endif
 
   if ( *unprocessedPath == '/' )
       unprocessedPath++;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to