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

Details

    • b108
    • x86
    • os_x
    • Not verified

    Backports

      Description

        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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: