RFR 7199674: (props) user.home property does not return an accessible location in sandboxed environment [macosx]
Alan Bateman
Alan.Bateman at oracle.com
Fri Sep 6 13:38:47 UTC 2013
On 06/09/2013 11:24, Nicholas Rahn wrote:
> As someone with a Java app in the Mac App Store (MAS), I would like to
> vote against this change.
>
> It is still important to know the user's actual home directory
> (/Users/<username>) even if the app is running in the sandbox. Using
> the entitlement, com.apple.security.files.user-selected.read-write, we
> can still write to user selected directories (such as ~/Documents).
> So changing the user.home property to point to somewhere in the app's
> Container would make it more difficult to get the actual home
> directory and thus, other directories that the end-user is familiar
> with. I also think this change would lead to more developer confusion
> and make application code more complicated.
>
> I don't know all what the user.home property is used for in the JDK
> itself, but concerns about the MAS sandbox would be, IMHO, better
> handled using special Mac/MAS only properties, such as those setup by
> infinitekind's Appbundler fork on bitbucket:
> https://bitbucket.org/infinitekind/appbundler
>
> Nick
I'm sure Brent wants to do the right thing here and maybe this needs
some input from the Apple or other Mac-savvy folks as to whether
sandboxed apps are really supposed to know about the actual user's home
directory.
FWIW, the original recommendaiton to switch to NSHomeDirectory came from
Scott Kovatch when he was working on Application Bundler. It's very
possible that things have changed since then.
-Alan.
More information about the core-libs-dev
mailing list