In 10.11.2, sandboxed apps can no longer launch tasks in Application Support

Originator:bya
Number:rdar://24199924 Date Originated:14-Jan-2016
Status:Open Resolved:
Product:OS X SDK Product Version:10.11.2
Classification:Serious Bug Reproducible:Yes
 
Summary:
My sandboxed app can no longer launch tasks from its Application Support directory.

Steps to Reproduce:
I’ve included (in the Apple Bug Report)  a very simple project that demonstrates our results.

First, you’ll need to perform some quick setup:

1. Compile and run the sample project. You should see a window like this:

[Launch from Applications]
[Launch from App Support]

2. Press the Launch from App Support button. You will see an expected error dialog (we’re doing this to construct the expected Application Support directory). The error dialog should tell you that it couldn't launch the task.

3. Create a simple shell script in /Applications/launch-me. For example, here’s what I did:

[breton] ~ $ cat > /Applications/launch-me << EOL
> #!/bin/sh
> echo "Launched Successfully!"
> EOL

4. Make the shell script executable:

[breton] ~ $ chmod +x /Applications/launch-me 

5. Copy the shell script to the Application Support directory:

[breton] ~ $ cp /Applications/launch-me ~/Library/Containers/co.180g.SandboxTaskBug/Data/Library/Application\ Support/SandboxTaskBug/

6. Now, your setup is complete. When you run the SandboxTaskBug application on OS X versions prior to 10.11.2, you will see the following output in Xcode’s console when you press the first and then the second button:

Launched Successfully!
Launched Successfully!

If, however, you run it on OS X 10.11.2, you’ll get the following error when you try to Launch from App Support:

EXCEPTION:
launch path not accessible

Expected Results:
I should be able to launch the task.

Actual Results:
I get an exception.

Version:
Xcode 7 and 10.11.2

Notes:
I contacted Apple Developer Technical Support, which confirmed my results.

Configuration:
MBA 13" mid-2012

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!