Hi Matthias,

I don't think this is worth the complex implementation.

The caller already has access to user.dir property and it is not used by canonicalize0
so I think it should be dropped from the exception text.

In what cases, does canonicalize0 use the native CWD?
The native CWD should not be needed, the caller should have filled in user.dir where needed.

The second native call to get the native cwd doesn't pull its weight.
Without the need for user.dir, the exception message can be created entirely in native
without needing the upcall.

The pathname is already known to the caller and the caller can modify or replace the exception.

There should be a solution that does not require an upcall, and moves any extra work to the caller
of canonicalize0.

Please take a second look at the implementation, Roger

On 10/09/2018 08:12 AM, Baesken, Matthias wrote:
Hello, Alan commented on it :


   *   This proposal will require a security review as it leaks sensitive 
information into exceptions.

So I forward it to security-dev as well.

If needed,  we might  use something similar to  JDK-8207768  where a category  
has been added  for  enhanced exception messages to the
java.security file .

Best regards, Matthias

From: Baesken, Matthias
Sent: Dienstag, 9. Oktober 2018 13:40
To: core-libs-dev@openjdk.java.net
Cc: Langer, Christoph <christoph.lan...@sap.com>; Lindenmaier, Goetz 
<goetz.lindenma...@sap.com>
Subject: RFR: 8211752: JNU_ThrowIOExceptionWithLastErrorAndPath - enhance some 
IOExceptions with path causing the issue


Hello, please review the following change .
It enhances a number of JNU_ThrowIOExceptionWithLastError  calls with path and 
current working directory information.
For this, a new function JNU_ThrowIOExceptionWithLastErrorAndPath is added.

bug and webrev :

https://bugs.openjdk.java.net/browse/JDK-8211752

http://cr.openjdk.java.net/~mbaesken/webrevs/8211752.0/

Thanks, Matthias

--
Thanks, Roger

Reply via email to