doc/go1.21: document that os.TempDir now uses GetTempPath2W

Updates #56899

Change-Id: Ibde69cd55c81ac0bb757b28b28d69463778dd117
Reviewed-on: https://go-review.googlesource.com/c/go/+/500255
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
qmuntal 2023-06-02 10:25:20 +02:00 committed by Quim Muntal
parent c9faf3126e
commit ae71a862b1

View File

@ -745,6 +745,15 @@ Do not send CLs removing the interior tags from such phrases.
an error indicating that the file does not exist.
</p>
<p><!-- https://go.dev/issue/56899, CL 463219 -->
On Windows calling
<a href="/pkg/os/#TempDir"><code>TempDir</code></a> now uses
GetTempPath2W when available, instead of GetTempPathW. The
new behavior is a security hardening measure that prevents
temporary files created by processes running as SYSTEM to
be accessed by non-SYSTEM processes.
</p>
<p><!-- CL 493036 -->
On Windows the os package now supports working with files whose
names, stored as UTF-16, can't be represented as valid UTF-8.