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 other than not making > the change. T

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

2024-09-26 Thread Chris Plummer
On Thu, 15 Aug 2024 20:28:28 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 >> function

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

2024-09-26 Thread Kevin Walls
On Thu, 15 Aug 2024 20:28:28 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 >> function

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-09-20 Thread Chris Plummer
On Tue, 17 Sep 2024 18:30:16 GMT, Dhamoder Nalla 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 > > unusual. 8-

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

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

2024-09-11 Thread Kevin Walls
On Thu, 15 Aug 2024 20:28:28 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 >> function

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-08-21 Thread Kevin Walls
On Thu, 15 Aug 2024 20:28:28 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 >> function

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: > >> 325: typedef DWORD (WINAPI

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

2024-08-20 Thread Alan Bateman
On Thu, 15 Aug 2024 20:28:28 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 >> function

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

2024-08-15 Thread Chris Plummer
On Thu, 15 Aug 2024 22:06:14 GMT, Dhamoder Nalla wrote: >> src/hotspot/os/windows/os_windows.cpp line 1522: >> >>> 1520: const char* os::get_temp_directory() { >>> 1521: static char path_buf[MAX_PATH]; >>> 1522: if (_GetTempPath2A != nullptr) { >> >> Where does _GetTempPath2A get initialize

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 1522: > >> 1520: const char* os::get_temp_directory

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

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 potenti

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath

2024-08-15 Thread Chris Plummer
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 function > with