Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7199674

(props) user.home property does not return an accessible location in sandboxed environment [macosx]

XMLWordPrintable

    • b108
    • x86
    • os_x
    • Not verified

        On Mac OS X we obtain the path for user.home with getpwuid(). Normally this will return /Users/<username>. However, if an application is signed and running in an OS X sandboxed environment this path is not accessible to the application, which must run in a container. In that case user.home should return the application's sandbox directory.

        The easy way to fix this is use NSHomeDirectory(), which does the right thing in a sandboxed or non-sandboxed environment. Likewise, NSUserName() is a better choice for getting the current user name.

              bchristi Brent Christian
              skovatch Scott Kovatch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: