structures
import "github.com/TheManticoreProject/Manticore/network/dcerpc/interfaces/12345778-1234-abcd-ef00-0123456789ac/1.0/structures"
Index
- type ALIAS_INFORMATION_CLASS
- type DOMAIN_DISPLAY_INFORMATION
- type DOMAIN_INFORMATION_CLASS
- type DOMAIN_LOGOFF_INFORMATION
- type DOMAIN_MODIFIED_INFORMATION
- type DOMAIN_MODIFIED_INFORMATION2
- type DOMAIN_PASSWORD_INFORMATION
- type DOMAIN_SERVER_ENABLE_STATE
- type DOMAIN_SERVER_ROLE
- type DOMAIN_SERVER_ROLE_INFORMATION
- type DOMAIN_STATE_INFORMATION
- type ENCRYPTED_LM_OWF_PASSWORD
- type ENCRYPTED_NT_OWF_PASSWORD
- type GROUP_ATTRIBUTE_INFORMATION
- type GROUP_INFORMATION_CLASS
- type GROUP_MEMBERSHIP
- type OLD_LARGE_INTEGER
- type PASSWORD_POLICY_VALIDATION_TYPE
- type RPC_SHORT_BLOB
- type RPC_STRING
- type SAMPR_ALIAS_ADM_COMMENT_INFORMATION
- type SAMPR_ALIAS_GENERAL_INFORMATION
- type SAMPR_ALIAS_INFO_BUFFER
- type SAMPR_ALIAS_NAME_INFORMATION
- type SAMPR_DISPLAY_INFO_BUFFER
- type SAMPR_DOMAIN_DISPLAY_GROUP
- type SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER
- type SAMPR_DOMAIN_DISPLAY_MACHINE
- type SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER
- type SAMPR_DOMAIN_DISPLAY_OEM_GROUP
- type SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER
- type SAMPR_DOMAIN_DISPLAY_OEM_USER
- type SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER
- type SAMPR_DOMAIN_DISPLAY_USER
- type SAMPR_DOMAIN_DISPLAY_USER_BUFFER
- type SAMPR_DOMAIN_GENERAL_INFORMATION
- type SAMPR_DOMAIN_GENERAL_INFORMATION2
- type SAMPR_DOMAIN_INFO_BUFFER
- type SAMPR_DOMAIN_LOCKOUT_INFORMATION
- type SAMPR_DOMAIN_NAME_INFORMATION
- type SAMPR_DOMAIN_OEM_INFORMATION
- type SAMPR_DOMAIN_REPLICATION_INFORMATION
- type SAMPR_ENCRYPTED_PASSWORD_AES
- type SAMPR_ENCRYPTED_USER_PASSWORD
- type SAMPR_ENCRYPTED_USER_PASSWORD_NEW
- type SAMPR_ENUMERATION_BUFFER
- type SAMPR_GET_GROUPS_BUFFER
- type SAMPR_GET_MEMBERS_BUFFER
- type SAMPR_GROUP_ADM_COMMENT_INFORMATION
- type SAMPR_GROUP_GENERAL_INFORMATION
- type SAMPR_GROUP_INFO_BUFFER
- type SAMPR_GROUP_NAME_INFORMATION
- type SAMPR_HANDLE
- type SAMPR_LOGON_HOURS
- type SAMPR_PSID_ARRAY
- type SAMPR_PSID_ARRAY_OUT
- type SAMPR_RETURNED_USTRING_ARRAY
- type SAMPR_REVISION_INFO
- type SAMPR_REVISION_INFO_V1
- type SAMPR_RID_ENUMERATION
- type SAMPR_SID_INFORMATION
- type SAMPR_SR_SECURITY_DESCRIPTOR
- type SAMPR_ULONG_ARRAY
- type SAMPR_USER_ACCOUNT_INFORMATION
- type SAMPR_USER_ADMIN_COMMENT_INFORMATION
- type SAMPR_USER_ALL_INFORMATION
- type SAMPR_USER_A_NAME_INFORMATION
- type SAMPR_USER_F_NAME_INFORMATION
- type SAMPR_USER_GENERAL_INFORMATION
- type SAMPR_USER_HOME_INFORMATION
- type SAMPR_USER_INFO_BUFFER
- type SAMPR_USER_INTERNAL1_INFORMATION
- type SAMPR_USER_INTERNAL4_INFORMATION
- type SAMPR_USER_INTERNAL4_INFORMATION_NEW
- type SAMPR_USER_INTERNAL5_INFORMATION
- type SAMPR_USER_INTERNAL5_INFORMATION_NEW
- type SAMPR_USER_INTERNAL7_INFORMATION
- type SAMPR_USER_INTERNAL8_INFORMATION
- type SAMPR_USER_LOGON_HOURS_INFORMATION
- type SAMPR_USER_LOGON_INFORMATION
- type SAMPR_USER_NAME_INFORMATION
- type SAMPR_USER_PARAMETERS_INFORMATION
- type SAMPR_USER_PASSWORD
- type SAMPR_USER_PASSWORD_NEW
- type SAMPR_USER_PREFERENCES_INFORMATION
- type SAMPR_USER_PROFILE_INFORMATION
- type SAMPR_USER_SCRIPT_INFORMATION
- type SAMPR_USER_WORKSTATIONS_INFORMATION
- type SAM_VALIDATE_AUTHENTICATION_INPUT_ARG
- type SAM_VALIDATE_INPUT_ARG
- type SAM_VALIDATE_OUTPUT_ARG
- type SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
- type SAM_VALIDATE_PASSWORD_HASH
- type SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG
- type SAM_VALIDATE_PERSISTED_FIELDS
- type SAM_VALIDATE_STANDARD_OUTPUT_ARG
- type SAM_VALIDATE_VALIDATION_STATUS
- type SID_NAME_USE
- type USER_CONTROL_INFORMATION
- type USER_DOMAIN_PASSWORD_INFORMATION
- type USER_EXPIRES_INFORMATION
- type USER_INFORMATION_CLASS
- type USER_PRIMARY_GROUP_INFORMATION
type ALIAS\_INFORMATION\_CLASS
ALIAS_INFORMATION_CLASS enumerates the alias information classes that select the arm of SAMPR_ALIAS_INFO_BUFFER ([MS-SAMR] 2.2.6.5). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6).
type ALIAS_INFORMATION_CLASS uint16
const (
AliasGeneralInformation ALIAS_INFORMATION_CLASS = 1
AliasNameInformation ALIAS_INFORMATION_CLASS = 2
AliasAdminCommentInformation ALIAS_INFORMATION_CLASS = 3
)
type DOMAIN\_DISPLAY\_INFORMATION
DOMAIN_DISPLAY_INFORMATION enumerates the display information classes for the SAMPR_DISPLAY_INFO_BUFFER union ([MS-SAMR] 2.2.8.1). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6).
type DOMAIN_DISPLAY_INFORMATION uint16
const (
DomainDisplayUser DOMAIN_DISPLAY_INFORMATION = 1
DomainDisplayMachine DOMAIN_DISPLAY_INFORMATION = 2
DomainDisplayGroup DOMAIN_DISPLAY_INFORMATION = 3
DomainDisplayOemUser DOMAIN_DISPLAY_INFORMATION = 4
DomainDisplayOemGroup DOMAIN_DISPLAY_INFORMATION = 5
)
type DOMAIN\_INFORMATION\_CLASS
DOMAIN_INFORMATION_CLASS enumerates the domain information classes for the SAMPR_DOMAIN_INFO_BUFFER union ([MS-SAMR] 2.2.4.16). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6). The IDL skips the value 10.
type DOMAIN_INFORMATION_CLASS uint16
const (
DomainPasswordInformation DOMAIN_INFORMATION_CLASS = 1
DomainGeneralInformation DOMAIN_INFORMATION_CLASS = 2
DomainLogoffInformation DOMAIN_INFORMATION_CLASS = 3
DomainOemInformation DOMAIN_INFORMATION_CLASS = 4
DomainNameInformation DOMAIN_INFORMATION_CLASS = 5
DomainReplicationInformation DOMAIN_INFORMATION_CLASS = 6
DomainServerRoleInformation DOMAIN_INFORMATION_CLASS = 7
DomainModifiedInformation DOMAIN_INFORMATION_CLASS = 8
DomainStateInformation DOMAIN_INFORMATION_CLASS = 9
DomainGeneralInformation2 DOMAIN_INFORMATION_CLASS = 11
DomainLockoutInformation DOMAIN_INFORMATION_CLASS = 12
DomainModifiedInformation2 DOMAIN_INFORMATION_CLASS = 13
)
type DOMAIN\_LOGOFF\_INFORMATION
DOMAIN_LOGOFF_INFORMATION holds the forced-logoff time for a domain ([MS-SAMR] 2.2.4.6). ForceLogoff is an OLD_LARGE_INTEGER defined by the base family.
type DOMAIN_LOGOFF_INFORMATION struct {
ForceLogoff OLD_LARGE_INTEGER
}
type DOMAIN\_MODIFIED\_INFORMATION
DOMAIN_MODIFIED_INFORMATION holds the domain modification count and creation time ([MS-SAMR] 2.2.4.7). Both fields are OLD_LARGE_INTEGER values defined by the base family.
type DOMAIN_MODIFIED_INFORMATION struct {
DomainModifiedCount OLD_LARGE_INTEGER
CreationTime OLD_LARGE_INTEGER
}
type DOMAIN\_MODIFIED\_INFORMATION2
DOMAIN_MODIFIED_INFORMATION2 extends DOMAIN_MODIFIED_INFORMATION with the modified count at the last promotion ([MS-SAMR] 2.2.4.8). All fields are OLD_LARGE_INTEGER values defined by the base family.
type DOMAIN_MODIFIED_INFORMATION2 struct {
DomainModifiedCount OLD_LARGE_INTEGER
CreationTime OLD_LARGE_INTEGER
ModifiedCountAtLastPromotion OLD_LARGE_INTEGER
}
type DOMAIN\_PASSWORD\_INFORMATION
DOMAIN_PASSWORD_INFORMATION contains a domain’s password policy ([MS-SAMR] 2.2.4.5). MaxPasswordAge and MinPasswordAge are OLD_LARGE_INTEGER values defined by the base family.
type DOMAIN_PASSWORD_INFORMATION struct {
MinPasswordLength uint16
PasswordHistoryLength uint16
PasswordProperties ndr.DWORD
MaxPasswordAge OLD_LARGE_INTEGER
MinPasswordAge OLD_LARGE_INTEGER
}
type DOMAIN\_SERVER\_ENABLE\_STATE
DOMAIN_SERVER_ENABLE_STATE indicates whether a server is enabled or disabled ([MS-SAMR] 2.2.4.1). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6).
type DOMAIN_SERVER_ENABLE_STATE uint16
const (
DomainServerEnabled DOMAIN_SERVER_ENABLE_STATE = 1
DomainServerDisabled DOMAIN_SERVER_ENABLE_STATE = 2
)
type DOMAIN\_SERVER\_ROLE
DOMAIN_SERVER_ROLE indicates the role of a server: backup (replica) or primary ([MS-SAMR] 2.2.4.3). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6).
type DOMAIN_SERVER_ROLE uint16
const (
DomainServerRoleBackup DOMAIN_SERVER_ROLE = 2
DomainServerRolePrimary DOMAIN_SERVER_ROLE = 3
)
type DOMAIN\_SERVER\_ROLE\_INFORMATION
DOMAIN_SERVER_ROLE_INFORMATION holds the role (backup or primary) of a server ([MS-SAMR] 2.2.4.4).
type DOMAIN_SERVER_ROLE_INFORMATION struct {
DomainServerRole DOMAIN_SERVER_ROLE `ndr:"enum"`
}
type DOMAIN\_STATE\_INFORMATION
DOMAIN_STATE_INFORMATION holds the enabled/disabled state of a domain ([MS-SAMR] 2.2.4.2).
type DOMAIN_STATE_INFORMATION struct {
DomainServerState DOMAIN_SERVER_ENABLE_STATE `ndr:"enum"`
}
type ENCRYPTED\_LM\_OWF\_PASSWORD
ENCRYPTED_LM_OWF_PASSWORD holds an encrypted LM (or NT) one-way function of a cleartext password ([MS-SAMR] 2.2.7.3). The IDL declares both the LM and NT names for this same 16-byte structure.
type ENCRYPTED_LM_OWF_PASSWORD struct {
Data [16]byte
}
type ENCRYPTED\_NT\_OWF\_PASSWORD
ENCRYPTED_NT_OWF_PASSWORD is an alias for ENCRYPTED_LM_OWF_PASSWORD; the IDL gives the same 16-byte structure both names ([MS-SAMR] 2.2.7.3).
type ENCRYPTED_NT_OWF_PASSWORD = ENCRYPTED_LM_OWF_PASSWORD
type GROUP\_ATTRIBUTE\_INFORMATION
GROUP_ATTRIBUTE_INFORMATION contains group fields ([MS-SAMR] 2.2.5.4). It carries the attributes (a set of SE_GROUP flags) of a group.
type GROUP_ATTRIBUTE_INFORMATION struct {
Attributes ndr.DWORD
}
type GROUP\_INFORMATION\_CLASS
GROUP_INFORMATION_CLASS enumerates the group information classes that select the arm of SAMPR_GROUP_INFO_BUFFER ([MS-SAMR] 2.2.5.8). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6).
type GROUP_INFORMATION_CLASS uint16
const (
GroupGeneralInformation GROUP_INFORMATION_CLASS = 1
GroupNameInformation GROUP_INFORMATION_CLASS = 2
GroupAttributeInformation GROUP_INFORMATION_CLASS = 3
GroupAdminCommentInformation GROUP_INFORMATION_CLASS = 4
GroupReplicationInformation GROUP_INFORMATION_CLASS = 5
)
type GROUP\_MEMBERSHIP
GROUP_MEMBERSHIP pairs a group relative ID with its attributes ([MS-SAMR] 2.2.3.6).
type GROUP_MEMBERSHIP struct {
RelativeId ndr.DWORD
Attributes ndr.DWORD
}
type OLD\_LARGE\_INTEGER
OLD_LARGE_INTEGER is a 64-bit value split into low and high parts ([MS-SAMR] 2.2.2.1).
type OLD_LARGE_INTEGER struct {
LowPart ndr.DWORD
HighPart int32
}
type PASSWORD\_POLICY\_VALIDATION\_TYPE
PASSWORD_POLICY_VALIDATION_TYPE indicates the type of password validation being requested ([MS-SAMR] 2.2.9.1). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6) and serves as the discriminant for the SAM_VALIDATE_INPUT_ARG and SAM_VALIDATE_OUTPUT_ARG unions.
type PASSWORD_POLICY_VALIDATION_TYPE uint16
const (
SamValidateAuthentication PASSWORD_POLICY_VALIDATION_TYPE = 1
SamValidatePasswordChange PASSWORD_POLICY_VALIDATION_TYPE = 2
SamValidatePasswordReset PASSWORD_POLICY_VALIDATION_TYPE = 3
)
type RPC\_SHORT\_BLOB
RPC_SHORT_BLOB is a counted array of unsigned short values ([MS-SAMR] 2.2.3.11). Length and MaximumLength are byte counts; Buffer is a unique pointer to a conformant-varying array of unsigned shorts.
type RPC_SHORT_BLOB struct {
Length uint16
MaximumLength uint16
Buffer []uint16 `ndr:"unique,varying"`
}
type RPC\_STRING
RPC_STRING is a counted ASCII string ([MS-SAMR] 2.2.3.10). Length and MaximumLength are byte counts; Buffer is a unique pointer to a conformant-varying array of chars.
type RPC_STRING struct {
Length uint16
MaximumLength uint16
Buffer []byte `ndr:"unique,varying"`
}
type SAMPR\_ALIAS\_ADM\_COMMENT\_INFORMATION
SAMPR_ALIAS_ADM_COMMENT_INFORMATION contains alias fields ([MS-SAMR] 2.2.6.4). It holds the alias’s administrative comment.
type SAMPR_ALIAS_ADM_COMMENT_INFORMATION struct {
AdminComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_ALIAS\_GENERAL\_INFORMATION
SAMPR_ALIAS_GENERAL_INFORMATION contains alias fields ([MS-SAMR] 2.2.6.2). It holds the alias’s name, member count, and administrative comment.
type SAMPR_ALIAS_GENERAL_INFORMATION struct {
Name dtyp.RPC_UNICODE_STRING
MemberCount ndr.DWORD
AdminComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_ALIAS\_INFO\_BUFFER
SAMPR_ALIAS_INFO_BUFFER is the discriminated union of alias information classes ([MS-SAMR] 2.2.6.6). The discriminant is an ALIAS_INFORMATION_CLASS; the wire form is the discriminant followed by the single selected arm ([C706] section 14.3.8).
type SAMPR_ALIAS_INFO_BUFFER struct {
Tag ALIAS_INFORMATION_CLASS `ndr:"switch,enum"`
General SAMPR_ALIAS_GENERAL_INFORMATION `ndr:"case=1"`
Name SAMPR_ALIAS_NAME_INFORMATION `ndr:"case=2"`
AdminComment SAMPR_ALIAS_ADM_COMMENT_INFORMATION `ndr:"case=3"`
}
type SAMPR\_ALIAS\_NAME\_INFORMATION
SAMPR_ALIAS_NAME_INFORMATION contains alias fields ([MS-SAMR] 2.2.6.3). It holds the alias’s name.
type SAMPR_ALIAS_NAME_INFORMATION struct {
Name dtyp.RPC_UNICODE_STRING
}
type SAMPR\_DISPLAY\_INFO\_BUFFER
SAMPR_DISPLAY_INFO_BUFFER is the discriminated union of domain display information classes ([MS-SAMR] 2.2.8.12). The discriminant Tag is a DOMAIN_DISPLAY_INFORMATION; the wire form is the discriminant followed by the single selected arm ([C706] section 14.3.8). The numeric case values follow the DOMAIN_DISPLAY_INFORMATION enum.
type SAMPR_DISPLAY_INFO_BUFFER struct {
Tag DOMAIN_DISPLAY_INFORMATION `ndr:"switch,enum"`
UserInformation SAMPR_DOMAIN_DISPLAY_USER_BUFFER `ndr:"case=1"`
MachineInformation SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER `ndr:"case=2"`
GroupInformation SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER `ndr:"case=3"`
OemUserInformation SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER `ndr:"case=4"`
OemGroupInformation SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER `ndr:"case=5"`
}
type SAMPR\_DOMAIN\_DISPLAY\_GROUP
SAMPR_DOMAIN_DISPLAY_GROUP holds a single group entry returned by a display query ([MS-SAMR] 2.2.8.4).
type SAMPR_DOMAIN_DISPLAY_GROUP struct {
Index ndr.DWORD
Rid ndr.DWORD
Attributes ndr.DWORD
AccountName dtyp.RPC_UNICODE_STRING
AdminComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_DOMAIN\_DISPLAY\_GROUP\_BUFFER
SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER is the result buffer of a group display query ([MS-SAMR] 2.2.8.9). Buffer is a unique pointer to a conformant array sized by EntriesRead.
type SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER struct {
EntriesRead ndr.DWORD
Buffer []SAMPR_DOMAIN_DISPLAY_GROUP `ndr:"unique,size_is=EntriesRead"`
}
type SAMPR\_DOMAIN\_DISPLAY\_MACHINE
SAMPR_DOMAIN_DISPLAY_MACHINE holds a single machine entry returned by a display query ([MS-SAMR] 2.2.8.3).
type SAMPR_DOMAIN_DISPLAY_MACHINE struct {
Index ndr.DWORD
Rid ndr.DWORD
AccountControl ndr.DWORD
AccountName dtyp.RPC_UNICODE_STRING
AdminComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_DOMAIN\_DISPLAY\_MACHINE\_BUFFER
SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER is the result buffer of a machine display query ([MS-SAMR] 2.2.8.8). Buffer is a unique pointer to a conformant array sized by EntriesRead.
type SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER struct {
EntriesRead ndr.DWORD
Buffer []SAMPR_DOMAIN_DISPLAY_MACHINE `ndr:"unique,size_is=EntriesRead"`
}
type SAMPR\_DOMAIN\_DISPLAY\_OEM\_GROUP
SAMPR_DOMAIN_DISPLAY_OEM_GROUP holds a single OEM (ASCII) group entry returned by a display query ([MS-SAMR] 2.2.8.6). OemAccountName is an RPC_STRING defined by the base family.
type SAMPR_DOMAIN_DISPLAY_OEM_GROUP struct {
Index ndr.DWORD
OemAccountName RPC_STRING
}
type SAMPR\_DOMAIN\_DISPLAY\_OEM\_GROUP\_BUFFER
SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER is the result buffer of an OEM (ASCII) group display query ([MS-SAMR] 2.2.8.11). Buffer is a unique pointer to a conformant array sized by EntriesRead.
type SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER struct {
EntriesRead ndr.DWORD
Buffer []SAMPR_DOMAIN_DISPLAY_OEM_GROUP `ndr:"unique,size_is=EntriesRead"`
}
type SAMPR\_DOMAIN\_DISPLAY\_OEM\_USER
SAMPR_DOMAIN_DISPLAY_OEM_USER holds a single OEM (ASCII) user entry returned by a display query ([MS-SAMR] 2.2.8.5). OemAccountName is an RPC_STRING defined by the base family.
type SAMPR_DOMAIN_DISPLAY_OEM_USER struct {
Index ndr.DWORD
OemAccountName RPC_STRING
}
type SAMPR\_DOMAIN\_DISPLAY\_OEM\_USER\_BUFFER
SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER is the result buffer of an OEM (ASCII) user display query ([MS-SAMR] 2.2.8.10). Buffer is a unique pointer to a conformant array sized by EntriesRead.
type SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER struct {
EntriesRead ndr.DWORD
Buffer []SAMPR_DOMAIN_DISPLAY_OEM_USER `ndr:"unique,size_is=EntriesRead"`
}
type SAMPR\_DOMAIN\_DISPLAY\_USER
SAMPR_DOMAIN_DISPLAY_USER holds a single user entry returned by a display query ([MS-SAMR] 2.2.8.2).
type SAMPR_DOMAIN_DISPLAY_USER struct {
Index ndr.DWORD
Rid ndr.DWORD
AccountControl ndr.DWORD
AccountName dtyp.RPC_UNICODE_STRING
AdminComment dtyp.RPC_UNICODE_STRING
FullName dtyp.RPC_UNICODE_STRING
}
type SAMPR\_DOMAIN\_DISPLAY\_USER\_BUFFER
SAMPR_DOMAIN_DISPLAY_USER_BUFFER is the result buffer of a user display query ([MS-SAMR] 2.2.8.7). Buffer is a unique pointer to a conformant array sized by EntriesRead.
type SAMPR_DOMAIN_DISPLAY_USER_BUFFER struct {
EntriesRead ndr.DWORD
Buffer []SAMPR_DOMAIN_DISPLAY_USER `ndr:"unique,size_is=EntriesRead"`
}
type SAMPR\_DOMAIN\_GENERAL\_INFORMATION
SAMPR_DOMAIN_GENERAL_INFORMATION contains general per-domain attributes ([MS-SAMR] 2.2.4.9). DomainServerState and DomainServerRole are transmitted as unsigned long per the IDL (not as the enum types), and ForceLogoff and DomainModifiedCount are OLD_LARGE_INTEGER values defined by the base family.
type SAMPR_DOMAIN_GENERAL_INFORMATION struct {
ForceLogoff OLD_LARGE_INTEGER
OemInformation dtyp.RPC_UNICODE_STRING
DomainName dtyp.RPC_UNICODE_STRING
ReplicaSourceNodeName dtyp.RPC_UNICODE_STRING
DomainModifiedCount OLD_LARGE_INTEGER
DomainServerState ndr.DWORD
DomainServerRole ndr.DWORD
UasCompatibilityRequired uint8
UserCount ndr.DWORD
GroupCount ndr.DWORD
AliasCount ndr.DWORD
}
type SAMPR\_DOMAIN\_GENERAL\_INFORMATION2
SAMPR_DOMAIN_GENERAL_INFORMATION2 extends SAMPR_DOMAIN_GENERAL_INFORMATION with account-lockout policy ([MS-SAMR] 2.2.4.10). LockoutDuration and LockoutObservationWindow are LARGE_INTEGER values from [MS-DTYP].
type SAMPR_DOMAIN_GENERAL_INFORMATION2 struct {
I1 SAMPR_DOMAIN_GENERAL_INFORMATION
LockoutDuration dtyp.LARGE_INTEGER
LockoutObservationWindow dtyp.LARGE_INTEGER
LockoutThreshold uint16
}
type SAMPR\_DOMAIN\_INFO\_BUFFER
SAMPR_DOMAIN_INFO_BUFFER is the discriminated union of domain information classes ([MS-SAMR] 2.2.4.17). The discriminant Tag is a DOMAIN_INFORMATION_CLASS; the wire form is the discriminant followed by the single selected arm ([C706] section 14.3.8). The numeric case values follow the DOMAIN_INFORMATION_CLASS enum.
type SAMPR_DOMAIN_INFO_BUFFER struct {
Tag DOMAIN_INFORMATION_CLASS `ndr:"switch,enum"`
Password DOMAIN_PASSWORD_INFORMATION `ndr:"case=1"`
General SAMPR_DOMAIN_GENERAL_INFORMATION `ndr:"case=2"`
Logoff DOMAIN_LOGOFF_INFORMATION `ndr:"case=3"`
Oem SAMPR_DOMAIN_OEM_INFORMATION `ndr:"case=4"`
Name SAMPR_DOMAIN_NAME_INFORMATION `ndr:"case=5"`
Replication SAMPR_DOMAIN_REPLICATION_INFORMATION `ndr:"case=6"`
Role DOMAIN_SERVER_ROLE_INFORMATION `ndr:"case=7"`
Modified DOMAIN_MODIFIED_INFORMATION `ndr:"case=8"`
State DOMAIN_STATE_INFORMATION `ndr:"case=9"`
General2 SAMPR_DOMAIN_GENERAL_INFORMATION2 `ndr:"case=11"`
Lockout SAMPR_DOMAIN_LOCKOUT_INFORMATION `ndr:"case=12"`
Modified2 DOMAIN_MODIFIED_INFORMATION2 `ndr:"case=13"`
}
type SAMPR\_DOMAIN\_LOCKOUT\_INFORMATION
SAMPR_DOMAIN_LOCKOUT_INFORMATION contains a domain’s account-lockout policy ([MS-SAMR] 2.2.4.14). LockoutDuration and LockoutObservationWindow are LARGE_INTEGER values from [MS-DTYP].
type SAMPR_DOMAIN_LOCKOUT_INFORMATION struct {
LockoutDuration dtyp.LARGE_INTEGER
LockoutObservationWindow dtyp.LARGE_INTEGER
LockoutThreshold uint16
}
type SAMPR\_DOMAIN\_NAME\_INFORMATION
SAMPR_DOMAIN_NAME_INFORMATION contains the name of a domain ([MS-SAMR] 2.2.4.12).
type SAMPR_DOMAIN_NAME_INFORMATION struct {
DomainName dtyp.RPC_UNICODE_STRING
}
type SAMPR\_DOMAIN\_OEM\_INFORMATION
SAMPR_DOMAIN_OEM_INFORMATION contains the OEM-defined comment string for a domain ([MS-SAMR] 2.2.4.11).
type SAMPR_DOMAIN_OEM_INFORMATION struct {
OemInformation dtyp.RPC_UNICODE_STRING
}
type SAMPR\_DOMAIN\_REPLICATION\_INFORMATION
SAMPR_DOMAIN_REPLICATION_INFORMATION contains the replica source node name for a domain ([MS-SAMR] 2.2.4.13).
type SAMPR_DOMAIN_REPLICATION_INFORMATION struct {
ReplicaSourceNodeName dtyp.RPC_UNICODE_STRING
}
type SAMPR\_ENCRYPTED\_PASSWORD\_AES
SAMPR_ENCRYPTED_PASSWORD_AES carries an AES-encrypted password along with the authentication data, salt, and key-derivation parameters ([MS-SAMR] 2.2.6.32). Cipher is a unique pointer to a conformant array of CbCipher bytes.
type SAMPR_ENCRYPTED_PASSWORD_AES struct {
AuthData [64]byte
Salt [16]byte
CbCipher ndr.DWORD
Cipher []byte `ndr:"unique,size_is=CbCipher"`
PBKDF2Iterations uint64
}
type SAMPR\_ENCRYPTED\_USER\_PASSWORD
SAMPR_ENCRYPTED_USER_PASSWORD carries an encrypted SAMPR_USER_PASSWORD ([MS-SAMR] 2.2.6.21). Buffer is a fixed (256*2)+4 = 516-byte array.
type SAMPR_ENCRYPTED_USER_PASSWORD struct {
Buffer [516]byte
}
type SAMPR\_ENCRYPTED\_USER\_PASSWORD\_NEW
SAMPR_ENCRYPTED_USER_PASSWORD_NEW carries an encrypted SAMPR_USER_PASSWORD_NEW ([MS-SAMR] 2.2.6.22). Buffer is a fixed (256*2)+4+16 = 532-byte array.
type SAMPR_ENCRYPTED_USER_PASSWORD_NEW struct {
Buffer [532]byte
}
type SAMPR\_ENUMERATION\_BUFFER
SAMPR_ENUMERATION_BUFFER holds the result of an enumeration ([MS-SAMR] 2.2.3.5). Buffer is a unique pointer to a conformant array of SAMPR_RID_ENUMERATION sized by EntriesRead.
type SAMPR_ENUMERATION_BUFFER struct {
EntriesRead ndr.DWORD
Buffer []SAMPR_RID_ENUMERATION `ndr:"unique,size_is=EntriesRead"`
}
type SAMPR\_GET\_GROUPS\_BUFFER
SAMPR_GET_GROUPS_BUFFER holds the groups a user belongs to ([MS-SAMR] 2.2.7.10). Groups is a unique pointer to a conformant array of GROUP_MEMBERSHIP sized by MembershipCount.
type SAMPR_GET_GROUPS_BUFFER struct {
MembershipCount ndr.DWORD
Groups []GROUP_MEMBERSHIP `ndr:"unique,size_is=MembershipCount"`
}
type SAMPR\_GET\_MEMBERS\_BUFFER
SAMPR_GET_MEMBERS_BUFFER holds the members of a group ([MS-SAMR] 2.2.7.11). Members and Attributes are unique pointers to conformant arrays, each sized by MemberCount.
type SAMPR_GET_MEMBERS_BUFFER struct {
MemberCount ndr.DWORD
Members []ndr.DWORD `ndr:"unique,size_is=MemberCount"`
Attributes []ndr.DWORD `ndr:"unique,size_is=MemberCount"`
}
type SAMPR\_GROUP\_ADM\_COMMENT\_INFORMATION
SAMPR_GROUP_ADM_COMMENT_INFORMATION contains group fields ([MS-SAMR] 2.2.5.7). It holds the group’s administrative comment.
type SAMPR_GROUP_ADM_COMMENT_INFORMATION struct {
AdminComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_GROUP\_GENERAL\_INFORMATION
SAMPR_GROUP_GENERAL_INFORMATION contains group fields ([MS-SAMR] 2.2.5.5). It holds the group’s name, attributes, member count, and administrative comment.
type SAMPR_GROUP_GENERAL_INFORMATION struct {
Name dtyp.RPC_UNICODE_STRING
Attributes ndr.DWORD
MemberCount ndr.DWORD
AdminComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_GROUP\_INFO\_BUFFER
SAMPR_GROUP_INFO_BUFFER is the discriminated union of group information classes ([MS-SAMR] 2.2.5.9). The discriminant is a GROUP_INFORMATION_CLASS; the wire form is the discriminant followed by the single selected arm ([C706] section 14.3.8).
The DoNotUse arm (case GroupReplicationInformation=5) reuses the SAMPR_GROUP_GENERAL_INFORMATION type, as specified in the IDL.
type SAMPR_GROUP_INFO_BUFFER struct {
Tag GROUP_INFORMATION_CLASS `ndr:"switch,enum"`
General SAMPR_GROUP_GENERAL_INFORMATION `ndr:"case=1"`
Name SAMPR_GROUP_NAME_INFORMATION `ndr:"case=2"`
Attribute GROUP_ATTRIBUTE_INFORMATION `ndr:"case=3"`
AdminComment SAMPR_GROUP_ADM_COMMENT_INFORMATION `ndr:"case=4"`
DoNotUse SAMPR_GROUP_GENERAL_INFORMATION `ndr:"case=5"`
}
type SAMPR\_GROUP\_NAME\_INFORMATION
SAMPR_GROUP_NAME_INFORMATION contains group fields ([MS-SAMR] 2.2.5.6). It holds the group’s name.
type SAMPR_GROUP_NAME_INFORMATION struct {
Name dtyp.RPC_UNICODE_STRING
}
type SAMPR\_HANDLE
SAMPR_HANDLE is an RPC context handle ([MS-SAMR] 2.2.3.2): a 4-byte attributes field followed by a 16-byte GUID, 20 bytes total ([MS-RPCE] 2.3.2.2).
type SAMPR_HANDLE [20]byte
func (SAMPR_HANDLE) IsZero
func (h SAMPR_HANDLE) IsZero() bool
IsZero reports whether the handle is all zeros (for example, after a successful SamrCloseHandle).
type SAMPR\_LOGON\_HOURS
SAMPR_LOGON_HOURS holds a bit map of allowed logon hours ([MS-SAMR] 2.2.6.5).
The IDL declares LogonHours as [size_is(1260), length_is((UnitsPerWeek+7)/8)] unsigned char*, i.e. a unique pointer to a conformant-varying byte array. It is modeled here as unique,varying because the codec derives both the maximum and actual counts from the slice length, which decodes correctly. The literal maximum of 1260 bytes from the IDL is NOT enforced by this model; callers must keep LogonHours within that bound.
type SAMPR_LOGON_HOURS struct {
UnitsPerWeek uint16
LogonHours []byte `ndr:"unique,varying"`
}
type SAMPR\_PSID\_ARRAY
SAMPR_PSID_ARRAY is a counted array of SID pointers ([MS-SAMR] 2.2.7.5). Sids is a unique pointer to a conformant array of SAMPR_SID_INFORMATION sized by Count.
type SAMPR_PSID_ARRAY struct {
Count ndr.DWORD
Sids []SAMPR_SID_INFORMATION `ndr:"unique,size_is=Count"`
}
type SAMPR\_PSID\_ARRAY\_OUT
SAMPR_PSID_ARRAY_OUT is a counted array of SID pointers used as an [out] parameter ([MS-SAMR] 2.2.7.6). Sids is a unique pointer to a conformant array of SAMPR_SID_INFORMATION sized by Count.
type SAMPR_PSID_ARRAY_OUT struct {
Count ndr.DWORD
Sids []SAMPR_SID_INFORMATION `ndr:"unique,size_is=Count"`
}
type SAMPR\_RETURNED\_USTRING\_ARRAY
SAMPR_RETURNED_USTRING_ARRAY is a counted array of RPC_UNICODE_STRING values ([MS-SAMR] 2.2.3.9). Element is a unique pointer to a conformant array sized by Count.
type SAMPR_RETURNED_USTRING_ARRAY struct {
Count ndr.DWORD
Element []dtyp.RPC_UNICODE_STRING `ndr:"unique,size_is=Count"`
}
type SAMPR\_REVISION\_INFO
SAMPR_REVISION_INFO is a switch_type(unsigned long) union with a single defined arm ([MS-SAMR] 2.2.7.14). Tag is the discriminant carried inline.
type SAMPR_REVISION_INFO struct {
Tag ndr.DWORD `ndr:"switch"`
V1 SAMPR_REVISION_INFO_V1 `ndr:"case=1"`
}
type SAMPR\_REVISION\_INFO\_V1
SAMPR_REVISION_INFO_V1 carries the client/server revision and supported feature flags ([MS-SAMR] 2.2.7.13).
type SAMPR_REVISION_INFO_V1 struct {
Revision ndr.DWORD
SupportedFeatures ndr.DWORD
}
type SAMPR\_RID\_ENUMERATION
SAMPR_RID_ENUMERATION pairs a relative ID with the principal’s name ([MS-SAMR] 2.2.3.4).
type SAMPR_RID_ENUMERATION struct {
RelativeId ndr.DWORD
Name dtyp.RPC_UNICODE_STRING
}
type SAMPR\_SID\_INFORMATION
SAMPR_SID_INFORMATION holds a single SID pointer ([MS-SAMR] 2.2.7.4). SidPointer is a unique pointer to an RPC_SID.
type SAMPR_SID_INFORMATION struct {
SidPointer *dtyp.RPC_SID `ndr:"unique"`
}
type SAMPR\_SR\_SECURITY\_DESCRIPTOR
SAMPR_SR_SECURITY_DESCRIPTOR holds a self-relative security descriptor ([MS-SAMR] 2.2.3.12). SecurityDescriptor is a unique pointer to a conformant array of bytes sized by Length.
type SAMPR_SR_SECURITY_DESCRIPTOR struct {
Length ndr.DWORD
SecurityDescriptor []byte `ndr:"unique,size_is=Length"`
}
type SAMPR\_ULONG\_ARRAY
SAMPR_ULONG_ARRAY is a counted array of unsigned longs ([MS-SAMR] 2.2.3.8). Element is a unique pointer to a conformant array sized by Count.
type SAMPR_ULONG_ARRAY struct {
Count ndr.DWORD
Element []ndr.DWORD `ndr:"unique,size_is=Count"`
}
type SAMPR\_USER\_ACCOUNT\_INFORMATION
SAMPR_USER_ACCOUNT_INFORMATION holds account-related user attributes ([MS-SAMR] 2.2.6.11).
type SAMPR_USER_ACCOUNT_INFORMATION struct {
UserName dtyp.RPC_UNICODE_STRING
FullName dtyp.RPC_UNICODE_STRING
UserId ndr.DWORD
PrimaryGroupId ndr.DWORD
HomeDirectory dtyp.RPC_UNICODE_STRING
HomeDirectoryDrive dtyp.RPC_UNICODE_STRING
ScriptPath dtyp.RPC_UNICODE_STRING
ProfilePath dtyp.RPC_UNICODE_STRING
AdminComment dtyp.RPC_UNICODE_STRING
WorkStations dtyp.RPC_UNICODE_STRING
LastLogon OLD_LARGE_INTEGER
LastLogoff OLD_LARGE_INTEGER
LogonHours SAMPR_LOGON_HOURS
BadPasswordCount uint16
LogonCount uint16
PasswordLastSet OLD_LARGE_INTEGER
AccountExpires OLD_LARGE_INTEGER
UserAccountControl ndr.DWORD
}
type SAMPR\_USER\_ADMIN\_COMMENT\_INFORMATION
SAMPR_USER_ADMIN_COMMENT_INFORMATION holds a user’s administrative comment ([MS-SAMR] 2.2.6, AdminCommentInformation).
type SAMPR_USER_ADMIN_COMMENT_INFORMATION struct {
AdminComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_ALL\_INFORMATION
SAMPR_USER_ALL_INFORMATION holds the full set of attributes for a user account ([MS-SAMR] 2.2.6.6). The WhichFields bit map indicates which fields are valid. LmOwfPassword and NtOwfPassword are carried as RPC_SHORT_BLOB.
type SAMPR_USER_ALL_INFORMATION struct {
LastLogon OLD_LARGE_INTEGER
LastLogoff OLD_LARGE_INTEGER
PasswordLastSet OLD_LARGE_INTEGER
AccountExpires OLD_LARGE_INTEGER
PasswordCanChange OLD_LARGE_INTEGER
PasswordMustChange OLD_LARGE_INTEGER
UserName dtyp.RPC_UNICODE_STRING
FullName dtyp.RPC_UNICODE_STRING
HomeDirectory dtyp.RPC_UNICODE_STRING
HomeDirectoryDrive dtyp.RPC_UNICODE_STRING
ScriptPath dtyp.RPC_UNICODE_STRING
ProfilePath dtyp.RPC_UNICODE_STRING
AdminComment dtyp.RPC_UNICODE_STRING
WorkStations dtyp.RPC_UNICODE_STRING
UserComment dtyp.RPC_UNICODE_STRING
Parameters dtyp.RPC_UNICODE_STRING
LmOwfPassword RPC_SHORT_BLOB
NtOwfPassword RPC_SHORT_BLOB
PrivateData dtyp.RPC_UNICODE_STRING
SecurityDescriptor SAMPR_SR_SECURITY_DESCRIPTOR
UserId ndr.DWORD
PrimaryGroupId ndr.DWORD
UserAccountControl ndr.DWORD
WhichFields ndr.DWORD
LogonHours SAMPR_LOGON_HOURS
BadPasswordCount uint16
LogonCount uint16
CountryCode uint16
CodePage uint16
LmPasswordPresent uint8
NtPasswordPresent uint8
PasswordExpired uint8
PrivateDataSensitive uint8
}
type SAMPR\_USER\_A\_NAME\_INFORMATION
SAMPR_USER_A_NAME_INFORMATION holds a user’s account name ([MS-SAMR] 2.2.6.18).
type SAMPR_USER_A_NAME_INFORMATION struct {
UserName dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_F\_NAME\_INFORMATION
SAMPR_USER_F_NAME_INFORMATION holds a user’s full name ([MS-SAMR] 2.2.6.19).
type SAMPR_USER_F_NAME_INFORMATION struct {
FullName dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_GENERAL\_INFORMATION
SAMPR_USER_GENERAL_INFORMATION holds general user attributes ([MS-SAMR] 2.2.6.7).
type SAMPR_USER_GENERAL_INFORMATION struct {
UserName dtyp.RPC_UNICODE_STRING
FullName dtyp.RPC_UNICODE_STRING
PrimaryGroupId ndr.DWORD
AdminComment dtyp.RPC_UNICODE_STRING
UserComment dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_HOME\_INFORMATION
SAMPR_USER_HOME_INFORMATION holds a user’s home directory and drive ([MS-SAMR] 2.2.6.22, HomeInformation).
type SAMPR_USER_HOME_INFORMATION struct {
HomeDirectory dtyp.RPC_UNICODE_STRING
HomeDirectoryDrive dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_INFO\_BUFFER
SAMPR_USER_INFO_BUFFER is the union of all user information structures, discriminated by a USER_INFORMATION_CLASS ([MS-SAMR] 2.2.6.29). Tag carries the discriminant inline; exactly one arm is valid per the selected case.
type SAMPR_USER_INFO_BUFFER struct {
Tag USER_INFORMATION_CLASS `ndr:"switch,enum"`
General SAMPR_USER_GENERAL_INFORMATION `ndr:"case=1"`
Preferences SAMPR_USER_PREFERENCES_INFORMATION `ndr:"case=2"`
Logon SAMPR_USER_LOGON_INFORMATION `ndr:"case=3"`
LogonHours SAMPR_USER_LOGON_HOURS_INFORMATION `ndr:"case=4"`
Account SAMPR_USER_ACCOUNT_INFORMATION `ndr:"case=5"`
Name SAMPR_USER_NAME_INFORMATION `ndr:"case=6"`
AccountName SAMPR_USER_A_NAME_INFORMATION `ndr:"case=7"`
FullName SAMPR_USER_F_NAME_INFORMATION `ndr:"case=8"`
PrimaryGroup USER_PRIMARY_GROUP_INFORMATION `ndr:"case=9"`
Home SAMPR_USER_HOME_INFORMATION `ndr:"case=10"`
Script SAMPR_USER_SCRIPT_INFORMATION `ndr:"case=11"`
Profile SAMPR_USER_PROFILE_INFORMATION `ndr:"case=12"`
AdminComment SAMPR_USER_ADMIN_COMMENT_INFORMATION `ndr:"case=13"`
WorkStations SAMPR_USER_WORKSTATIONS_INFORMATION `ndr:"case=14"`
Control USER_CONTROL_INFORMATION `ndr:"case=16"`
Expires USER_EXPIRES_INFORMATION `ndr:"case=17"`
Internal1 SAMPR_USER_INTERNAL1_INFORMATION `ndr:"case=18"`
Parameters SAMPR_USER_PARAMETERS_INFORMATION `ndr:"case=20"`
All SAMPR_USER_ALL_INFORMATION `ndr:"case=21"`
Internal4 SAMPR_USER_INTERNAL4_INFORMATION `ndr:"case=23"`
Internal5 SAMPR_USER_INTERNAL5_INFORMATION `ndr:"case=24"`
Internal4New SAMPR_USER_INTERNAL4_INFORMATION_NEW `ndr:"case=25"`
Internal5New SAMPR_USER_INTERNAL5_INFORMATION_NEW `ndr:"case=26"`
Internal7 SAMPR_USER_INTERNAL7_INFORMATION `ndr:"case=31"`
Internal8 SAMPR_USER_INTERNAL8_INFORMATION `ndr:"case=32"`
}
type SAMPR\_USER\_INTERNAL1\_INFORMATION
SAMPR_USER_INTERNAL1_INFORMATION carries encrypted NT/LM OWF password hashes and presence flags ([MS-SAMR] 2.2.6.24).
type SAMPR_USER_INTERNAL1_INFORMATION struct {
EncryptedNtOwfPassword ENCRYPTED_NT_OWF_PASSWORD
EncryptedLmOwfPassword ENCRYPTED_LM_OWF_PASSWORD
NtPasswordPresent uint8
LmPasswordPresent uint8
PasswordExpired uint8
}
type SAMPR\_USER\_INTERNAL4\_INFORMATION
SAMPR_USER_INTERNAL4_INFORMATION carries the full user attribute set plus an encrypted password ([MS-SAMR] 2.2.6.25).
type SAMPR_USER_INTERNAL4_INFORMATION struct {
I1 SAMPR_USER_ALL_INFORMATION
UserPassword SAMPR_ENCRYPTED_USER_PASSWORD
}
type SAMPR\_USER\_INTERNAL4\_INFORMATION\_NEW
SAMPR_USER_INTERNAL4_INFORMATION_NEW carries the full user attribute set plus an encrypted password with salt ([MS-SAMR] 2.2.6.27).
type SAMPR_USER_INTERNAL4_INFORMATION_NEW struct {
I1 SAMPR_USER_ALL_INFORMATION
UserPassword SAMPR_ENCRYPTED_USER_PASSWORD_NEW
}
type SAMPR\_USER\_INTERNAL5\_INFORMATION
SAMPR_USER_INTERNAL5_INFORMATION carries an encrypted password and an expiration flag ([MS-SAMR] 2.2.6.26).
type SAMPR_USER_INTERNAL5_INFORMATION struct {
UserPassword SAMPR_ENCRYPTED_USER_PASSWORD
PasswordExpired uint8
}
type SAMPR\_USER\_INTERNAL5\_INFORMATION\_NEW
SAMPR_USER_INTERNAL5_INFORMATION_NEW carries an encrypted password with salt and an expiration flag ([MS-SAMR] 2.2.6.28).
type SAMPR_USER_INTERNAL5_INFORMATION_NEW struct {
UserPassword SAMPR_ENCRYPTED_USER_PASSWORD_NEW
PasswordExpired uint8
}
type SAMPR\_USER\_INTERNAL7\_INFORMATION
SAMPR_USER_INTERNAL7_INFORMATION carries an AES-encrypted password and an expiration flag ([MS-SAMR] 2.2.6.30).
type SAMPR_USER_INTERNAL7_INFORMATION struct {
UserPassword SAMPR_ENCRYPTED_PASSWORD_AES
PasswordExpired bool
}
type SAMPR\_USER\_INTERNAL8\_INFORMATION
SAMPR_USER_INTERNAL8_INFORMATION carries the full user attribute set plus an AES-encrypted password ([MS-SAMR] 2.2.6.31).
type SAMPR_USER_INTERNAL8_INFORMATION struct {
I1 SAMPR_USER_ALL_INFORMATION
UserPassword SAMPR_ENCRYPTED_PASSWORD_AES
}
type SAMPR\_USER\_LOGON\_HOURS\_INFORMATION
SAMPR_USER_LOGON_HOURS_INFORMATION holds a user’s allowed logon hours ([MS-SAMR] 2.2.6.16).
type SAMPR_USER_LOGON_HOURS_INFORMATION struct {
LogonHours SAMPR_LOGON_HOURS
}
type SAMPR\_USER\_LOGON\_INFORMATION
SAMPR_USER_LOGON_INFORMATION holds logon-related user attributes ([MS-SAMR] 2.2.6.10).
type SAMPR_USER_LOGON_INFORMATION struct {
UserName dtyp.RPC_UNICODE_STRING
FullName dtyp.RPC_UNICODE_STRING
UserId ndr.DWORD
PrimaryGroupId ndr.DWORD
HomeDirectory dtyp.RPC_UNICODE_STRING
HomeDirectoryDrive dtyp.RPC_UNICODE_STRING
ScriptPath dtyp.RPC_UNICODE_STRING
ProfilePath dtyp.RPC_UNICODE_STRING
WorkStations dtyp.RPC_UNICODE_STRING
LastLogon OLD_LARGE_INTEGER
LastLogoff OLD_LARGE_INTEGER
PasswordLastSet OLD_LARGE_INTEGER
PasswordCanChange OLD_LARGE_INTEGER
PasswordMustChange OLD_LARGE_INTEGER
LogonHours SAMPR_LOGON_HOURS
BadPasswordCount uint16
LogonCount uint16
UserAccountControl ndr.DWORD
}
type SAMPR\_USER\_NAME\_INFORMATION
SAMPR_USER_NAME_INFORMATION holds a user’s account name and full name ([MS-SAMR] 2.2.6.17).
type SAMPR_USER_NAME_INFORMATION struct {
UserName dtyp.RPC_UNICODE_STRING
FullName dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_PARAMETERS\_INFORMATION
SAMPR_USER_PARAMETERS_INFORMATION holds a user’s Parameters attribute ([MS-SAMR] 2.2.6.13).
type SAMPR_USER_PARAMETERS_INFORMATION struct {
Parameters dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_PASSWORD
SAMPR_USER_PASSWORD holds a cleartext password and its length ([MS-SAMR] 2.2.6.20). Buffer is a fixed 256-WCHAR array; Length is the number of bytes of password data in Buffer (counted from the end).
type SAMPR_USER_PASSWORD struct {
Buffer [256]uint16
Length ndr.DWORD
}
type SAMPR\_USER\_PASSWORD\_NEW
SAMPR_USER_PASSWORD_NEW holds a cleartext password, its length, and a salt ([MS-SAMR] 2.2.6.23). Buffer is a fixed 256-WCHAR array; Length is the number of bytes of password data; ClearSalt is a 16-byte salt.
type SAMPR_USER_PASSWORD_NEW struct {
Buffer [256]uint16
Length ndr.DWORD
ClearSalt [16]byte
}
type SAMPR\_USER\_PREFERENCES\_INFORMATION
SAMPR_USER_PREFERENCES_INFORMATION holds user preference attributes ([MS-SAMR] 2.2.6.8).
type SAMPR_USER_PREFERENCES_INFORMATION struct {
UserComment dtyp.RPC_UNICODE_STRING
Reserved1 dtyp.RPC_UNICODE_STRING
CountryCode uint16
CodePage uint16
}
type SAMPR\_USER\_PROFILE\_INFORMATION
SAMPR_USER_PROFILE_INFORMATION holds a user’s profile path ([MS-SAMR] 2.2.6, ProfileInformation).
type SAMPR_USER_PROFILE_INFORMATION struct {
ProfilePath dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_SCRIPT\_INFORMATION
SAMPR_USER_SCRIPT_INFORMATION holds a user’s logon script path ([MS-SAMR] 2.2.6, ScriptInformation).
type SAMPR_USER_SCRIPT_INFORMATION struct {
ScriptPath dtyp.RPC_UNICODE_STRING
}
type SAMPR\_USER\_WORKSTATIONS\_INFORMATION
SAMPR_USER_WORKSTATIONS_INFORMATION holds the workstations a user may log on from ([MS-SAMR] 2.2.6.12).
type SAMPR_USER_WORKSTATIONS_INFORMATION struct {
WorkStations dtyp.RPC_UNICODE_STRING
}
type SAM\_VALIDATE\_AUTHENTICATION\_INPUT\_ARG
SAM_VALIDATE_AUTHENTICATION_INPUT_ARG holds the input for a SamValidateAuthentication password validation request ([MS-SAMR] 2.2.9.6).
type SAM_VALIDATE_AUTHENTICATION_INPUT_ARG struct {
InputPersistedFields SAM_VALIDATE_PERSISTED_FIELDS
PasswordMatched uint8
}
type SAM\_VALIDATE\_INPUT\_ARG
SAM_VALIDATE_INPUT_ARG is the discriminated union of password validation input arguments ([MS-SAMR] 2.2.9.9). The switch_type is PASSWORD_POLICY_VALIDATION_TYPE; the wire form is the discriminant followed by the single selected arm ([C706] section 14.3.8). Each arm is a value field for the corresponding validation type.
type SAM_VALIDATE_INPUT_ARG struct {
Tag PASSWORD_POLICY_VALIDATION_TYPE `ndr:"switch,enum"`
ValidateAuthenticationInput SAM_VALIDATE_AUTHENTICATION_INPUT_ARG `ndr:"case=1"`
ValidatePasswordChangeInput SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG `ndr:"case=2"`
ValidatePasswordResetInput SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG `ndr:"case=3"`
}
type SAM\_VALIDATE\_OUTPUT\_ARG
SAM_VALIDATE_OUTPUT_ARG is the discriminated union of password validation output arguments ([MS-SAMR] 2.2.9.10). The switch_type is PASSWORD_POLICY_VALIDATION_TYPE; the wire form is the discriminant followed by the single selected arm ([C706] section 14.3.8). All three arms carry a SAM_VALIDATE_STANDARD_OUTPUT_ARG.
type SAM_VALIDATE_OUTPUT_ARG struct {
Tag PASSWORD_POLICY_VALIDATION_TYPE `ndr:"switch,enum"`
ValidateAuthenticationOutput SAM_VALIDATE_STANDARD_OUTPUT_ARG `ndr:"case=1"`
ValidatePasswordChangeOutput SAM_VALIDATE_STANDARD_OUTPUT_ARG `ndr:"case=2"`
ValidatePasswordResetOutput SAM_VALIDATE_STANDARD_OUTPUT_ARG `ndr:"case=3"`
}
type SAM\_VALIDATE\_PASSWORD\_CHANGE\_INPUT\_ARG
SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG holds the input for a SamValidatePasswordChange password validation request ([MS-SAMR] 2.2.9.7).
type SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG struct {
InputPersistedFields SAM_VALIDATE_PERSISTED_FIELDS
ClearPassword dtyp.RPC_UNICODE_STRING
UserAccountName dtyp.RPC_UNICODE_STRING
HashedPassword SAM_VALIDATE_PASSWORD_HASH
PasswordMatch uint8
}
type SAM\_VALIDATE\_PASSWORD\_HASH
SAM_VALIDATE_PASSWORD_HASH holds the hash of a cleartext password ([MS-SAMR] 2.2.9.2). Hash is a unique pointer to a conformant array of Length bytes.
type SAM_VALIDATE_PASSWORD_HASH struct {
Length ndr.DWORD
Hash []byte `ndr:"unique,size_is=Length"`
}
type SAM\_VALIDATE\_PASSWORD\_RESET\_INPUT\_ARG
SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG holds the input for a SamValidatePasswordReset password validation request ([MS-SAMR] 2.2.9.8).
type SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG struct {
InputPersistedFields SAM_VALIDATE_PERSISTED_FIELDS
ClearPassword dtyp.RPC_UNICODE_STRING
UserAccountName dtyp.RPC_UNICODE_STRING
HashedPassword SAM_VALIDATE_PASSWORD_HASH
PasswordMustChangeAtNextLogon uint8
ClearLockout uint8
}
type SAM\_VALIDATE\_PERSISTED\_FIELDS
SAM_VALIDATE_PERSISTED_FIELDS holds user account properties that the client is expected to persist across calls to SamrValidatePassword ([MS-SAMR] 2.2.9.3). PasswordHistory is a unique pointer to a conformant array of PasswordHistoryLength SAM_VALIDATE_PASSWORD_HASH structures.
type SAM_VALIDATE_PERSISTED_FIELDS struct {
PresentFields ndr.DWORD
PasswordLastSet dtyp.LARGE_INTEGER
BadPasswordTime dtyp.LARGE_INTEGER
LockoutTime dtyp.LARGE_INTEGER
BadPasswordCount ndr.DWORD
PasswordHistoryLength ndr.DWORD
PasswordHistory []SAM_VALIDATE_PASSWORD_HASH `ndr:"unique,size_is=PasswordHistoryLength"`
}
type SAM\_VALIDATE\_STANDARD\_OUTPUT\_ARG
SAM_VALIDATE_STANDARD_OUTPUT_ARG is the common output of all SamrValidatePassword operations ([MS-SAMR] 2.2.9.5). It carries the persisted fields that the server has modified and the overall validation status.
type SAM_VALIDATE_STANDARD_OUTPUT_ARG struct {
ChangedPersistedFields SAM_VALIDATE_PERSISTED_FIELDS
ValidationStatus SAM_VALIDATE_VALIDATION_STATUS `ndr:"enum"`
}
type SAM\_VALIDATE\_VALIDATION\_STATUS
SAM_VALIDATE_VALIDATION_STATUS indicates the result of a password validation operation ([MS-SAMR] 2.2.9.4). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6).
type SAM_VALIDATE_VALIDATION_STATUS uint16
const (
SamValidateSuccess SAM_VALIDATE_VALIDATION_STATUS = 0
SamValidatePasswordMustChange SAM_VALIDATE_VALIDATION_STATUS = 1
SamValidateAccountLockedOut SAM_VALIDATE_VALIDATION_STATUS = 2
SamValidatePasswordExpired SAM_VALIDATE_VALIDATION_STATUS = 3
SamValidatePasswordIncorrect SAM_VALIDATE_VALIDATION_STATUS = 4
SamValidatePasswordIsInHistory SAM_VALIDATE_VALIDATION_STATUS = 5
SamValidatePasswordTooShort SAM_VALIDATE_VALIDATION_STATUS = 6
SamValidatePasswordTooLong SAM_VALIDATE_VALIDATION_STATUS = 7
SamValidatePasswordNotComplexEnough SAM_VALIDATE_VALIDATION_STATUS = 8
SamValidatePasswordTooRecent SAM_VALIDATE_VALIDATION_STATUS = 9
SamValidatePasswordFilterError SAM_VALIDATE_VALIDATION_STATUS = 10
)
type SID\_NAME\_USE
SID_NAME_USE enumerates the type of a security principal identified by a SID ([MS-SAMR] 2.2.2.3). As an NDR enum it is transmitted as a 16-bit unsigned value ([C706] section 14.3.6).
type SID_NAME_USE uint16
const (
SidTypeUser SID_NAME_USE = 1
SidTypeGroup SID_NAME_USE = 2
SidTypeDomain SID_NAME_USE = 3
SidTypeAlias SID_NAME_USE = 4
SidTypeWellKnownGroup SID_NAME_USE = 5
SidTypeDeletedAccount SID_NAME_USE = 6
SidTypeInvalid SID_NAME_USE = 7
SidTypeUnknown SID_NAME_USE = 8
SidTypeComputer SID_NAME_USE = 9
SidTypeLabel SID_NAME_USE = 10
)
type USER\_CONTROL\_INFORMATION
USER_CONTROL_INFORMATION holds a user’s account control bits ([MS-SAMR] 2.2.6.14).
type USER_CONTROL_INFORMATION struct {
UserAccountControl ndr.DWORD
}
type USER\_DOMAIN\_PASSWORD\_INFORMATION
USER_DOMAIN_PASSWORD_INFORMATION carries domain password policy constraints ([MS-SAMR] 2.2.3.14).
type USER_DOMAIN_PASSWORD_INFORMATION struct {
MinPasswordLength uint16
PasswordProperties ndr.DWORD
}
type USER\_EXPIRES\_INFORMATION
USER_EXPIRES_INFORMATION holds a user’s account-expiration time ([MS-SAMR] 2.2.6.15).
type USER_EXPIRES_INFORMATION struct {
AccountExpires OLD_LARGE_INTEGER
}
type USER\_INFORMATION\_CLASS
USER_INFORMATION_CLASS enumerates the user information levels used by the SAMR user query/set methods ([MS-SAMR] 2.2.6.28). NDR enums are 16-bit, so this is modeled as a uint16. The enumeration has gaps (15, 19, 22, 27, 29, 30) that have no defined value.
type USER_INFORMATION_CLASS uint16
const (
UserGeneralInformation USER_INFORMATION_CLASS = 1
UserPreferencesInformation USER_INFORMATION_CLASS = 2
UserLogonInformation USER_INFORMATION_CLASS = 3
UserLogonHoursInformation USER_INFORMATION_CLASS = 4
UserAccountInformation USER_INFORMATION_CLASS = 5
UserNameInformation USER_INFORMATION_CLASS = 6
UserAccountNameInformation USER_INFORMATION_CLASS = 7
UserFullNameInformation USER_INFORMATION_CLASS = 8
UserPrimaryGroupInformation USER_INFORMATION_CLASS = 9
UserHomeInformation USER_INFORMATION_CLASS = 10
UserScriptInformation USER_INFORMATION_CLASS = 11
UserProfileInformation USER_INFORMATION_CLASS = 12
UserAdminCommentInformation USER_INFORMATION_CLASS = 13
UserWorkStationsInformation USER_INFORMATION_CLASS = 14
UserControlInformation USER_INFORMATION_CLASS = 16
UserExpiresInformation USER_INFORMATION_CLASS = 17
UserInternal1Information USER_INFORMATION_CLASS = 18
UserParametersInformation USER_INFORMATION_CLASS = 20
UserAllInformation USER_INFORMATION_CLASS = 21
UserInternal4Information USER_INFORMATION_CLASS = 23
UserInternal5Information USER_INFORMATION_CLASS = 24
UserInternal4InformationNew USER_INFORMATION_CLASS = 25
UserInternal5InformationNew USER_INFORMATION_CLASS = 26
UserInternal7Information USER_INFORMATION_CLASS = 31
UserInternal8Information USER_INFORMATION_CLASS = 32
)
type USER\_PRIMARY\_GROUP\_INFORMATION
USER_PRIMARY_GROUP_INFORMATION holds a user’s primary group RID ([MS-SAMR] 2.2.6.9).
type USER_PRIMARY_GROUP_INFORMATION struct {
PrimaryGroupId ndr.DWORD
}