windows: add NtSetEaFile, NtQueryEaFile and NtQueryInformationFile

unix package already provides support for working with file extended
attributes via Fsetxattr and Fgetxattr syscalls. Windows offers a similar
feature implemented by means of NtSetEaFile and NtQueryEaFile syscalls.
Those syscalls are provided by this patch.

Additionally, NtQueryInformationFile syscall is added. It is required
for correct implementation of extended attribute support in library
code, as correct invocation of NtQueryEaFile relies on file information
returned by said syscall. It also amends the previously accepted
NtSetInformationFile syscall.

Fixes golang/go#78672

Change-Id: Ia4ba037eb2777ba02a953a57ec1d365aad17cac5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/766800
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
4 files changed
tree: 2a8888a7b27c96f1a1f29aca51b21f514a3e05cb
  1. cpu/
  2. execabs/
  3. plan9/
  4. unix/
  5. windows/
  6. .gitattributes
  7. .gitignore
  8. codereview.cfg
  9. CONTRIBUTING.md
  10. go.mod
  11. LICENSE
  12. PATENTS
  13. README.md
README.md

sys

Go Reference

This repository holds supplemental Go packages for low-level interactions with the operating system.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.

The git repository is https://go.googlesource.com/sys.

The main issue tracker for the sys repository is located at https://go.dev/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.