[sys] windows: add NtSetEaFile, NtQueryEaFile and NtQueryInformationFile syscalls

2 views
Skip to first unread message

Alex Brainman (Gerrit)

unread,
May 14, 2026, 1:59:15 AM (2 days ago) May 14
to Alex Dubov, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Cherry Mui, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Pratt, Carlos Amedee, Quim Muntal, Brad Fitzpatrick, Gopher Robot, golang-co...@googlegroups.com

Alex Brainman submitted the change

Change information

Commit message:
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-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Alex Brainman <alex.b...@gmail.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Files:
  • M windows/syscall_windows.go
  • M windows/types_windows.go
  • A windows/xattr_test.go
  • M windows/zsyscall_windows.go
Change size: L
Delta: 4 files changed, 342 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: Ia4ba037eb2777ba02a953a57ec1d365aad17cac5
Gerrit-Change-Number: 766800
Gerrit-PatchSet: 8
Gerrit-Owner: Alex Dubov <alex....@gmail.com>
Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Quim Muntal <quimm...@gmail.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages