Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-4754

[classlib] FilePermission incorrect canonical path

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None

      Description

      If called with a path ending in "" or "", java.io.FilePermission calls File.getCanonicalPath with the "" or "" still appended. This is incorrect (and produces very odd results if "-" or "*" exists - perhaps as a symlink to some completely different tree).

      For example, if you do:

      mkdir test
      ln s /tmp test/

      then (new FilePermission("test/-", "read")).implies(new FilePermission("/tmp/file", "read")
      is true and (new FilePermission("test/", "read")).implies(new FilePermission("test/file", "read") is false where as on the RI it is the opposite way around since the '' symlink is (correctly) ignored.

        Attachments

          Activity

            People

            • Assignee:
              tellison Tim Ellison
              Reporter:
              hindessm Mark Hindess
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: