blob: 61ac39bbf36fb10e8558450f81e61192673c843b [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001package 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.
5const (
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
15type 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.
21func SetFlag(a *uint32, i uint) {
22 *a = *a | (1 << (31 - i))
23}