From 6d7a70b4a40941d3dbb4724a3d30af4196b46fca Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 23 Aug 2013 20:32:19 +0200 Subject: Bypass the alias resolving completely when sandboxed Attempting to look up the bookmark data for a file will try acessing its resource fork, causing messages like: soffice(83685) deny file-read-data /Users/tml/Documents/b.odt/..namedfork/rsrc Change-Id: I1b2b0b493a46aa629581b921c94c5014f994e75c --- sal/osl/unx/system.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sal') diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c index 55a5bb5a1841..eb19fbcac3e0 100644 --- a/sal/osl/unx/system.c +++ b/sal/osl/unx/system.c @@ -145,16 +145,16 @@ 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 + * soffice(57342) deny file-read-data /Users/tml/Documents/b.odt/..namedfork/rsrc + * etc. * - * etc. It is quite unlikely anyway, I hope, that anything except - * the last component of a path name would be a bookmark. + * Just don't bother with resolving aliases. I doubt its usefulness anyway. */ - char *unprocessedPath = path + strlen(path) - 1; + (void) path; + (void) buflen; + return 0; #else char *unprocessedPath = path; -#endif if ( *unprocessedPath == '/' ) unprocessedPath++; @@ -230,6 +230,7 @@ int macxp_resolveAlias(char *path, int buflen) } return nRet; +#endif } #endif /* defined MACOSX */ -- cgit