Questions about Sandboxed apps

Davin McCall davmac at davmac.org
Thu Sep 27 06:44:42 PDT 2012


Hi,

I'm a first-time poster to this list.

I've read this discussion re sandboxed Java apps:
http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-April/003871.html

And I'm a bit confused by this reply from David DeHaven:
http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-April/003876.html

In particular:
> If you don't have execute permission (either via file permissions or by sandboxd) you cannot browse to that directory in the file chooser.

My understanding from the Apple documentation is that an Open or Save 
dialog can grant the app access to a file or directory not contained 
within its sandbox. See:

http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html

(Section entitled: Powerbox and File System Access Outside of Your 
Container)

     "If a user instead opens a specific file, or saves to a new file, 
the system makes the specified file, and that file alone, available to 
your app."

Of course this probably relies on the Open / Save dialog being opened 
via appropriate native routines. What about if I use a 
javax.swing.JFileChooser? How about java.awt.FileDialog? Is there any 
way to get this "automatic sandbox expansion" behaviour with a Java app?

Thanks for any enlightenment,

Davin



More information about the macosx-port-dev mailing list