Elia Battiston | 4750d3c | 2022-07-14 13:24:56 +0000 | [diff] [blame] | 1 | package mstypes |
| 2 | |
| 3 | // Attributes of a security group membership and can be combined by using the bitwise OR operation. |
| 4 | // They are used by an access check mechanism to specify whether the membership is to be used in an access check decision. |
| 5 | const ( |
| 6 | SEGroupMandatory = 31 |
| 7 | SEGroupEnabledByDefault = 30 |
| 8 | SEGroupEnabled = 29 |
| 9 | SEGroupOwner = 28 |
| 10 | SEGroupResource = 2 |
| 11 | //All other bits MUST be set to zero and MUST be ignored on receipt. |
| 12 | ) |
| 13 | |
| 14 | // KerbSidAndAttributes implements https://msdn.microsoft.com/en-us/library/cc237947.aspx |
| 15 | type KerbSidAndAttributes struct { |
| 16 | SID RPCSID `ndr:"pointer"` // A pointer to an RPC_SID structure. |
| 17 | Attributes uint32 |
| 18 | } |
| 19 | |
| 20 | // SetFlag sets a flag in a uint32 attribute value. |
| 21 | func SetFlag(a *uint32, i uint) { |
| 22 | *a = *a | (1 << (31 - i)) |
| 23 | } |