[sys] windows: update TOKEN_ALL_ACCESS according to WinNT.h

40 views
Skip to first unread message

Thanabodee Charoenpiriyakij (Gerrit)

unread,
Jun 11, 2018, 2:43:34 AM6/11/18
to Ian Lance Taylor, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Thanabodee Charoenpiriyakij has uploaded this change for review.

View Change

windows: update TOKEN_ALL_ACCESS according to WinNT.h

TOKEN_ALL_ACCESS was changed at some stage by Microsoft.

Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
---
M windows/security_windows.go
M windows/syscall_windows_test.go
2 files changed, 9 insertions(+), 1 deletion(-)

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)
+ }
+}

To view, visit change 117815. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
Gerrit-Change-Number: 117815
Gerrit-PatchSet: 1
Gerrit-Owner: Thanabodee Charoenpiriyakij <wingy...@gmail.com>
Gerrit-MessageType: newchange

Thanabodee Charoenpiriyakij (Gerrit)

unread,
Jun 11, 2018, 2:44:03 AM6/11/18
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Thanabodee Charoenpiriyakij uploaded patch set #2 to this change.

View Change

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
---
M windows/security_windows.go
M windows/syscall_windows_test.go
2 files changed, 9 insertions(+), 1 deletion(-)

To view, visit change 117815. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
Gerrit-Change-Number: 117815
Gerrit-PatchSet: 2
Gerrit-Owner: Thanabodee Charoenpiriyakij <wingy...@gmail.com>
Gerrit-MessageType: newpatchset

Tobias Klauser (Gerrit)

unread,
Jun 11, 2018, 3:20:13 AM6/11/18
to Thanabodee Charoenpiriyakij, goph...@pubsubhelper.golang.org, Alex Brainman, golang-co...@googlegroups.com

Thanks

Patch set 2:Run-TryBot +1

View Change

    To view, visit change 117815. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sys
    Gerrit-Branch: master
    Gerrit-Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
    Gerrit-Change-Number: 117815
    Gerrit-PatchSet: 2
    Gerrit-Owner: Thanabodee Charoenpiriyakij <wingy...@gmail.com>
    Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
    Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Comment-Date: Mon, 11 Jun 2018 07:20:09 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Gobot Gobot (Gerrit)

    unread,
    Jun 11, 2018, 3:20:16 AM6/11/18
    to Thanabodee Charoenpiriyakij, goph...@pubsubhelper.golang.org, Alex Brainman, Tobias Klauser, golang-co...@googlegroups.com

    TryBots beginning. Status page: https://farmer.golang.org/try?commit=c0b1d181

    View Change

      To view, visit change 117815. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sys
      Gerrit-Branch: master
      Gerrit-Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
      Gerrit-Change-Number: 117815
      Gerrit-PatchSet: 2
      Gerrit-Owner: Thanabodee Charoenpiriyakij <wingy...@gmail.com>
      Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
      Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
      Gerrit-CC: Gobot Gobot <go...@golang.org>
      Gerrit-Comment-Date: Mon, 11 Jun 2018 07:20:14 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Gobot Gobot (Gerrit)

      unread,
      Jun 11, 2018, 3:22:12 AM6/11/18
      to Thanabodee Charoenpiriyakij, goph...@pubsubhelper.golang.org, Alex Brainman, Tobias Klauser, golang-co...@googlegroups.com

      TryBots are happy.

      Patch set 2:TryBot-Result +1

      View Change

        To view, visit change 117815. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sys
        Gerrit-Branch: master
        Gerrit-Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
        Gerrit-Change-Number: 117815
        Gerrit-PatchSet: 2
        Gerrit-Owner: Thanabodee Charoenpiriyakij <wingy...@gmail.com>
        Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
        Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
        Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
        Gerrit-Comment-Date: Mon, 11 Jun 2018 07:22:10 +0000

        Alex Brainman (Gerrit)

        unread,
        Jun 11, 2018, 4:04:21 AM6/11/18
        to Thanabodee Charoenpiriyakij, goph...@pubsubhelper.golang.org, Gobot Gobot, Tobias Klauser, golang-co...@googlegroups.com

        LGTM

        Thank you again.

        Alex

        Patch set 2:Code-Review +2

        View Change

          To view, visit change 117815. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sys
          Gerrit-Branch: master
          Gerrit-Change-Id: I002200ad4c5188d19ac3c500f571dd13ea1fbafc
          Gerrit-Change-Number: 117815
          Gerrit-PatchSet: 2
          Gerrit-Owner: Thanabodee Charoenpiriyakij <wingy...@gmail.com>
          Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
          Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
          Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
          Gerrit-Comment-Date: Mon, 11 Jun 2018 08:04:17 +0000

          Alex Brainman (Gerrit)

          unread,
          Jun 11, 2018, 4:04:28 AM6/11/18
          to Thanabodee Charoenpiriyakij, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Gobot Gobot, Tobias Klauser, golang-co...@googlegroups.com

          Alex Brainman merged this change.

          View Change

          Approvals: Alex Brainman: Looks good to me, approved Tobias Klauser: Run TryBots Gobot Gobot: TryBots succeeded
          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....@gmail.com>
          TryBot-Result: Gobot Gobot <go...@golang.org>
          Reviewed-by: Alex Brainman <alex.b...@gmail.com>
          Gerrit-PatchSet: 3
          Gerrit-Owner: Thanabodee Charoenpiriyakij <wingy...@gmail.com>
          Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
          Gerrit-Reviewer: Gobot Gobot <go...@golang.org>
          Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
          Gerrit-MessageType: merged
          Reply all
          Reply to author
          Forward
          0 new messages