Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6866804
Votes 0
Synopsis (file) Path calls checkPermission insteadof checkXXX (sol)
Category java:classes_nio
Reported Against
Release Fixed 7(b71)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs
Submit Date 30-JUL-2009
Description
Spec for java.nio.file.Path methods says when security manager is installed SecurityManager.checkRead(String) and SecurityManager.checkWrite(String file) methdos get called. But what is happening is in unix implementations SecurityManager.checkPermission(Permission p) is getting called insteadof checkRead(String file).

Specificallt Path.isSameFile() says "In the case of the default provider, and a security manager is installed, sm.checkRead(String file) method is invoked to check read access to both files". In Solaris and Linux it calls checkPermission(Permission) where as in windows it calls checkRead(String file).  

Attached test cases PathSecurityTest01 and PathSecurityTest02 passes in Windows fails in Solaris and Linux.
Posted Date : 2009-07-30 10:53:38.0
Work Around
N/A
Evaluation
Yes, this is a bug. The experimental file permission caching should have been removed before the code was pushed to jdk7.
Posted Date : 2009-07-30 11:25:41.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang