Kaydet (Commit) 7f4d2380 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Be a bit more lax when resolving bookmarks when sandboxed

Change-Id: I6ada3e660ee58f7937425eea40a4bbd82754f4b1
üst feb6e709
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <config_features.h>
#include "system.h" #include "system.h"
#ifdef NO_PTHREAD_RTL #ifdef NO_PTHREAD_RTL
...@@ -140,7 +142,19 @@ struct hostent *gethostbyname_r(const char *name, struct hostent *result, ...@@ -140,7 +142,19 @@ struct hostent *gethostbyname_r(const char *name, struct hostent *result,
*/ */
int macxp_resolveAlias(char *path, int buflen) 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; char *unprocessedPath = path;
#endif
if ( *unprocessedPath == '/' ) if ( *unprocessedPath == '/' )
unprocessedPath++; unprocessedPath++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment