Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sandbox support #29

Open
noahsw opened this issue Oct 6, 2012 · 9 comments
Open

Add Sandbox support #29

noahsw opened this issue Oct 6, 2012 · 9 comments

Comments

@noahsw
Copy link

noahsw commented Oct 6, 2012

Without temporary entitlements and some changes to FRCrashLogFinder, the app can't find any crash reports.

This can be solved by adding a temporary entitlement com.apple.security.temporary-exception.files.home-relative-path.read-only to:

  • /Library/Logs/HangReporter/
  • /Library/Logs/DiagnosticReports/
  • /Library/Logs/CrashReporter/

and also update the way we find libraryDirectory in FRCrashLogFinder.m's findCrashLogsSince:

const char *home = getpwuid(getuid())->pw_dir;
NSString *path = [[NSFileManager defaultManager]
stringWithFileSystemRepresentation:home
length:strlen(home)];
NSURL *url = [NSURL fileURLWithPath:path isDirectory:YES];
libraryDirectory = [url.path stringByAppendingPathComponent:@"Library"];

@seanm
Copy link
Collaborator

seanm commented Nov 13, 2012

See also issue #23.

@mthon
Copy link

mthon commented Jan 26, 2013

I just tried the master branch and out of the box it isn't finding the crash reports for my sandboxed app. The crash reports are landing in the app's sandbox container directory, so a temporary exception shouldn't be needed. It seems like FeedBackReporter is looking in the wrong place, or maybe there's something I need to configure?

@noahsw
Copy link
Author

noahsw commented Jan 27, 2013

@mike-thon -- which version of OSX? Mine is 10.7.

@mthon
Copy link

mthon commented Jan 28, 2013

On Jan 27, 2013, at 7:51 PM, noahsw [email protected] wrote:

@mike-thon -- which version of OSX? Mine is 10.7.


Reply to this email directly or view it on GitHub.

Oops, my bad. I looks like the system is logging crash reports in /Users/mike/Library/Logs/DiagnosticReports which is outside of the sandbox. this is on 10.75 and 10.8.2 Then, if I use this framework in a sandboxed app, do I need to request a temporary entitlement?

@seanm
Copy link
Collaborator

seanm commented Jan 28, 2013

mike, you don't need to ask Apple for a temporary entitlement, you can just specify it and see if that fixes your issue.

As for whether it will be accepted on the MAS, only Apple knows that...

@foozmeat
Copy link

I updated my copy of feedbackReporter to work inside of the sandbox but my app was just rejected because I requested

com.apple.security.temporary-exception.files.home-relative-path.read-only: /Library/Logs/DiagnosticReports/

I'm going to appeal and investigate alternatives.

@foozmeat
Copy link

I just filed http://openradar.appspot.com/radar?id=5795148369756160 to express my frustration about this.

@seanm
Copy link
Collaborator

seanm commented Aug 3, 2017

@foozmeat : did Apple ever reply to that bug? (I just filed a dupe rdar://33705774.)

@foozmeat
Copy link

foozmeat commented Aug 7, 2017

@seanm The bug is still open and there are no comments 😒

seanm added a commit to seanm/feedbackreporter that referenced this issue Sep 12, 2019
- added an entitlements file to the test app, so it can be tested with App Sandbox (though it's set to off)
- log when asl_new() / asl_search() return nil, which they do under App Sandbox
- turned on CodeSignOnCopy when putting the framework into the test app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants