Re: RFR(M) 8212605: Pure-Java implementation of AccessController.doPrivileged

2018-11-04 Thread Alan Bateman

On 03/11/2018 20:00, dean.l...@oracle.com wrote:
I made a pass at improving the comments based on feedback I've 
received.  I updated webrev.4 in place, along with an incremental diff:
I looked through the updated webrev.4, mostly studying the changes in 
AccessController.java and jvm.cpp and the changes look good to me.


-Alan.


RE: RFR 8213031: (zipfs) Add support for POSIX file permissions

2018-11-04 Thread Langer, Christoph
Hi,

Ping.

May I get reviews/substantial feedback on this zipfs enhancement?

Bug: https://bugs.openjdk.java.net/browse/JDK-8213031
CSR: https://bugs.openjdk.java.net/browse/JDK-8213082
Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8213031.2/

Thanks
Christoph

From: Langer, Christoph
Sent: Montag, 29. Oktober 2018 15:55
To: 'Alan Bateman' ; core-libs-dev 
; security-dev@openjdk.java.net; Xueming Shen 

Cc: Volker Simonis ; nio-dev 

Subject: RE: RFR 8213031: (zipfs) Add support for POSIX file permissions (was: 
Enhance jdk.nio.zipfs to support Posix File Permissions)

Hi Alan, security guys,

I've proposed a CSR for this change now: 
https://bugs.openjdk.java.net/browse/JDK-8213082.

I also updated the webrev, simplifying jdk.nio.zipfs.ZipUtils.permsFromFlags 
and eliminating the WeakHashMap: 
http://cr.openjdk.java.net/~clanger/webrevs/8213031.2/

Since I've decoupled the changes to java.util.zip and jartool from those in 
jdk.zipfs, we're discussing only jdk.zipfs here.

The implication of my change is that when working with files backed by the nio 
FileSystemProvider (java.nio.file.spi.FileSystemProvider) named "jar", which is 
the alias for zipfs, the files will support attributes of type 
java.nio.file.attribute.PosixFilePermissions ("posix:permissions").

It basically means that some methods of java.nio.file.Files that would return 
null or UnsupportedOperationException before would find an implementation now.

Examples:
https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/nio/file/Files.html#getPosixFilePermissions(java.nio.file.Path,java.nio.file.LinkOption...)
https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/nio/file/Files.html#setPosixFilePermissions(java.nio.file.Path,java.util.Set)
https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/nio/file/Files.html#readAttributes(java.nio.file.Path,java.lang.Class,java.nio.file.LinkOption...)

  *   With class 
https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/nio/file/attribute/PosixFileAttributes.html
https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/nio/file/Files.html#getFileAttributeView(java.nio.file.Path,java.lang.Class,java.nio.file.LinkOption...)

  *   With class 
https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/nio/file/attribute/PosixFileAttributeView.html

Thanks in advance for reviewing.

Best regards
Christoph


From: Alan Bateman mailto:alan.bate...@oracle.com>>
Sent: Montag, 29. Oktober 2018 13:06
To: Langer, Christoph 
mailto:christoph.lan...@sap.com>>; core-libs-dev 
mailto:core-libs-...@openjdk.java.net>>; 
security-dev@openjdk.java.net; Xueming 
Shen mailto:xueming.s...@oracle.com>>
Cc: Volker Simonis mailto:volker.simo...@gmail.com>>; 
Andrew Luo 
mailto:andrewluotechnolog...@outlook.com>>; 
nio-dev mailto:nio-...@openjdk.java.net>>
Subject: Re: RFR 8213031: (zipfs) Add support for POSIX file permissions (was: 
Enhance jdk.nio.zipfs to support Posix File Permissions)

On 29/10/2018 09:26, Langer, Christoph wrote:
:

As per request from Alan, I'm adding security-dev to get a review from security 
perspective.

For security-dev then I think it would be better to write-up a summary of the 
overall proposal and the implications for applications/libraries that use the 
APIs and the jar tool. The security discussion points all relate to capture and 
propagation of file permissions.

-Alan