From 7f4d2380dd16523d1583b9b005009cb90ffa2ea5 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 30 Jul 2013 10:57:50 +0300 Subject: Be a bit more lax when resolving bookmarks when sandboxed Change-Id: I6ada3e660ee58f7937425eea40a4bbd82754f4b1 --- sal/osl/unx/system.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sal') diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c index a857769f8f69..20621a63e6ae 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 + #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++; -- cgit