]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: update TOKEN_ALL_ACCESS according to WinNT.h
authorThanabodee Charoenpiriyakij <wingyminus@gmail.com>
Sat, 9 Jun 2018 18:01:27 +0000 (01:01 +0700)
committerAlex Brainman <alex.brainman@gmail.com>
Mon, 11 Jun 2018 00:45:20 +0000 (00:45 +0000)
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 <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
api/except.txt
src/syscall/security_windows.go
src/syscall/syscall_windows_test.go

index 997df042b6509e2b14b617b98abd5cd171caf5ac..b85003eda237a41786b84baf88135899c46a81ea 100644 (file)
@@ -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
index dbaf6d3264b28743e606f7c54c07d11f3c9d8406..ae8b3a17bfb0f77a000726687994b3ab065e6156 100644 (file)
@@ -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 |
index 86842f2ad24c91e0b6e76908096fe0d8a1c11670..d1469110739b7c697ee2ab427359dd30f6618bf3 100644 (file)
@@ -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)
+       }
+}