|
@@ -603,12 +603,22 @@ type Tokenprimarygroup struct {
|
|
|
|
|
|
|
|
type Tokengroups struct {
|
|
type Tokengroups struct {
|
|
|
GroupCount uint32
|
|
GroupCount uint32
|
|
|
- Groups [1]SIDAndAttributes
|
|
|
|
|
|
|
+ Groups [1]SIDAndAttributes // Use AllGroups() for iterating.
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// AllGroups returns a slice that can be used to iterate over the groups in g.
|
|
|
|
|
+func (g *Tokengroups) AllGroups() []SIDAndAttributes {
|
|
|
|
|
+ return (*[(1 << 28) - 1]SIDAndAttributes)(unsafe.Pointer(&g.Groups[0]))[:g.GroupCount:g.GroupCount]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type Tokenprivileges struct {
|
|
type Tokenprivileges struct {
|
|
|
PrivilegeCount uint32
|
|
PrivilegeCount uint32
|
|
|
- Privileges [1]LUIDAndAttributes
|
|
|
|
|
|
|
+ Privileges [1]LUIDAndAttributes // Use AllPrivileges() for iterating.
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// AllPrivileges returns a slice that can be used to iterate over the privileges in p.
|
|
|
|
|
+func (p *Tokenprivileges) AllPrivileges() []LUIDAndAttributes {
|
|
|
|
|
+ return (*[(1 << 27) - 1]LUIDAndAttributes)(unsafe.Pointer(&p.Privileges[0]))[:p.PrivilegeCount:p.PrivilegeCount]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type Tokenmandatorylabel struct {
|
|
type Tokenmandatorylabel struct {
|