From: Thanabodee Charoenpiriyakij Date: Sat, 9 Jun 2018 18:01:27 +0000 (+0700) Subject: syscall: update TOKEN_ALL_ACCESS according to WinNT.h X-Git-Tag: go1.11beta1~166 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b74f7321e594e2c4bcdf1b048e755ddc90c4134d;p=gostls13.git syscall: update TOKEN_ALL_ACCESS according to WinNT.h TOKEN_ALL_ACCESS was changed at some stage by Microsoft. Updates #25775 Change-Id: I3e18914207a0020b2ebfb99f4e57aa55f9de813b Reviewed-on: https://go-review.googlesource.com/117635 TryBot-Result: Gobot Gobot Reviewed-by: Alex Brainman --- diff --git a/api/except.txt b/api/except.txt index 997df042b6..b85003eda2 100644 --- a/api/except.txt +++ b/api/except.txt @@ -377,9 +377,11 @@ pkg syscall (windows-386), type CertContext struct, CertInfo uintptr pkg syscall (windows-386), type CertRevocationInfo struct, CrlInfo uintptr pkg syscall (windows-386), type CertRevocationInfo struct, OidSpecificInfo uintptr pkg syscall (windows-386), type CertSimpleChain struct, TrustListInfo uintptr +pkg syscall (windows-386), const TOKEN_ALL_ACCESS = 983295 pkg syscall (windows-amd64), type CertChainPolicyPara struct, ExtraPolicyPara uintptr pkg syscall (windows-amd64), type CertChainPolicyStatus struct, ExtraPolicyStatus uintptr pkg syscall (windows-amd64), type CertContext struct, CertInfo uintptr pkg syscall (windows-amd64), type CertRevocationInfo struct, CrlInfo uintptr pkg syscall (windows-amd64), type CertRevocationInfo struct, OidSpecificInfo uintptr pkg syscall (windows-amd64), type CertSimpleChain struct, TrustListInfo uintptr +pkg syscall (windows-amd64), const TOKEN_ALL_ACCESS = 983295 diff --git a/src/syscall/security_windows.go b/src/syscall/security_windows.go index dbaf6d3264..ae8b3a17bf 100644 --- a/src/syscall/security_windows.go +++ b/src/syscall/security_windows.go @@ -221,6 +221,7 @@ const ( TOKEN_ADJUST_PRIVILEGES TOKEN_ADJUST_GROUPS TOKEN_ADJUST_DEFAULT + TOKEN_ADJUST_SESSIONID TOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY | @@ -230,7 +231,8 @@ const ( 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/src/syscall/syscall_windows_test.go b/src/syscall/syscall_windows_test.go index 86842f2ad2..d146911073 100644 --- a/src/syscall/syscall_windows_test.go +++ b/src/syscall/syscall_windows_test.go @@ -70,3 +70,9 @@ func ExampleLoadLibrary() { build := uint16(r >> 16) print("windows version ", major, ".", minor, " (Build ", build, ")\n") } + +func TestTOKEN_ALL_ACCESS(t *testing.T) { + if syscall.TOKEN_ALL_ACCESS != 0xF01FF { + t.Errorf("TOKEN_ALL_ACCESS = %x, want 0xF01FF", syscall.TOKEN_ALL_ACCESS) + } +}