windows: update TOKEN_ALL_ACCESS according to WinNT.h
TOKEN_ALL_ACCESS was changed at some stage by Microsoft.
Fixes golang/go#25775
Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
Reviewed-on: https://go-review.googlesource.com/117815
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
diff --git a/windows/security_windows.go b/windows/security_windows.go
index f1ec5dc..4f17a33 100644
--- a/windows/security_windows.go
+++ b/windows/security_windows.go
@@ -296,6 +296,7 @@
TOKEN_ADJUST_PRIVILEGES
TOKEN_ADJUST_GROUPS
TOKEN_ADJUST_DEFAULT
+ TOKEN_ADJUST_SESSIONID
TOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED |
TOKEN_ASSIGN_PRIMARY |
@@ -305,7 +306,8 @@
TOKEN_QUERY_SOURCE |
TOKEN_ADJUST_PRIVILEGES |
TOKEN_ADJUST_GROUPS |
- TOKEN_ADJUST_DEFAULT
+ TOKEN_ADJUST_DEFAULT |
+ TOKEN_ADJUST_SESSIONID
TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY
TOKEN_WRITE = STANDARD_RIGHTS_WRITE |
TOKEN_ADJUST_PRIVILEGES |
diff --git a/windows/syscall_windows_test.go b/windows/syscall_windows_test.go
index 9c7133c..0e27464 100644
--- a/windows/syscall_windows_test.go
+++ b/windows/syscall_windows_test.go
@@ -105,3 +105,9 @@
build := uint16(r >> 16)
print("windows version ", major, ".", minor, " (Build ", build, ")\n")
}
+
+func TestTOKEN_ALL_ACCESS(t *testing.T) {
+ if windows.TOKEN_ALL_ACCESS != 0xF01FF {
+ t.Errorf("TOKEN_ALL_ACCESS = %x, want 0xF01FF", windows.TOKEN_ALL_ACCESS)
+ }
+}