harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4754) [classlib] FilePermission incorrect canonical path
Date Fri, 07 Sep 2007 21:22:30 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525841

Mark Hindess commented on HARMONY-4754:

On sun 50 I see:

  lstat64("/path/to/foobartest", ...);

on Harmony I see:

  readlink("/path/to/foobartest/-", ...);

(Incidentally, on J9 I see neither and what I originally suggested about the canonical path
being found at implies time stands.  And at implies time it only stats foobartest and not
foobartest/-.  At least that tells use that lazy evaluation is okay in order to pass the TCK.)

I think it is the constructor that is incorrect.

> [classlib] FilePermission incorrect canonical path
> --------------------------------------------------
>                 Key: HARMONY-4754
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4754
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Mark Hindess
>            Assignee: Tim Ellison
> 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",
> 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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message