RFR: 8337408: Use GetTempPath2 API instead of GetTempPath

2024-08-15 Thread Dhamoder Nalla
Use the GetTempPath2 APIs instead of the GetTempPath APIs in native code across the OpenJDK repository to retrieve the temporary directory path, as GetTempPath2 provides enhanced security. While GetTempPath may still function without errors, using GetTempPath2 reduces the risk of potential explo

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-08-15 Thread Dhamoder Nalla
ava.base, jdk.package, > jdk.attach, and hotspot—with no shared code between them. > 2. Some parts of the code use version A, while others use version W (ANSI vs. > Unicode). > 3. Some parts of the code are written in C others in C++. Dhamoder Nalla has updated the pull request incremen

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-08-15 Thread Dhamoder Nalla
On Thu, 15 Aug 2024 18:32:29 GMT, Chris Plummer wrote: >> Dhamoder Nalla has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix missing code > > src/hotspot/os/windows/os_windows.cpp line 15

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-08-20 Thread Dhamoder Nalla
On Tue, 20 Aug 2024 16:17:24 GMT, Alan Bateman wrote: >> Dhamoder Nalla has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix missing code > > src/java.base/windows/native/libjava/java_props_md.c line 327: &g

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-09-04 Thread Dhamoder Nalla
On Wed, 21 Aug 2024 09:07:21 GMT, Kevin Walls wrote: > Hi, > > From the linked doc: "When calling this function from a process running as > SYSTEM it will return the path C:\Windows\SystemTemp, which is inaccessible > to non-SYSTEM processes. For non-SYSTEM processes, GetTempPath2 will behave

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-09-17 Thread Dhamoder Nalla
On Wed, 11 Sep 2024 08:48:42 GMT, Kevin Walls wrote: > OK thanks, so the change only affects SYSTEM accounts, and such accounts > already see a different temp path to non-SYSTEM accounts. > > Newer and older Java versions run by a SYSTEM account will have different > temp paths, therefore the

Withdrawn: 8337408: Use GetTempPath2 API instead of GetTempPath

2024-10-22 Thread Dhamoder Nalla
On Thu, 15 Aug 2024 16:23:18 GMT, Dhamoder Nalla wrote: > Use the GetTempPath2 APIs instead of the GetTempPath APIs in native code > across the OpenJDK repository to retrieve the temporary directory path, as > GetTempPath2 provides enhanced security. While GetTempPath may still

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-09-25 Thread Dhamoder Nalla
On Fri, 20 Sep 2024 20:35:34 GMT, Chris Plummer wrote: > > > Do we have any apps commonly run as a Windows SYSTEM account which expect > > > to attach to other Java apps run by a different Java version? You're > > > suggesting that will have no impact and agreed it would seem really > > > unus

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-10-02 Thread Dhamoder Nalla
On Thu, 26 Sep 2024 16:17:49 GMT, Chris Plummer wrote: >> Dhamoder Nalla has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix missing code > > I don't have a suggestion for maintaining compatibility