diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-07-30 10:57:50 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-07-30 10:58:51 +0300 |
commit | 7f4d2380dd16523d1583b9b005009cb90ffa2ea5 (patch) | |
tree | f431a0a66bff9eb5a0672c63bd513e879477c94c /sal | |
parent | feb6e7097fe0eb58590c18a9a1371f67f74f121f (diff) |
Be a bit more lax when resolving bookmarks when sandboxed
Change-Id: I6ada3e660ee58f7937425eea40a4bbd82754f4b1
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/system.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 <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++; |