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>
This commit is contained in:
Thanabodee Charoenpiriyakij 2018-06-11 13:41:57 +07:00 коммит произвёл Alex Brainman
Родитель 24c297a8f3
Коммит bff228c7b6
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -296,6 +296,7 @@ const (
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 @@ 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 |

Просмотреть файл

@ -105,3 +105,9 @@ func ExampleLoadLibrary() {
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)
}
}