ReactOS  0.4.14-dev-50-g13bb5e2
ntsam.h File Reference
#include "pshpack4.h"
#include "poppack.h"
Include dependency graph for ntsam.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _SAM_RID_ENUMERATION
 
struct  _SAM_SID_ENUMERATION
 
struct  _ALIAS_GENERAL_INFORMATION
 
struct  _ALIAS_NAME_INFORMATION
 
struct  _ALIAS_ADM_COMMENT_INFORMATION
 
struct  _DOMAIN_PASSWORD_INFORMATION
 
struct  _DOMAIN_GENERAL_INFORMATION
 
struct  _DOMAIN_LOGOFF_INFORMATION
 
struct  _DOMAIN_OEM_INFORMATION
 
struct  _DOMAIN_NAME_INFORMATION
 
struct  _DOMAIN_REPLICATION_INFORMATION
 
struct  _DOMAIN_SERVER_ROLE_INFORMATION
 
struct  _DOMAIN_MODIFIED_INFORMATION
 
struct  _DOMAIN_STATE_INFORMATION
 
struct  _DOMAIN_UAS_INFORMATION
 
struct  _DOMAIN_GENERAL_INFORMATION2
 
struct  _DOMAIN_LOCKOUT_INFORMATION
 
struct  _DOMAIN_MODIFIED_INFORMATION2
 
struct  _GROUP_GENERAL_INFORMATION
 
struct  _GROUP_NAME_INFORMATION
 
struct  _GROUP_ATTRIBUTE_INFORMATION
 
struct  GROUP_ADM_COMMENT_INFORMATION
 
struct  _GROUP_MEMBERSHIP
 
struct  _LOGON_HOURS
 
struct  _SR_SECURITY_DESCRIPTOR
 
struct  _USER_GENERAL_INFORMATION
 
struct  _USER_PREFERENCES_INFORMATION
 
struct  _USER_LOGON_INFORMATION
 
struct  _USER_LOGON_HOURS_INFORMATION
 
struct  _USER_ACCOUNT_INFORMATION
 
struct  _USER_NAME_INFORMATION
 
struct  _USER_ACCOUNT_NAME_INFORMATION
 
struct  _USER_FULL_NAME_INFORMATION
 
struct  _USER_PRIMARY_GROUP_INFORMATION
 
struct  _USER_HOME_INFORMATION
 
struct  _USER_SCRIPT_INFORMATION
 
struct  _USER_PROFILE_INFORMATION
 
struct  _USER_ADMIN_COMMENT_INFORMATION
 
struct  _USER_WORKSTATIONS_INFORMATION
 
struct  _USER_SET_PASSWORD_INFORMATION
 
struct  _USER_CONTROL_INFORMATION
 
struct  _USER_EXPIRES_INFORMATION
 
struct  _USER_PARAMETERS_INFORMATION
 
struct  _USER_ALL_INFORMATION
 
struct  _USER_PWD_CHANGE_FAILURE_INFORMATION
 

Macros

#define ALIAS_ADD_MEMBER   0x00000001
 
#define ALIAS_REMOVE_MEMBER   0x00000002
 
#define ALIAS_LIST_MEMBERS   0x00000004
 
#define ALIAS_READ_INFORMATION   0x00000008
 
#define ALIAS_WRITE_ACCOUNT   0x00000010
 
#define ALIAS_READ
 
#define ALIAS_WRITE
 
#define ALIAS_EXECUTE
 
#define ALIAS_ALL_ACCESS
 
#define DOMAIN_READ_PASSWORD_PARAMETERS   0x00000001
 
#define DOMAIN_WRITE_PASSWORD_PARAMS   0x00000002
 
#define DOMAIN_READ_OTHER_PARAMETERS   0x00000004
 
#define DOMAIN_WRITE_OTHER_PARAMETERS   0x00000008
 
#define DOMAIN_CREATE_USER   0x00000010
 
#define DOMAIN_CREATE_GROUP   0x00000020
 
#define DOMAIN_CREATE_ALIAS   0x00000040
 
#define DOMAIN_GET_ALIAS_MEMBERSHIP   0x00000080
 
#define DOMAIN_LIST_ACCOUNTS   0x00000100
 
#define DOMAIN_LOOKUP   0x00000200
 
#define DOMAIN_ADMINISTER_SERVER   0x00000400
 
#define DOMAIN_READ
 
#define DOMAIN_WRITE
 
#define DOMAIN_EXECUTE
 
#define DOMAIN_ALL_ACCESS
 
#define GROUP_READ_INFORMATION   0x00000001
 
#define GROUP_WRITE_ACCOUNT   0x00000002
 
#define GROUP_ADD_MEMBER   0x00000004
 
#define GROUP_REMOVE_MEMBER   0x00000008
 
#define GROUP_LIST_MEMBERS   0x00000010
 
#define GROUP_READ
 
#define GROUP_WRITE
 
#define GROUP_EXECUTE
 
#define GROUP_ALL_ACCESS
 
#define SAM_SERVER_CONNECT   0x00000001
 
#define SAM_SERVER_SHUTDOWN   0x00000002
 
#define SAM_SERVER_INITIALIZE   0x00000004
 
#define SAM_SERVER_CREATE_DOMAIN   0x00000008
 
#define SAM_SERVER_ENUMERATE_DOMAINS   0x00000010
 
#define SAM_SERVER_LOOKUP_DOMAIN   0x00000020
 
#define SAM_SERVER_READ
 
#define SAM_SERVER_WRITE
 
#define SAM_SERVER_EXECUTE
 
#define SAM_SERVER_ALL_ACCESS
 
#define USER_READ_GENERAL   0x00000001
 
#define USER_READ_PREFERENCES   0x00000002
 
#define USER_WRITE_PREFERENCES   0x00000004
 
#define USER_READ_LOGON   0x00000008
 
#define USER_READ_ACCOUNT   0x00000010
 
#define USER_WRITE_ACCOUNT   0x00000020
 
#define USER_CHANGE_PASSWORD   0x00000040
 
#define USER_FORCE_PASSWORD_CHANGE   0x00000080
 
#define USER_LIST_GROUPS   0x00000100
 
#define USER_READ_GROUP_INFORMATION   0x00000200
 
#define USER_WRITE_GROUP_INFORMATION   0x00000400
 
#define USER_READ
 
#define USER_WRITE
 
#define USER_EXECUTE
 
#define USER_ALL_ACCESS
 
#define USER_ACCOUNT_DISABLED   0x00000001
 
#define USER_HOME_DIRECTORY_REQUIRED   0x00000002
 
#define USER_PASSWORD_NOT_REQUIRED   0x00000004
 
#define USER_TEMP_DUPLICATE_ACCOUNT   0x00000008
 
#define USER_NORMAL_ACCOUNT   0x00000010
 
#define USER_MNS_LOGON_ACCOUNT   0x00000020
 
#define USER_INTERDOMAIN_TRUST_ACCOUNT   0x00000040
 
#define USER_WORKSTATION_TRUST_ACCOUNT   0x00000080
 
#define USER_SERVER_TRUST_ACCOUNT   0x00000100
 
#define USER_DONT_EXPIRE_PASSWORD   0x00000200
 
#define USER_ACCOUNT_AUTO_LOCKED   0x00000400
 
#define USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED   0x00000800
 
#define USER_SMARTCARD_REQUIRED   0x00001000
 
#define USER_TRUSTED_FOR_DELEGATION   0x00002000
 
#define USER_NOT_DELEGATED   0x00004000
 
#define USER_USE_DES_KEY_ONLY   0x00008000
 
#define USER_DONT_REQUIRE_PREAUTH   0x00010000
 
#define USER_PASSWORD_EXPIRED   0x00020000
 
#define USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION   0x00040000
 
#define USER_NO_AUTH_DATA_REQUIRED   0x00080000
 
#define USER_PARTIAL_SECRETS_ACCOUNT   0x00100000
 
#define USER_USE_AES_KEYS   0x00200000
 
#define SAM_DAYS_PER_WEEK   (7)
 
#define SAM_HOURS_PER_WEEK   (24 * SAM_DAYS_PER_WEEK)
 
#define SAM_MINUTES_PER_WEEK   (60 * SAM_HOURS_PER_WEEK)
 
#define USER_ALL_USERNAME   0x00000001
 
#define USER_ALL_FULLNAME   0x00000002
 
#define USER_ALL_USERID   0x00000004
 
#define USER_ALL_PRIMARYGROUPID   0x00000008
 
#define USER_ALL_ADMINCOMMENT   0x00000010
 
#define USER_ALL_USERCOMMENT   0x00000020
 
#define USER_ALL_HOMEDIRECTORY   0x00000040
 
#define USER_ALL_HOMEDIRECTORYDRIVE   0x00000080
 
#define USER_ALL_SCRIPTPATH   0x00000100
 
#define USER_ALL_PROFILEPATH   0x00000200
 
#define USER_ALL_WORKSTATIONS   0x00000400
 
#define USER_ALL_LASTLOGON   0x00000800
 
#define USER_ALL_LASTLOGOFF   0x00001000
 
#define USER_ALL_LOGONHOURS   0x00002000
 
#define USER_ALL_BADPASSWORDCOUNT   0x00004000
 
#define USER_ALL_LOGONCOUNT   0x00008000
 
#define USER_ALL_PASSWORDCANCHANGE   0x00010000
 
#define USER_ALL_PASSWORDMUSTCHANGE   0x00020000
 
#define USER_ALL_PASSWORDLASTSET   0x00040000
 
#define USER_ALL_ACCOUNTEXPIRES   0x00080000
 
#define USER_ALL_USERACCOUNTCONTROL   0x00100000
 
#define USER_ALL_PARAMETERS   0x00200000
 
#define USER_ALL_COUNTRYCODE   0x00400000
 
#define USER_ALL_CODEPAGE   0x00800000
 
#define USER_ALL_NTPASSWORDPRESENT   0x01000000
 
#define USER_ALL_LMPASSWORDPRESENT   0x02000000
 
#define USER_ALL_PRIVATEDATA   0x04000000
 
#define USER_ALL_PASSWORDEXPIRED   0x08000000
 
#define USER_ALL_SECURITYDESCRIPTOR   0x10000000
 
#define USER_ALL_OWFPASSWORD   0x20000000
 
#define USER_ALL_UNDEFINED_MASK   0xC0000000
 
#define USER_ALL_READ_GENERAL_MASK   0x0000003F
 
#define USER_ALL_READ_LOGON_MASK   0x0003FFC0
 
#define USER_ALL_READ_ACCOUNT_MASK   0x003C0000
 
#define USER_ALL_READ_PREFERENCES_MASK   0x00C00000
 
#define USER_ALL_READ_TRUSTED_MASK   0x1F000000
 
#define USER_ALL_READ_CANT_MASK   0xC0000000
 
#define USER_ALL_WRITE_ACCOUNT_MASK   0x003827DB
 
#define USER_ALL_WRITE_PREFERENCES_MASK   0x00C00020
 
#define USER_ALL_WRITE_FORCE_PASSWORD_CHANGE_MASK   0x0B000000
 
#define USER_ALL_WRITE_TRUSTED_MASK   0x1404D800
 
#define USER_ALL_WRITE_CANT_MASK   0xC0030004
 
#define SAM_PWD_CHANGE_NO_ERROR   0
 
#define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT   1
 
#define SAM_PWD_CHANGE_PWD_IN_HISTORY   2
 
#define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD   3
 
#define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD   4
 
#define SAM_PWD_CHANGE_NOT_COMPLEX   5
 
#define SAM_PWD_CHANGE_MACHINE_PASSWORD_NOT_DEFAULT   6
 
#define SAM_PWD_CHANGE_FAILED_BY_FILTER   7
 
#define SAM_PWD_CHANGE_PASSWORD_TOO_LONG   8
 
#define SAM_PWD_CHANGE_FAILURE_REASON_MAX   8
 
#define DOMAIN_PASSWORD_COMPLEX   0x00000001L
 
#define DOMAIN_PASSWORD_NO_ANON_CHANGE   0x00000002L
 
#define DOMAIN_PASSWORD_NO_CLEAR_CHANGE   0x00000004L
 
#define DOMAIN_LOCKOUT_ADMINS   0x00000008L
 
#define DOMAIN_PASSWORD_STORE_CLEARTEXT   0x00000010L
 
#define DOMAIN_REFUSE_PASSWORD_CHANGE   0x00000020L
 
#define DOMAIN_NO_LM_OWF_CHANGE   0x00000040L
 
#define _DOMAIN_PASSWORD_INFORMATION_DEFINED
 
#define SAM_SID_COMPATIBILITY_ALL   0
 
#define SAM_SID_COMPATIBILITY_LAX   1
 
#define SAM_SID_COMPATIBILITY_STRICT   2
 

Typedefs

typedef PVOID SAM_HANDLE
 
typedef PVOIDPSAM_HANDLE
 
typedef ULONG SAM_ENUMERATE_HANDLE
 
typedef ULONGPSAM_ENUMERATE_HANDLE
 
typedef struct _SAM_RID_ENUMERATION SAM_RID_ENUMERATION
 
typedef struct _SAM_RID_ENUMERATIONPSAM_RID_ENUMERATION
 
typedef struct _SAM_SID_ENUMERATION SAM_SID_ENUMERATION
 
typedef struct _SAM_SID_ENUMERATIONPSAM_SID_ENUMERATION
 
typedef enum _ALIAS_INFORMATION_CLASS ALIAS_INFORMATION_CLASS
 
typedef enum _ALIAS_INFORMATION_CLASSPALIAS_INFORMATION_CLASS
 
typedef struct _ALIAS_GENERAL_INFORMATION ALIAS_GENERAL_INFORMATION
 
typedef struct _ALIAS_GENERAL_INFORMATIONPALIAS_GENERAL_INFORMATION
 
typedef struct _ALIAS_NAME_INFORMATION ALIAS_NAME_INFORMATION
 
typedef struct _ALIAS_NAME_INFORMATIONPALIAS_NAME_INFORMATION
 
typedef struct _ALIAS_ADM_COMMENT_INFORMATION ALIAS_ADM_COMMENT_INFORMATION
 
typedef struct _ALIAS_ADM_COMMENT_INFORMATIONPALIAS_ADM_COMMENT_INFORMATION
 
typedef enum _DOMAIN_DISPLAY_INFORMATION DOMAIN_DISPLAY_INFORMATION
 
typedef enum _DOMAIN_DISPLAY_INFORMATIONPDOMAIN_DISPLAY_INFORMATION
 
typedef enum _DOMAIN_INFORMATION_CLASS DOMAIN_INFORMATION_CLASS
 
typedef enum _DOMAIN_SERVER_ENABLE_STATE DOMAIN_SERVER_ENABLE_STATE
 
typedef enum _DOMAIN_SERVER_ENABLE_STATEPDOMAIN_SERVER_ENABLE_STATE
 
typedef enum _DOMAIN_SERVER_ROLE DOMAIN_SERVER_ROLE
 
typedef enum _DOMAIN_SERVER_ROLEPDOMAIN_SERVER_ROLE
 
typedef struct _DOMAIN_PASSWORD_INFORMATION DOMAIN_PASSWORD_INFORMATION
 
typedef struct _DOMAIN_PASSWORD_INFORMATIONPDOMAIN_PASSWORD_INFORMATION
 
typedef struct _DOMAIN_GENERAL_INFORMATION DOMAIN_GENERAL_INFORMATION
 
typedef struct _DOMAIN_GENERAL_INFORMATIONPDOMAIN_GENERAL_INFORMATION
 
typedef struct _DOMAIN_LOGOFF_INFORMATION DOMAIN_LOGOFF_INFORMATION
 
typedef struct _DOMAIN_LOGOFF_INFORMATIONPDOMAIN_LOGOFF_INFORMATION
 
typedef struct _DOMAIN_OEM_INFORMATION DOMAIN_OEM_INFORMATION
 
typedef struct _DOMAIN_OEM_INFORMATIONPDOMAIN_OEM_INFORMATION
 
typedef struct _DOMAIN_NAME_INFORMATION DOMAIN_NAME_INFORMATION
 
typedef struct _DOMAIN_NAME_INFORMATIONPDOMAIN_NAME_INFORMATION
 
typedef struct _DOMAIN_REPLICATION_INFORMATION DOMAIN_REPLICATION_INFORMATION
 
typedef struct _DOMAIN_REPLICATION_INFORMATIONPDOMAIN_REPLICATION_INFORMATION
 
typedef struct _DOMAIN_SERVER_ROLE_INFORMATION DOMAIN_SERVER_ROLE_INFORMATION
 
typedef struct _DOMAIN_SERVER_ROLE_INFORMATIONPDOMAIN_SERVER_ROLE_INFORMATION
 
typedef struct _DOMAIN_MODIFIED_INFORMATION DOMAIN_MODIFIED_INFORMATION
 
typedef struct _DOMAIN_MODIFIED_INFORMATIONPDOMAIN_MODIFIED_INFORMATION
 
typedef struct _DOMAIN_STATE_INFORMATION DOMAIN_STATE_INFORMATION
 
typedef struct _DOMAIN_STATE_INFORMATIONPDOMAIN_STATE_INFORMATION
 
typedef struct _DOMAIN_UAS_INFORMATION DOMAIN_UAS_INFORMATION
 
typedef struct _DOMAIN_GENERAL_INFORMATION2 DOMAIN_GENERAL_INFORMATION2
 
typedef struct _DOMAIN_GENERAL_INFORMATION2PDOMAIN_GENERAL_INFORMATION2
 
typedef struct _DOMAIN_LOCKOUT_INFORMATION DOMAIN_LOCKOUT_INFORMATION
 
typedef struct _DOMAIN_LOCKOUT_INFORMATIONPDOMAIN_LOCKOUT_INFORMATION
 
typedef struct _DOMAIN_MODIFIED_INFORMATION2 DOMAIN_MODIFIED_INFORMATION2
 
typedef struct _DOMAIN_MODIFIED_INFORMATION2PDOMAIN_MODIFIED_INFORMATION2
 
typedef enum _GROUP_INFORMATION_CLASS GROUP_INFORMATION_CLASS
 
typedef struct _GROUP_GENERAL_INFORMATION GROUP_GENERAL_INFORMATION
 
typedef struct _GROUP_GENERAL_INFORMATIONPGROUP_GENERAL_INFORMATION
 
typedef struct _GROUP_NAME_INFORMATION GROUP_NAME_INFORMATION
 
typedef struct _GROUP_NAME_INFORMATIONPGROUP_NAME_INFORMATION
 
typedef struct _GROUP_ATTRIBUTE_INFORMATION GROUP_ATTRIBUTE_INFORMATION
 
typedef struct _GROUP_ATTRIBUTE_INFORMATIONPGROUP_ATTRIBUTE_INFORMATION
 
typedef struct GROUP_ADM_COMMENT_INFORMATION GROUP_ADM_COMMENT_INFORMATION
 
typedef struct GROUP_ADM_COMMENT_INFORMATIONPGROUP_ADM_COMMENT_INFORMATION
 
typedef struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
 
typedef struct _GROUP_MEMBERSHIPPGROUP_MEMBERSHIP
 
typedef struct _LOGON_HOURS LOGON_HOURS
 
typedef struct _LOGON_HOURSPLOGON_HOURS
 
typedef struct _SR_SECURITY_DESCRIPTOR SR_SECURITY_DESCRIPTOR
 
typedef struct _SR_SECURITY_DESCRIPTORPSR_SECURITY_DESCRIPTOR
 
typedef enum _USER_INFORMATION_CLASS USER_INFORMATION_CLASS
 
typedef enum _USER_INFORMATION_CLASSPUSER_INFORMATION_CLASS
 
typedef struct _USER_GENERAL_INFORMATION USER_GENERAL_INFORMATION
 
typedef struct _USER_GENERAL_INFORMATIONPUSER_GENERAL_INFORMATION
 
typedef struct _USER_PREFERENCES_INFORMATION USER_PREFERENCES_INFORMATION
 
typedef struct _USER_PREFERENCES_INFORMATIONPUSER_PREFERENCES_INFORMATION
 
typedef struct _USER_LOGON_INFORMATION USER_LOGON_INFORMATION
 
typedef struct _USER_LOGON_INFORMATIONPUSER_LOGON_INFORMATION
 
typedef struct _USER_LOGON_HOURS_INFORMATION USER_LOGON_HOURS_INFORMATION
 
typedef struct _USER_LOGON_HOURS_INFORMATIONPUSER_LOGON_HOURS_INFORMATION
 
typedef struct _USER_ACCOUNT_INFORMATION USER_ACCOUNT_INFORMATION
 
typedef struct _USER_ACCOUNT_INFORMATIONPUSER_ACCOUNT_INFORMATION
 
typedef struct _USER_NAME_INFORMATION USER_NAME_INFORMATION
 
typedef struct _USER_NAME_INFORMATIONPUSER_NAME_INFORMATION
 
typedef struct _USER_ACCOUNT_NAME_INFORMATION USER_ACCOUNT_NAME_INFORMATION
 
typedef struct _USER_ACCOUNT_NAME_INFORMATIONPUSER_ACCOUNT_NAME_INFORMATION
 
typedef struct _USER_FULL_NAME_INFORMATION USER_FULL_NAME_INFORMATION
 
typedef struct _USER_FULL_NAME_INFORMATIONPUSER_FULL_NAME_INFORMATION
 
typedef struct _USER_PRIMARY_GROUP_INFORMATION USER_PRIMARY_GROUP_INFORMATION
 
typedef struct _USER_PRIMARY_GROUP_INFORMATIONPUSER_PRIMARY_GROUP_INFORMATION
 
typedef struct _USER_HOME_INFORMATION USER_HOME_INFORMATION
 
typedef struct _USER_HOME_INFORMATIONPUSER_HOME_INFORMATION
 
typedef struct _USER_SCRIPT_INFORMATION USER_SCRIPT_INFORMATION
 
typedef struct _USER_SCRIPT_INFORMATIONPUSER_SCRIPT_INFORMATION
 
typedef struct _USER_PROFILE_INFORMATION USER_PROFILE_INFORMATION
 
typedef struct _USER_PROFILE_INFORMATIONPUSER_PROFILE_INFORMATION
 
typedef struct _USER_ADMIN_COMMENT_INFORMATION USER_ADMIN_COMMENT_INFORMATION
 
typedef struct _USER_ADMIN_COMMENT_INFORMATIONPUSER_ADMIN_COMMENT_INFORMATION
 
typedef struct _USER_WORKSTATIONS_INFORMATION USER_WORKSTATIONS_INFORMATION
 
typedef struct _USER_WORKSTATIONS_INFORMATIONPUSER_WORKSTATIONS_INFORMATION
 
typedef struct _USER_SET_PASSWORD_INFORMATION USER_SET_PASSWORD_INFORMATION
 
typedef struct _USER_SET_PASSWORD_INFORMATIONPUSER_SET_PASSWORD_INFORMATION
 
typedef struct _USER_CONTROL_INFORMATION USER_CONTROL_INFORMATION
 
typedef struct _USER_CONTROL_INFORMATIONPUSER_CONTROL_INFORMATION
 
typedef struct _USER_EXPIRES_INFORMATION USER_EXPIRES_INFORMATION
 
typedef struct _USER_EXPIRES_INFORMATIONPUSER_EXPIRES_INFORMATION
 
typedef struct _USER_PARAMETERS_INFORMATION USER_PARAMETERS_INFORMATION
 
typedef struct _USER_PARAMETERS_INFORMATIONPUSER_PARAMETERS_INFORMATION
 
typedef struct _USER_ALL_INFORMATION USER_ALL_INFORMATION
 
typedef struct _USER_ALL_INFORMATIONPUSER_ALL_INFORMATION
 
typedef struct _USER_PWD_CHANGE_FAILURE_INFORMATION USER_PWD_CHANGE_FAILURE_INFORMATION
 
typedef struct _USER_PWD_CHANGE_FAILURE_INFORMATIONPUSER_PWD_CHANGE_FAILURE_INFORMATION
 

Enumerations

enum  _ALIAS_INFORMATION_CLASS {
  AliasGeneralInformation = 1, AliasNameInformation, AliasAdminCommentInformation, AliasGeneralInformation = 1,
  AliasNameInformation, AliasAdminCommentInformation
}
 
enum  _DOMAIN_DISPLAY_INFORMATION {
  DomainDisplayUser = 1, DomainDisplayMachine, DomainDisplayGroup, DomainDisplayOemUser,
  DomainDisplayOemGroup, DomainDisplayServer, DomainDisplayUser = 1, DomainDisplayMachine,
  DomainDisplayGroup, DomainDisplayOemUser, DomainDisplayOemGroup, DomainDisplayServer
}
 
enum  _DOMAIN_INFORMATION_CLASS {
  DomainPasswordInformation = 1, DomainGeneralInformation, DomainLogoffInformation, DomainOemInformation,
  DomainNameInformation, DomainReplicationInformation, DomainServerRoleInformation, DomainModifiedInformation,
  DomainStateInformation, DomainUasInformation, DomainGeneralInformation2, DomainLockoutInformation,
  DomainModifiedInformation2, DomainPasswordInformation = 1, DomainGeneralInformation = 2, DomainLogoffInformation = 3,
  DomainOemInformation = 4, DomainNameInformation = 5, DomainReplicationInformation = 6, DomainServerRoleInformation = 7,
  DomainModifiedInformation = 8, DomainStateInformation = 9, DomainGeneralInformation2 = 11, DomainLockoutInformation = 12,
  DomainModifiedInformation2 = 13
}
 
enum  _DOMAIN_SERVER_ENABLE_STATE { DomainServerEnabled = 1, DomainServerDisabled, DomainServerEnabled = 1, DomainServerDisabled }
 
enum  _DOMAIN_SERVER_ROLE { DomainServerRoleBackup = 2, DomainServerRolePrimary, DomainServerRoleBackup = 2, DomainServerRolePrimary = 3 }
 
enum  _GROUP_INFORMATION_CLASS {
  GroupGeneralInformation = 1, GroupNameInformation, GroupAttributeInformation, GroupAdminCommentInformation,
  GroupReplicationInformation, GroupGeneralInformation = 1, GroupNameInformation, GroupAttributeInformation,
  GroupAdminCommentInformation, GroupReplicationInformation
}
 
enum  _USER_INFORMATION_CLASS {
  UserGeneralInformation = 1, UserPreferencesInformation, UserLogonInformation, UserLogonHoursInformation,
  UserAccountInformation, UserNameInformation, UserAccountNameInformation, UserFullNameInformation,
  UserPrimaryGroupInformation, UserHomeInformation, UserScriptInformation, UserProfileInformation,
  UserAdminCommentInformation, UserWorkStationsInformation, UserSetPasswordInformation, UserControlInformation,
  UserExpiresInformation, UserInternal1Information, UserInternal2Information, UserParametersInformation,
  UserAllInformation, UserInternal3Information, UserInternal4Information, UserInternal5Information,
  UserInternal4InformationNew, UserInternal5InformationNew, UserInternal6Information, UserExtendedInformation,
  UserLogonUIInformation, UserGeneralInformation = 1, UserPreferencesInformation = 2, UserLogonInformation = 3,
  UserLogonHoursInformation = 4, UserAccountInformation = 5, UserNameInformation = 6, UserAccountNameInformation = 7,
  UserFullNameInformation = 8, UserPrimaryGroupInformation = 9, UserHomeInformation = 10, UserScriptInformation = 11,
  UserProfileInformation = 12, UserAdminCommentInformation = 13, UserWorkStationsInformation = 14, UserSetPasswordInformation = 15,
  UserControlInformation = 16, UserExpiresInformation = 17, UserInternal1Information = 18, UserInternal2Information = 19,
  UserParametersInformation = 20, UserAllInformation = 21, UserInternal3Information = 22, UserInternal4Information = 23,
  UserInternal5Information = 24, UserInternal4InformationNew = 25, UserInternal5InformationNew = 26, UserInternal6Information,
  UserExtendedInformation, UserLogonUIInformation
}
 

Functions

NTSTATUS NTAPI SamAddMemberToAlias (IN SAM_HANDLE AliasHandle, IN PSID MemberId)
 
NTSTATUS NTAPI SamAddMemberToGroup (IN SAM_HANDLE GroupHandle, IN ULONG MemberId, IN ULONG Attributes)
 
NTSTATUS NTAPI SamAddMultipleMembersToAlias (IN SAM_HANDLE AliasHandle, IN PSID *MemberIds, IN ULONG MemberCount)
 
NTSTATUS NTAPI SamChangePasswordUser (IN SAM_HANDLE UserHandle, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword)
 
NTSTATUS NTAPI SamChangePasswordUser2 (IN PUNICODE_STRING ServerName, IN PUNICODE_STRING UserName, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword)
 
NTSTATUS NTAPI SamChangePasswordUser3 (IN PUNICODE_STRING ServerName, IN PUNICODE_STRING UserName, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword, OUT PDOMAIN_PASSWORD_INFORMATION *EffectivePasswordPolicy, OUT PUSER_PWD_CHANGE_FAILURE_INFORMATION *PasswordChangeFailureInfo)
 
NTSTATUS NTAPI SamCloseHandle (IN SAM_HANDLE SamHandle)
 
NTSTATUS NTAPI SamConnect (IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
 
NTSTATUS NTAPI SamCreateAliasInDomain (IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE AliasHandle, OUT PULONG RelativeId)
 
NTSTATUS NTAPI SamCreateGroupInDomain (IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE GroupHandle, OUT PULONG RelativeId)
 
NTSTATUS NTAPI SamCreateUser2InDomain (IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ULONG AccountType, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE UserHandle, OUT PULONG GrantedAccess, OUT PULONG RelativeId)
 
NTSTATUS NTAPI SamCreateUserInDomain (IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE UserHandle, OUT PULONG RelativeId)
 
NTSTATUS NTAPI SamDeleteAlias (IN SAM_HANDLE AliasHandle)
 
NTSTATUS NTAPI SamDeleteGroup (IN SAM_HANDLE GroupHandle)
 
NTSTATUS NTAPI SamDeleteUser (IN SAM_HANDLE UserHandle)
 
NTSTATUS NTAPI SamEnumerateAliasesInDomain (IN SAM_HANDLE DomainHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
 
NTSTATUS NTAPI SamEnumerateDomainsInSamServer (IN SAM_HANDLE ServerHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
 
NTSTATUS NTAPI SamEnumerateGroupsInDomain (IN SAM_HANDLE DomainHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, IN PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
 
NTSTATUS NTAPI SamEnumerateUsersInDomain (IN SAM_HANDLE DomainHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, IN ULONG UserAccountControl, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
 
NTSTATUS NTAPI SamFreeMemory (IN PVOID Buffer)
 
NTSTATUS NTAPI SamGetAliasMembership (IN SAM_HANDLE DomainHandle, IN ULONG PassedCount, IN PSID *Sids, OUT PULONG MembershipCount, OUT PULONG *Aliases)
 
NTSTATUS NTAPI SamGetCompatibilityMode (IN SAM_HANDLE ObjectHandle, OUT PULONG Mode)
 
NTSTATUS NTAPI SamGetDisplayEnumerationIndex (IN SAM_HANDLE DomainHandle, IN DOMAIN_DISPLAY_INFORMATION DisplayInformation, IN PUNICODE_STRING Prefix, OUT PULONG Index)
 
NTSTATUS NTAPI SamGetGroupsForUser (IN SAM_HANDLE UserHandle, OUT PGROUP_MEMBERSHIP *Groups, OUT PULONG MembershipCount)
 
NTSTATUS NTAPI SamGetMembersInAlias (IN SAM_HANDLE AliasHandle, OUT PSID **MemberIds, OUT PULONG MemberCount)
 
NTSTATUS NTAPI SamGetMembersInGroup (IN SAM_HANDLE GroupHandle, OUT PULONG *MemberIds, OUT PULONG *Attributes, OUT PULONG MemberCount)
 
NTSTATUS NTAPI SamLookupDomainInSamServer (IN SAM_HANDLE ServerHandle, IN PUNICODE_STRING Name, OUT PSID *DomainId)
 
NTSTATUS NTAPI SamLookupIdsInDomain (IN SAM_HANDLE DomainHandle, IN ULONG Count, IN PULONG RelativeIds, OUT PUNICODE_STRING *Names, OUT PSID_NAME_USE *Use OPTIONAL)
 
NTSTATUS NTAPI SamLookupNamesInDomain (IN SAM_HANDLE DomainHandle, IN ULONG Count, IN PUNICODE_STRING Names, OUT PULONG *RelativeIds, OUT PSID_NAME_USE *Use)
 
NTSTATUS NTAPI SamOpenAlias (IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG AliasId, OUT PSAM_HANDLE AliasHandle)
 
NTSTATUS NTAPI SamOpenDomain (IN SAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT PSAM_HANDLE DomainHandle)
 
NTSTATUS NTAPI SamOpenGroup (IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG GroupId, OUT PSAM_HANDLE GroupHandle)
 
NTSTATUS NTAPI SamOpenUser (IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG UserId, OUT PSAM_HANDLE UserHandle)
 
NTSTATUS NTAPI SamQueryDisplayInformation (IN SAM_HANDLE DomainHandle, IN DOMAIN_DISPLAY_INFORMATION DisplayInformation, IN ULONG Index, IN ULONG EntryCount, IN ULONG PreferredMaximumLength, OUT PULONG TotalAvailable, OUT PULONG TotalReturned, OUT PULONG ReturnedEntryCount, OUT PVOID *SortedBuffer)
 
NTSTATUS NTAPI SamQueryInformationAlias (IN SAM_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, OUT PVOID *Buffer)
 
NTSTATUS NTAPI SamQueryInformationDomain (IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, OUT PVOID *Buffer)
 
NTSTATUS NTAPI SamQueryInformationGroup (IN SAM_HANDLE GroupHandle, IN GROUP_INFORMATION_CLASS GroupInformationClass, OUT PVOID *Buffer)
 
NTSTATUS NTAPI SamQueryInformationUser (IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, OUT PVOID *Buffer)
 
NTSTATUS NTAPI SamQuerySecurityObject (IN SAM_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
 
NTSTATUS NTAPI SamRemoveMemberFromAlias (IN SAM_HANDLE AliasHandle, IN PSID MemberId)
 
NTSTATUS NTAPI SamRemoveMemberFromForeignDomain (IN SAM_HANDLE DomainHandle, IN PSID MemberId)
 
NTSTATUS NTAPI SamRemoveMemberFromGroup (IN SAM_HANDLE GroupHandle, IN ULONG MemberId)
 
NTSTATUS NTAPI SamRemoveMultipleMembersFromAlias (IN SAM_HANDLE AliasHandle, IN PSID *MemberIds, IN ULONG MemberCount)
 
NTSTATUS NTAPI SamRidToSid (IN SAM_HANDLE ObjectHandle, IN ULONG Rid, OUT PSID *Sid)
 
NTSTATUS NTAPI SamSetInformationAlias (IN SAM_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, IN PVOID Buffer)
 
NTSTATUS NTAPI SamSetInformationDomain (IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, IN PVOID Buffer)
 
NTSTATUS NTAPI SamSetInformationGroup (IN SAM_HANDLE GroupHandle, IN GROUP_INFORMATION_CLASS GroupInformationClass, IN PVOID Buffer)
 
NTSTATUS NTAPI SamSetInformationUser (IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, IN PVOID Buffer)
 
NTSTATUS NTAPI SamSetMemberAttributesOfGroup (IN SAM_HANDLE GroupHandle, IN ULONG MemberId, IN ULONG Attributes)
 
NTSTATUS NTAPI SamSetSecurityObject (IN SAM_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 
NTSTATUS NTAPI SamShutdownSamServer (IN SAM_HANDLE ServerHandle)
 

Macro Definition Documentation

◆ _DOMAIN_PASSWORD_INFORMATION_DEFINED

#define _DOMAIN_PASSWORD_INFORMATION_DEFINED

Definition at line 341 of file ntsam.h.

◆ ALIAS_ADD_MEMBER

#define ALIAS_ADD_MEMBER   0x00000001

Definition at line 9 of file ntsam.h.

◆ ALIAS_ALL_ACCESS

#define ALIAS_ALL_ACCESS
Value:
ALIAS_ADD_MEMBER |\
ALIAS_REMOVE_MEMBER |\
ALIAS_LIST_MEMBERS |\
ALIAS_READ_INFORMATION |\
ALIAS_WRITE_ACCOUNT)
#define STANDARD_RIGHTS_REQUIRED
Definition: nt_native.h:63

Definition at line 26 of file ntsam.h.

◆ ALIAS_EXECUTE

#define ALIAS_EXECUTE
Value:
ALIAS_READ_INFORMATION)
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67

Definition at line 23 of file ntsam.h.

◆ ALIAS_LIST_MEMBERS

#define ALIAS_LIST_MEMBERS   0x00000004

Definition at line 11 of file ntsam.h.

◆ ALIAS_READ

#define ALIAS_READ
Value:
ALIAS_LIST_MEMBERS)
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65

Definition at line 15 of file ntsam.h.

◆ ALIAS_READ_INFORMATION

#define ALIAS_READ_INFORMATION   0x00000008

Definition at line 12 of file ntsam.h.

◆ ALIAS_REMOVE_MEMBER

#define ALIAS_REMOVE_MEMBER   0x00000002

Definition at line 10 of file ntsam.h.

◆ ALIAS_WRITE

#define ALIAS_WRITE
Value:
ALIAS_ADD_MEMBER |\
ALIAS_REMOVE_MEMBER |\
ALIAS_WRITE_ACCOUNT)
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66

Definition at line 18 of file ntsam.h.

◆ ALIAS_WRITE_ACCOUNT

#define ALIAS_WRITE_ACCOUNT   0x00000010

Definition at line 13 of file ntsam.h.

◆ DOMAIN_ADMINISTER_SERVER

#define DOMAIN_ADMINISTER_SERVER   0x00000400

Definition at line 43 of file ntsam.h.

◆ DOMAIN_ALL_ACCESS

#define DOMAIN_ALL_ACCESS
Value:
DOMAIN_READ_PASSWORD_PARAMETERS |\
DOMAIN_WRITE_PASSWORD_PARAMS |\
DOMAIN_READ_OTHER_PARAMETERS |\
DOMAIN_WRITE_OTHER_PARAMETERS |\
DOMAIN_CREATE_USER |\
DOMAIN_CREATE_GROUP |\
DOMAIN_CREATE_ALIAS |\
DOMAIN_GET_ALIAS_MEMBERSHIP |\
DOMAIN_LIST_ACCOUNTS |\
DOMAIN_LOOKUP |\
DOMAIN_ADMINISTER_SERVER)
#define STANDARD_RIGHTS_REQUIRED
Definition: nt_native.h:63

Definition at line 62 of file ntsam.h.

◆ DOMAIN_CREATE_ALIAS

#define DOMAIN_CREATE_ALIAS   0x00000040

Definition at line 39 of file ntsam.h.

◆ DOMAIN_CREATE_GROUP

#define DOMAIN_CREATE_GROUP   0x00000020

Definition at line 38 of file ntsam.h.

◆ DOMAIN_CREATE_USER

#define DOMAIN_CREATE_USER   0x00000010

Definition at line 37 of file ntsam.h.

◆ DOMAIN_EXECUTE

#define DOMAIN_EXECUTE
Value:
DOMAIN_READ_PASSWORD_PARAMETERS |\
DOMAIN_LIST_ACCOUNTS |\
DOMAIN_LOOKUP)
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67

Definition at line 57 of file ntsam.h.

◆ DOMAIN_GET_ALIAS_MEMBERSHIP

#define DOMAIN_GET_ALIAS_MEMBERSHIP   0x00000080

Definition at line 40 of file ntsam.h.

◆ DOMAIN_LIST_ACCOUNTS

#define DOMAIN_LIST_ACCOUNTS   0x00000100

Definition at line 41 of file ntsam.h.

◆ DOMAIN_LOCKOUT_ADMINS

#define DOMAIN_LOCKOUT_ADMINS   0x00000008L

Definition at line 257 of file ntsam.h.

◆ DOMAIN_LOOKUP

#define DOMAIN_LOOKUP   0x00000200

Definition at line 42 of file ntsam.h.

◆ DOMAIN_NO_LM_OWF_CHANGE

#define DOMAIN_NO_LM_OWF_CHANGE   0x00000040L

Definition at line 260 of file ntsam.h.

◆ DOMAIN_PASSWORD_COMPLEX

#define DOMAIN_PASSWORD_COMPLEX   0x00000001L

Definition at line 254 of file ntsam.h.

◆ DOMAIN_PASSWORD_NO_ANON_CHANGE

#define DOMAIN_PASSWORD_NO_ANON_CHANGE   0x00000002L

Definition at line 255 of file ntsam.h.

◆ DOMAIN_PASSWORD_NO_CLEAR_CHANGE

#define DOMAIN_PASSWORD_NO_CLEAR_CHANGE   0x00000004L

Definition at line 256 of file ntsam.h.

◆ DOMAIN_PASSWORD_STORE_CLEARTEXT

#define DOMAIN_PASSWORD_STORE_CLEARTEXT   0x00000010L

Definition at line 258 of file ntsam.h.

◆ DOMAIN_READ

#define DOMAIN_READ
Value:
DOMAIN_READ_OTHER_PARAMETERS |\
DOMAIN_GET_ALIAS_MEMBERSHIP)
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65

Definition at line 45 of file ntsam.h.

◆ DOMAIN_READ_OTHER_PARAMETERS

#define DOMAIN_READ_OTHER_PARAMETERS   0x00000004

Definition at line 35 of file ntsam.h.

◆ DOMAIN_READ_PASSWORD_PARAMETERS

#define DOMAIN_READ_PASSWORD_PARAMETERS   0x00000001

Definition at line 33 of file ntsam.h.

◆ DOMAIN_REFUSE_PASSWORD_CHANGE

#define DOMAIN_REFUSE_PASSWORD_CHANGE   0x00000020L

Definition at line 259 of file ntsam.h.

◆ DOMAIN_WRITE

#define DOMAIN_WRITE
Value:
DOMAIN_WRITE_PASSWORD_PARAMS |\
DOMAIN_WRITE_OTHER_PARAMETERS |\
DOMAIN_CREATE_USER |\
DOMAIN_CREATE_GROUP |\
DOMAIN_CREATE_ALIAS |\
DOMAIN_ADMINISTER_SERVER)
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66

Definition at line 49 of file ntsam.h.

◆ DOMAIN_WRITE_OTHER_PARAMETERS

#define DOMAIN_WRITE_OTHER_PARAMETERS   0x00000008

Definition at line 36 of file ntsam.h.

◆ DOMAIN_WRITE_PASSWORD_PARAMS

#define DOMAIN_WRITE_PASSWORD_PARAMS   0x00000002

Definition at line 34 of file ntsam.h.

◆ GROUP_ADD_MEMBER

#define GROUP_ADD_MEMBER   0x00000004

Definition at line 77 of file ntsam.h.

◆ GROUP_ALL_ACCESS

#define GROUP_ALL_ACCESS
Value:
GROUP_READ_INFORMATION |\
GROUP_WRITE_ACCOUNT |\
GROUP_ADD_MEMBER |\
GROUP_REMOVE_MEMBER |\
GROUP_LIST_MEMBERS)
#define STANDARD_RIGHTS_REQUIRED
Definition: nt_native.h:63

Definition at line 92 of file ntsam.h.

◆ GROUP_EXECUTE

#define GROUP_EXECUTE
Value:
GROUP_READ_INFORMATION)
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67

Definition at line 89 of file ntsam.h.

◆ GROUP_LIST_MEMBERS

#define GROUP_LIST_MEMBERS   0x00000010

Definition at line 79 of file ntsam.h.

◆ GROUP_READ

#define GROUP_READ
Value:
GROUP_LIST_MEMBERS)
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65

Definition at line 81 of file ntsam.h.

◆ GROUP_READ_INFORMATION

#define GROUP_READ_INFORMATION   0x00000001

Definition at line 75 of file ntsam.h.

◆ GROUP_REMOVE_MEMBER

#define GROUP_REMOVE_MEMBER   0x00000008

Definition at line 78 of file ntsam.h.

◆ GROUP_WRITE

#define GROUP_WRITE
Value:
GROUP_WRITE_ACCOUNT |\
GROUP_ADD_MEMBER |\
GROUP_REMOVE_MEMBER)
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66

Definition at line 84 of file ntsam.h.

◆ GROUP_WRITE_ACCOUNT

#define GROUP_WRITE_ACCOUNT   0x00000002

Definition at line 76 of file ntsam.h.

◆ SAM_DAYS_PER_WEEK

#define SAM_DAYS_PER_WEEK   (7)

Definition at line 191 of file ntsam.h.

◆ SAM_HOURS_PER_WEEK

#define SAM_HOURS_PER_WEEK   (24 * SAM_DAYS_PER_WEEK)

Definition at line 192 of file ntsam.h.

◆ SAM_MINUTES_PER_WEEK

#define SAM_MINUTES_PER_WEEK   (60 * SAM_HOURS_PER_WEEK)

Definition at line 193 of file ntsam.h.

◆ SAM_PWD_CHANGE_FAILED_BY_FILTER

#define SAM_PWD_CHANGE_FAILED_BY_FILTER   7

Definition at line 249 of file ntsam.h.

◆ SAM_PWD_CHANGE_FAILURE_REASON_MAX

#define SAM_PWD_CHANGE_FAILURE_REASON_MAX   8

Definition at line 251 of file ntsam.h.

◆ SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD

#define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD   4

Definition at line 246 of file ntsam.h.

◆ SAM_PWD_CHANGE_MACHINE_PASSWORD_NOT_DEFAULT

#define SAM_PWD_CHANGE_MACHINE_PASSWORD_NOT_DEFAULT   6

Definition at line 248 of file ntsam.h.

◆ SAM_PWD_CHANGE_NO_ERROR

#define SAM_PWD_CHANGE_NO_ERROR   0

Definition at line 242 of file ntsam.h.

◆ SAM_PWD_CHANGE_NOT_COMPLEX

#define SAM_PWD_CHANGE_NOT_COMPLEX   5

Definition at line 247 of file ntsam.h.

◆ SAM_PWD_CHANGE_PASSWORD_TOO_LONG

#define SAM_PWD_CHANGE_PASSWORD_TOO_LONG   8

Definition at line 250 of file ntsam.h.

◆ SAM_PWD_CHANGE_PASSWORD_TOO_SHORT

#define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT   1

Definition at line 243 of file ntsam.h.

◆ SAM_PWD_CHANGE_PWD_IN_HISTORY

#define SAM_PWD_CHANGE_PWD_IN_HISTORY   2

Definition at line 244 of file ntsam.h.

◆ SAM_PWD_CHANGE_USERNAME_IN_PASSWORD

#define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD   3

Definition at line 245 of file ntsam.h.

◆ SAM_SERVER_ALL_ACCESS

#define SAM_SERVER_ALL_ACCESS
Value:
SAM_SERVER_CONNECT |\
SAM_SERVER_SHUTDOWN |\
SAM_SERVER_INITIALIZE |\
SAM_SERVER_CREATE_DOMAIN |\
SAM_SERVER_ENUMERATE_DOMAINS |\
SAM_SERVER_LOOKUP_DOMAIN)
#define STANDARD_RIGHTS_REQUIRED
Definition: nt_native.h:63

Definition at line 118 of file ntsam.h.

◆ SAM_SERVER_CONNECT

#define SAM_SERVER_CONNECT   0x00000001

Definition at line 99 of file ntsam.h.

◆ SAM_SERVER_CREATE_DOMAIN

#define SAM_SERVER_CREATE_DOMAIN   0x00000008

Definition at line 102 of file ntsam.h.

◆ SAM_SERVER_ENUMERATE_DOMAINS

#define SAM_SERVER_ENUMERATE_DOMAINS   0x00000010

Definition at line 103 of file ntsam.h.

◆ SAM_SERVER_EXECUTE

#define SAM_SERVER_EXECUTE
Value:
SAM_SERVER_CONNECT |\
SAM_SERVER_LOOKUP_DOMAIN)
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67

Definition at line 114 of file ntsam.h.

◆ SAM_SERVER_INITIALIZE

#define SAM_SERVER_INITIALIZE   0x00000004

Definition at line 101 of file ntsam.h.

◆ SAM_SERVER_LOOKUP_DOMAIN

#define SAM_SERVER_LOOKUP_DOMAIN   0x00000020

Definition at line 104 of file ntsam.h.

◆ SAM_SERVER_READ

#define SAM_SERVER_READ
Value:
SAM_SERVER_ENUMERATE_DOMAINS)
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65

Definition at line 106 of file ntsam.h.

◆ SAM_SERVER_SHUTDOWN

#define SAM_SERVER_SHUTDOWN   0x00000002

Definition at line 100 of file ntsam.h.

◆ SAM_SERVER_WRITE

#define SAM_SERVER_WRITE
Value:
SAM_SERVER_SHUTDOWN |\
SAM_SERVER_INITIALIZE |\
SAM_SERVER_CREATE_DOMAIN)
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66

Definition at line 109 of file ntsam.h.

◆ SAM_SID_COMPATIBILITY_ALL

#define SAM_SID_COMPATIBILITY_ALL   0

Definition at line 700 of file ntsam.h.

◆ SAM_SID_COMPATIBILITY_LAX

#define SAM_SID_COMPATIBILITY_LAX   1

Definition at line 701 of file ntsam.h.

◆ SAM_SID_COMPATIBILITY_STRICT

#define SAM_SID_COMPATIBILITY_STRICT   2

Definition at line 702 of file ntsam.h.

◆ USER_ACCOUNT_AUTO_LOCKED

#define USER_ACCOUNT_AUTO_LOCKED   0x00000400

Definition at line 177 of file ntsam.h.

◆ USER_ACCOUNT_DISABLED

#define USER_ACCOUNT_DISABLED   0x00000001

Definition at line 167 of file ntsam.h.

◆ USER_ALL_ACCESS

#define USER_ALL_ACCESS
Value:
USER_READ_GENERAL |\
USER_READ_PREFERENCES |\
USER_WRITE_PREFERENCES |\
USER_READ_LOGON |\
USER_READ_ACCOUNT |\
USER_WRITE_ACCOUNT |\
USER_CHANGE_PASSWORD |\
USER_FORCE_PASSWORD_CHANGE |\
USER_LIST_GROUPS |\
USER_READ_GROUP_INFORMATION |\
USER_WRITE_GROUP_INFORMATION)
#define STANDARD_RIGHTS_REQUIRED
Definition: nt_native.h:63

Definition at line 153 of file ntsam.h.

◆ USER_ALL_ACCOUNTEXPIRES

#define USER_ALL_ACCOUNTEXPIRES   0x00080000

Definition at line 215 of file ntsam.h.

◆ USER_ALL_ADMINCOMMENT

#define USER_ALL_ADMINCOMMENT   0x00000010

Definition at line 200 of file ntsam.h.

◆ USER_ALL_BADPASSWORDCOUNT

#define USER_ALL_BADPASSWORDCOUNT   0x00004000

Definition at line 210 of file ntsam.h.

◆ USER_ALL_CODEPAGE

#define USER_ALL_CODEPAGE   0x00800000

Definition at line 219 of file ntsam.h.

◆ USER_ALL_COUNTRYCODE

#define USER_ALL_COUNTRYCODE   0x00400000

Definition at line 218 of file ntsam.h.

◆ USER_ALL_FULLNAME

#define USER_ALL_FULLNAME   0x00000002

Definition at line 197 of file ntsam.h.

◆ USER_ALL_HOMEDIRECTORY

#define USER_ALL_HOMEDIRECTORY   0x00000040

Definition at line 202 of file ntsam.h.

◆ USER_ALL_HOMEDIRECTORYDRIVE

#define USER_ALL_HOMEDIRECTORYDRIVE   0x00000080

Definition at line 203 of file ntsam.h.

◆ USER_ALL_LASTLOGOFF

#define USER_ALL_LASTLOGOFF   0x00001000

Definition at line 208 of file ntsam.h.

◆ USER_ALL_LASTLOGON

#define USER_ALL_LASTLOGON   0x00000800

Definition at line 207 of file ntsam.h.

◆ USER_ALL_LMPASSWORDPRESENT

#define USER_ALL_LMPASSWORDPRESENT   0x02000000

Definition at line 221 of file ntsam.h.

◆ USER_ALL_LOGONCOUNT

#define USER_ALL_LOGONCOUNT   0x00008000

Definition at line 211 of file ntsam.h.

◆ USER_ALL_LOGONHOURS

#define USER_ALL_LOGONHOURS   0x00002000

Definition at line 209 of file ntsam.h.

◆ USER_ALL_NTPASSWORDPRESENT

#define USER_ALL_NTPASSWORDPRESENT   0x01000000

Definition at line 220 of file ntsam.h.

◆ USER_ALL_OWFPASSWORD

#define USER_ALL_OWFPASSWORD   0x20000000

Definition at line 225 of file ntsam.h.

◆ USER_ALL_PARAMETERS

#define USER_ALL_PARAMETERS   0x00200000

Definition at line 217 of file ntsam.h.

◆ USER_ALL_PASSWORDCANCHANGE

#define USER_ALL_PASSWORDCANCHANGE   0x00010000

Definition at line 212 of file ntsam.h.

◆ USER_ALL_PASSWORDEXPIRED

#define USER_ALL_PASSWORDEXPIRED   0x08000000

Definition at line 223 of file ntsam.h.

◆ USER_ALL_PASSWORDLASTSET

#define USER_ALL_PASSWORDLASTSET   0x00040000

Definition at line 214 of file ntsam.h.

◆ USER_ALL_PASSWORDMUSTCHANGE

#define USER_ALL_PASSWORDMUSTCHANGE   0x00020000

Definition at line 213 of file ntsam.h.

◆ USER_ALL_PRIMARYGROUPID

#define USER_ALL_PRIMARYGROUPID   0x00000008

Definition at line 199 of file ntsam.h.

◆ USER_ALL_PRIVATEDATA

#define USER_ALL_PRIVATEDATA   0x04000000

Definition at line 222 of file ntsam.h.

◆ USER_ALL_PROFILEPATH

#define USER_ALL_PROFILEPATH   0x00000200

Definition at line 205 of file ntsam.h.

◆ USER_ALL_READ_ACCOUNT_MASK

#define USER_ALL_READ_ACCOUNT_MASK   0x003C0000

Definition at line 230 of file ntsam.h.

◆ USER_ALL_READ_CANT_MASK

#define USER_ALL_READ_CANT_MASK   0xC0000000

Definition at line 233 of file ntsam.h.

◆ USER_ALL_READ_GENERAL_MASK

#define USER_ALL_READ_GENERAL_MASK   0x0000003F

Definition at line 228 of file ntsam.h.

◆ USER_ALL_READ_LOGON_MASK

#define USER_ALL_READ_LOGON_MASK   0x0003FFC0

Definition at line 229 of file ntsam.h.

◆ USER_ALL_READ_PREFERENCES_MASK

#define USER_ALL_READ_PREFERENCES_MASK   0x00C00000

Definition at line 231 of file ntsam.h.

◆ USER_ALL_READ_TRUSTED_MASK

#define USER_ALL_READ_TRUSTED_MASK   0x1F000000

Definition at line 232 of file ntsam.h.

◆ USER_ALL_SCRIPTPATH

#define USER_ALL_SCRIPTPATH   0x00000100

Definition at line 204 of file ntsam.h.

◆ USER_ALL_SECURITYDESCRIPTOR

#define USER_ALL_SECURITYDESCRIPTOR   0x10000000

Definition at line 224 of file ntsam.h.

◆ USER_ALL_UNDEFINED_MASK

#define USER_ALL_UNDEFINED_MASK   0xC0000000

Definition at line 226 of file ntsam.h.

◆ USER_ALL_USERACCOUNTCONTROL

#define USER_ALL_USERACCOUNTCONTROL   0x00100000

Definition at line 216 of file ntsam.h.

◆ USER_ALL_USERCOMMENT

#define USER_ALL_USERCOMMENT   0x00000020

Definition at line 201 of file ntsam.h.

◆ USER_ALL_USERID

#define USER_ALL_USERID   0x00000004

Definition at line 198 of file ntsam.h.

◆ USER_ALL_USERNAME

#define USER_ALL_USERNAME   0x00000001

Definition at line 196 of file ntsam.h.

◆ USER_ALL_WORKSTATIONS

#define USER_ALL_WORKSTATIONS   0x00000400

Definition at line 206 of file ntsam.h.

◆ USER_ALL_WRITE_ACCOUNT_MASK

#define USER_ALL_WRITE_ACCOUNT_MASK   0x003827DB

Definition at line 235 of file ntsam.h.

◆ USER_ALL_WRITE_CANT_MASK

#define USER_ALL_WRITE_CANT_MASK   0xC0030004

Definition at line 239 of file ntsam.h.

◆ USER_ALL_WRITE_FORCE_PASSWORD_CHANGE_MASK

#define USER_ALL_WRITE_FORCE_PASSWORD_CHANGE_MASK   0x0B000000

Definition at line 237 of file ntsam.h.

◆ USER_ALL_WRITE_PREFERENCES_MASK

#define USER_ALL_WRITE_PREFERENCES_MASK   0x00C00020

Definition at line 236 of file ntsam.h.

◆ USER_ALL_WRITE_TRUSTED_MASK

#define USER_ALL_WRITE_TRUSTED_MASK   0x1404D800

Definition at line 238 of file ntsam.h.

◆ USER_CHANGE_PASSWORD

#define USER_CHANGE_PASSWORD   0x00000040

Definition at line 132 of file ntsam.h.

◆ USER_DONT_EXPIRE_PASSWORD

#define USER_DONT_EXPIRE_PASSWORD   0x00000200

Definition at line 176 of file ntsam.h.

◆ USER_DONT_REQUIRE_PREAUTH

#define USER_DONT_REQUIRE_PREAUTH   0x00010000

Definition at line 183 of file ntsam.h.

◆ USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED

#define USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED   0x00000800

Definition at line 178 of file ntsam.h.

◆ USER_EXECUTE

#define USER_EXECUTE
Value:
USER_READ_GENERAL |\
USER_CHANGE_PASSWORD)
#define STANDARD_RIGHTS_EXECUTE
Definition: nt_native.h:67

Definition at line 149 of file ntsam.h.

◆ USER_FORCE_PASSWORD_CHANGE

#define USER_FORCE_PASSWORD_CHANGE   0x00000080

Definition at line 133 of file ntsam.h.

◆ USER_HOME_DIRECTORY_REQUIRED

#define USER_HOME_DIRECTORY_REQUIRED   0x00000002

Definition at line 168 of file ntsam.h.

◆ USER_INTERDOMAIN_TRUST_ACCOUNT

#define USER_INTERDOMAIN_TRUST_ACCOUNT   0x00000040

Definition at line 173 of file ntsam.h.

◆ USER_LIST_GROUPS

#define USER_LIST_GROUPS   0x00000100

Definition at line 134 of file ntsam.h.

◆ USER_MNS_LOGON_ACCOUNT

#define USER_MNS_LOGON_ACCOUNT   0x00000020

Definition at line 172 of file ntsam.h.

◆ USER_NO_AUTH_DATA_REQUIRED

#define USER_NO_AUTH_DATA_REQUIRED   0x00080000

Definition at line 186 of file ntsam.h.

◆ USER_NORMAL_ACCOUNT

#define USER_NORMAL_ACCOUNT   0x00000010

Definition at line 171 of file ntsam.h.

◆ USER_NOT_DELEGATED

#define USER_NOT_DELEGATED   0x00004000

Definition at line 181 of file ntsam.h.

◆ USER_PARTIAL_SECRETS_ACCOUNT

#define USER_PARTIAL_SECRETS_ACCOUNT   0x00100000

Definition at line 187 of file ntsam.h.

◆ USER_PASSWORD_EXPIRED

#define USER_PASSWORD_EXPIRED   0x00020000

Definition at line 184 of file ntsam.h.

◆ USER_PASSWORD_NOT_REQUIRED

#define USER_PASSWORD_NOT_REQUIRED   0x00000004

Definition at line 169 of file ntsam.h.

◆ USER_READ

#define USER_READ
Value:
USER_READ_PREFERENCES |\
USER_READ_LOGON |\
USER_READ_ACCOUNT |\
USER_LIST_GROUPS |\
USER_READ_GROUP_INFORMATION)
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65

Definition at line 138 of file ntsam.h.

◆ USER_READ_ACCOUNT

#define USER_READ_ACCOUNT   0x00000010

Definition at line 130 of file ntsam.h.

◆ USER_READ_GENERAL

#define USER_READ_GENERAL   0x00000001

Definition at line 126 of file ntsam.h.

◆ USER_READ_GROUP_INFORMATION

#define USER_READ_GROUP_INFORMATION   0x00000200

Definition at line 135 of file ntsam.h.

◆ USER_READ_LOGON

#define USER_READ_LOGON   0x00000008

Definition at line 129 of file ntsam.h.

◆ USER_READ_PREFERENCES

#define USER_READ_PREFERENCES   0x00000002

Definition at line 127 of file ntsam.h.

◆ USER_SERVER_TRUST_ACCOUNT

#define USER_SERVER_TRUST_ACCOUNT   0x00000100

Definition at line 175 of file ntsam.h.

◆ USER_SMARTCARD_REQUIRED

#define USER_SMARTCARD_REQUIRED   0x00001000

Definition at line 179 of file ntsam.h.

◆ USER_TEMP_DUPLICATE_ACCOUNT

#define USER_TEMP_DUPLICATE_ACCOUNT   0x00000008

Definition at line 170 of file ntsam.h.

◆ USER_TRUSTED_FOR_DELEGATION

#define USER_TRUSTED_FOR_DELEGATION   0x00002000

Definition at line 180 of file ntsam.h.

◆ USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION

#define USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION   0x00040000

Definition at line 185 of file ntsam.h.

◆ USER_USE_AES_KEYS

#define USER_USE_AES_KEYS   0x00200000

Definition at line 188 of file ntsam.h.

◆ USER_USE_DES_KEY_ONLY

#define USER_USE_DES_KEY_ONLY   0x00008000

Definition at line 182 of file ntsam.h.

◆ USER_WORKSTATION_TRUST_ACCOUNT

#define USER_WORKSTATION_TRUST_ACCOUNT   0x00000080

Definition at line 174 of file ntsam.h.

◆ USER_WRITE

#define USER_WRITE
Value:
USER_WRITE_PREFERENCES |\
USER_CHANGE_PASSWORD)
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66

Definition at line 145 of file ntsam.h.

◆ USER_WRITE_ACCOUNT

#define USER_WRITE_ACCOUNT   0x00000020

Definition at line 131 of file ntsam.h.

◆ USER_WRITE_GROUP_INFORMATION

#define USER_WRITE_GROUP_INFORMATION   0x00000400

Definition at line 136 of file ntsam.h.

◆ USER_WRITE_PREFERENCES

#define USER_WRITE_PREFERENCES   0x00000004

Definition at line 128 of file ntsam.h.

Typedef Documentation

◆ ALIAS_ADM_COMMENT_INFORMATION

◆ ALIAS_GENERAL_INFORMATION

◆ ALIAS_INFORMATION_CLASS

◆ ALIAS_NAME_INFORMATION

◆ DOMAIN_DISPLAY_INFORMATION

◆ DOMAIN_GENERAL_INFORMATION

◆ DOMAIN_GENERAL_INFORMATION2

◆ DOMAIN_INFORMATION_CLASS

◆ DOMAIN_LOCKOUT_INFORMATION

◆ DOMAIN_LOGOFF_INFORMATION

◆ DOMAIN_MODIFIED_INFORMATION

◆ DOMAIN_MODIFIED_INFORMATION2

◆ DOMAIN_NAME_INFORMATION

◆ DOMAIN_OEM_INFORMATION

◆ DOMAIN_PASSWORD_INFORMATION

◆ DOMAIN_REPLICATION_INFORMATION

◆ DOMAIN_SERVER_ENABLE_STATE

◆ DOMAIN_SERVER_ROLE

◆ DOMAIN_SERVER_ROLE_INFORMATION

◆ DOMAIN_STATE_INFORMATION

◆ DOMAIN_UAS_INFORMATION

◆ GROUP_ADM_COMMENT_INFORMATION

◆ GROUP_ATTRIBUTE_INFORMATION

◆ GROUP_GENERAL_INFORMATION

◆ GROUP_INFORMATION_CLASS

◆ GROUP_MEMBERSHIP

◆ GROUP_NAME_INFORMATION

◆ LOGON_HOURS

◆ PALIAS_ADM_COMMENT_INFORMATION

◆ PALIAS_GENERAL_INFORMATION

◆ PALIAS_INFORMATION_CLASS

◆ PALIAS_NAME_INFORMATION

◆ PDOMAIN_DISPLAY_INFORMATION

◆ PDOMAIN_GENERAL_INFORMATION

◆ PDOMAIN_GENERAL_INFORMATION2

◆ PDOMAIN_LOCKOUT_INFORMATION

◆ PDOMAIN_LOGOFF_INFORMATION

◆ PDOMAIN_MODIFIED_INFORMATION

◆ PDOMAIN_MODIFIED_INFORMATION2

◆ PDOMAIN_NAME_INFORMATION

◆ PDOMAIN_OEM_INFORMATION

◆ PDOMAIN_PASSWORD_INFORMATION

◆ PDOMAIN_REPLICATION_INFORMATION

◆ PDOMAIN_SERVER_ENABLE_STATE

◆ PDOMAIN_SERVER_ROLE

◆ PDOMAIN_SERVER_ROLE_INFORMATION

◆ PDOMAIN_STATE_INFORMATION

◆ PGROUP_ADM_COMMENT_INFORMATION

◆ PGROUP_ATTRIBUTE_INFORMATION

◆ PGROUP_GENERAL_INFORMATION

◆ PGROUP_MEMBERSHIP

◆ PGROUP_NAME_INFORMATION

◆ PLOGON_HOURS

◆ PSAM_ENUMERATE_HANDLE

Definition at line 263 of file ntsam.h.

◆ PSAM_HANDLE

typedef PVOID * PSAM_HANDLE

Definition at line 262 of file ntsam.h.

◆ PSAM_RID_ENUMERATION

◆ PSAM_SID_ENUMERATION

◆ PSR_SECURITY_DESCRIPTOR

◆ PUSER_ACCOUNT_INFORMATION

◆ PUSER_ACCOUNT_NAME_INFORMATION

◆ PUSER_ADMIN_COMMENT_INFORMATION

◆ PUSER_ALL_INFORMATION

◆ PUSER_CONTROL_INFORMATION

◆ PUSER_EXPIRES_INFORMATION

◆ PUSER_FULL_NAME_INFORMATION

◆ PUSER_GENERAL_INFORMATION

◆ PUSER_HOME_INFORMATION

◆ PUSER_INFORMATION_CLASS

◆ PUSER_LOGON_HOURS_INFORMATION

◆ PUSER_LOGON_INFORMATION

◆ PUSER_NAME_INFORMATION

◆ PUSER_PARAMETERS_INFORMATION

◆ PUSER_PREFERENCES_INFORMATION

◆ PUSER_PRIMARY_GROUP_INFORMATION

◆ PUSER_PROFILE_INFORMATION

◆ PUSER_PWD_CHANGE_FAILURE_INFORMATION

◆ PUSER_SCRIPT_INFORMATION

◆ PUSER_SET_PASSWORD_INFORMATION

◆ PUSER_WORKSTATIONS_INFORMATION

◆ SAM_ENUMERATE_HANDLE

Definition at line 263 of file ntsam.h.

◆ SAM_HANDLE

typedef PVOID SAM_HANDLE

Definition at line 262 of file ntsam.h.

◆ SAM_RID_ENUMERATION

◆ SAM_SID_ENUMERATION

◆ SR_SECURITY_DESCRIPTOR

◆ USER_ACCOUNT_INFORMATION

◆ USER_ACCOUNT_NAME_INFORMATION

◆ USER_ADMIN_COMMENT_INFORMATION

◆ USER_ALL_INFORMATION

◆ USER_CONTROL_INFORMATION

◆ USER_EXPIRES_INFORMATION

◆ USER_FULL_NAME_INFORMATION

◆ USER_GENERAL_INFORMATION

◆ USER_HOME_INFORMATION

◆ USER_INFORMATION_CLASS

◆ USER_LOGON_HOURS_INFORMATION

◆ USER_LOGON_INFORMATION

◆ USER_NAME_INFORMATION

◆ USER_PARAMETERS_INFORMATION

◆ USER_PREFERENCES_INFORMATION

◆ USER_PRIMARY_GROUP_INFORMATION

◆ USER_PROFILE_INFORMATION

◆ USER_PWD_CHANGE_FAILURE_INFORMATION

◆ USER_SCRIPT_INFORMATION

◆ USER_SET_PASSWORD_INFORMATION

◆ USER_WORKSTATIONS_INFORMATION

Enumeration Type Documentation

◆ _ALIAS_INFORMATION_CLASS

Enumerator
AliasGeneralInformation 
AliasNameInformation 
AliasAdminCommentInformation 
AliasGeneralInformation 
AliasNameInformation 
AliasAdminCommentInformation 

Definition at line 277 of file ntsam.h.

278 {
enum _ALIAS_INFORMATION_CLASS ALIAS_INFORMATION_CLASS
enum _ALIAS_INFORMATION_CLASS * PALIAS_INFORMATION_CLASS

◆ _DOMAIN_DISPLAY_INFORMATION

Enumerator
DomainDisplayUser 
DomainDisplayMachine 
DomainDisplayGroup 
DomainDisplayOemUser 
DomainDisplayOemGroup 
DomainDisplayServer 
DomainDisplayUser 
DomainDisplayMachine 
DomainDisplayGroup 
DomainDisplayOemUser 
DomainDisplayOemGroup 
DomainDisplayServer 

Definition at line 301 of file ntsam.h.

302 {
303  DomainDisplayUser = 1,
enum _DOMAIN_DISPLAY_INFORMATION DOMAIN_DISPLAY_INFORMATION
enum _DOMAIN_DISPLAY_INFORMATION * PDOMAIN_DISPLAY_INFORMATION

◆ _DOMAIN_INFORMATION_CLASS

Enumerator
DomainPasswordInformation 
DomainGeneralInformation 
DomainLogoffInformation 
DomainOemInformation 
DomainNameInformation 
DomainReplicationInformation 
DomainServerRoleInformation 
DomainModifiedInformation 
DomainStateInformation 
DomainUasInformation 
DomainGeneralInformation2 
DomainLockoutInformation 
DomainModifiedInformation2 
DomainPasswordInformation 
DomainGeneralInformation 
DomainLogoffInformation 
DomainOemInformation 
DomainNameInformation 
DomainReplicationInformation 
DomainServerRoleInformation 
DomainModifiedInformation 
DomainStateInformation 
DomainGeneralInformation2 
DomainLockoutInformation 
DomainModifiedInformation2 

Definition at line 311 of file ntsam.h.

◆ _DOMAIN_SERVER_ENABLE_STATE

Enumerator
DomainServerEnabled 
DomainServerDisabled 
DomainServerEnabled 
DomainServerDisabled 

Definition at line 328 of file ntsam.h.

329 {
enum _DOMAIN_SERVER_ENABLE_STATE * PDOMAIN_SERVER_ENABLE_STATE
enum _DOMAIN_SERVER_ENABLE_STATE DOMAIN_SERVER_ENABLE_STATE

◆ _DOMAIN_SERVER_ROLE

Enumerator
DomainServerRoleBackup 
DomainServerRolePrimary 
DomainServerRoleBackup 
DomainServerRolePrimary 

Definition at line 334 of file ntsam.h.

335 {
enum _DOMAIN_SERVER_ROLE DOMAIN_SERVER_ROLE
enum _DOMAIN_SERVER_ROLE * PDOMAIN_SERVER_ROLE

◆ _GROUP_INFORMATION_CLASS

Enumerator
GroupGeneralInformation 
GroupNameInformation 
GroupAttributeInformation 
GroupAdminCommentInformation 
GroupReplicationInformation 
GroupGeneralInformation 
GroupNameInformation 
GroupAttributeInformation 
GroupAdminCommentInformation 
GroupReplicationInformation 

Definition at line 434 of file ntsam.h.

◆ _USER_INFORMATION_CLASS

Enumerator
UserGeneralInformation 
UserPreferencesInformation 
UserLogonInformation 
UserLogonHoursInformation 
UserAccountInformation 
UserNameInformation 
UserAccountNameInformation 
UserFullNameInformation 
UserPrimaryGroupInformation 
UserHomeInformation 
UserScriptInformation 
UserProfileInformation 
UserAdminCommentInformation 
UserWorkStationsInformation 
UserSetPasswordInformation 
UserControlInformation 
UserExpiresInformation 
UserInternal1Information 
UserInternal2Information 
UserParametersInformation 
UserAllInformation 
UserInternal3Information 
UserInternal4Information 
UserInternal5Information 
UserInternal4InformationNew 
UserInternal5InformationNew 
UserInternal6Information 
UserExtendedInformation 
UserLogonUIInformation 
UserGeneralInformation 
UserPreferencesInformation 
UserLogonInformation 
UserLogonHoursInformation 
UserAccountInformation 
UserNameInformation 
UserAccountNameInformation 
UserFullNameInformation 
UserPrimaryGroupInformation 
UserHomeInformation 
UserScriptInformation 
UserProfileInformation 
UserAdminCommentInformation 
UserWorkStationsInformation 
UserSetPasswordInformation 
UserControlInformation 
UserExpiresInformation 
UserInternal1Information 
UserInternal2Information 
UserParametersInformation 
UserAllInformation 
UserInternal3Information 
UserInternal4Information 
UserInternal5Information 
UserInternal4InformationNew 
UserInternal5InformationNew 
UserInternal6Information 
UserExtendedInformation 
UserLogonUIInformation 

Definition at line 484 of file ntsam.h.

485 {
enum _USER_INFORMATION_CLASS * PUSER_INFORMATION_CLASS
enum _USER_INFORMATION_CLASS USER_INFORMATION_CLASS

Function Documentation

◆ SamAddMemberToAlias()

NTSTATUS NTAPI SamAddMemberToAlias ( IN SAM_HANDLE  AliasHandle,
IN PSID  MemberId 
)

Definition at line 214 of file samlib.c.

216 {
218 
219  TRACE("SamAddMemberToAlias(%p %p)\n",
220  AliasHandle, MemberId);
221 
223  {
225  (PRPC_SID)MemberId);
226  }
228  {
230  }
231  RpcEndExcept;
232 
233  return Status;
234 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
NTSTATUS NTAPI SamrAddMemberToAlias(IN SAMPR_HANDLE AliasHandle, IN PRPC_SID MemberId)
Definition: samrpc.c:5374
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetLocalGroupAddMembers().

◆ SamAddMemberToGroup()

NTSTATUS NTAPI SamAddMemberToGroup ( IN SAM_HANDLE  GroupHandle,
IN ULONG  MemberId,
IN ULONG  Attributes 
)

Definition at line 239 of file samlib.c.

242 {
244 
245  TRACE("SamAddMemberToGroup(%p %lu %lx)\n",
246  GroupHandle, MemberId, Attributes);
247 
249  {
251  MemberId,
252  Attributes);
253  }
255  {
257  }
258  RpcEndExcept;
259 
260  return Status;
261 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI SamrAddMemberToGroup(IN SAMPR_HANDLE GroupHandle, IN unsigned long MemberId, IN unsigned long Attributes)
Definition: samrpc.c:4564
Status
Definition: gdiplustypes.h:24
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupAddUser(), and NetGroupSetUsers().

◆ SamAddMultipleMembersToAlias()

NTSTATUS NTAPI SamAddMultipleMembersToAlias ( IN SAM_HANDLE  AliasHandle,
IN PSID MemberIds,
IN ULONG  MemberCount 
)

Definition at line 266 of file samlib.c.

269 {
272 
273  TRACE("SamAddMultipleMembersToAlias(%p %p %lu)\n",
274  AliasHandle, MemberIds, MemberCount);
275 
276  if (MemberIds == NULL)
278 
279  Buffer.Count = MemberCount;
280  Buffer.Sids = (PSAMPR_SID_INFORMATION)MemberIds;
281 
283  {
285  &Buffer);
286  }
288  {
290  }
291  RpcEndExcept;
292 
293  return Status;
294 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI SamrAddMultipleMembersToAlias(IN SAMPR_HANDLE AliasHandle, IN PSAMPR_PSID_ARRAY MembersBuffer)
Definition: samrpc.c:9423
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:462
Definition: bufpool.h:45
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
struct _SAMPR_SID_INFORMATION * PSAMPR_SID_INFORMATION
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

◆ SamChangePasswordUser()

NTSTATUS NTAPI SamChangePasswordUser ( IN SAM_HANDLE  UserHandle,
IN PUNICODE_STRING  OldPassword,
IN PUNICODE_STRING  NewPassword 
)

Definition at line 299 of file samlib.c.

302 {
303  NT_OWF_PASSWORD OldNtPassword;
304  NT_OWF_PASSWORD NewNtPassword;
305  LM_OWF_PASSWORD OldLmPassword;
306  LM_OWF_PASSWORD NewLmPassword;
307  OEM_STRING LmPwdString;
308  CHAR LmPwdBuffer[15];
309  BOOLEAN OldLmPasswordPresent = FALSE;
310  BOOLEAN NewLmPasswordPresent = FALSE;
312 
313  ENCRYPTED_LM_OWF_PASSWORD OldLmEncryptedWithNewLm;
314  ENCRYPTED_LM_OWF_PASSWORD NewLmEncryptedWithOldLm;
315  ENCRYPTED_NT_OWF_PASSWORD OldNtEncryptedWithNewNt;
316  ENCRYPTED_NT_OWF_PASSWORD NewNtEncryptedWithOldNt;
317  PENCRYPTED_LM_OWF_PASSWORD pOldLmEncryptedWithNewLm = NULL;
318  PENCRYPTED_LM_OWF_PASSWORD pNewLmEncryptedWithOldLm = NULL;
319 
320  /* Calculate the NT hash for the old password */
321  Status = SystemFunction007(OldPassword,
322  (LPBYTE)&OldNtPassword);
323  if (!NT_SUCCESS(Status))
324  {
325  TRACE("SystemFunction007 failed (Status 0x%08lx)\n", Status);
326  return Status;
327  }
328 
329  /* Calculate the NT hash for the new password */
330  Status = SystemFunction007(NewPassword,
331  (LPBYTE)&NewNtPassword);
332  if (!NT_SUCCESS(Status))
333  {
334  TRACE("SystemFunction007 failed (Status 0x%08lx)\n", Status);
335  return Status;
336  }
337 
338  /* Calculate the LM password and hash for the old password */
339  LmPwdString.Length = 15;
340  LmPwdString.MaximumLength = 15;
341  LmPwdString.Buffer = LmPwdBuffer;
342  ZeroMemory(LmPwdString.Buffer, LmPwdString.MaximumLength);
343 
345  OldPassword,
346  FALSE);
347  if (NT_SUCCESS(Status))
348  {
349  /* Calculate the LM hash value of the password */
350  Status = SystemFunction006(LmPwdString.Buffer,
351  (LPSTR)&OldLmPassword);
352  if (NT_SUCCESS(Status))
353  {
354  OldLmPasswordPresent = TRUE;
355  }
356  }
357 
358  /* Calculate the LM password and hash for the new password */
359  LmPwdString.Length = 15;
360  LmPwdString.MaximumLength = 15;
361  LmPwdString.Buffer = LmPwdBuffer;
362  ZeroMemory(LmPwdString.Buffer, LmPwdString.MaximumLength);
363 
365  NewPassword,
366  FALSE);
367  if (NT_SUCCESS(Status))
368  {
369  /* Calculate the LM hash value of the password */
370  Status = SystemFunction006(LmPwdString.Buffer,
371  (LPSTR)&NewLmPassword);
372  if (NT_SUCCESS(Status))
373  {
374  NewLmPasswordPresent = TRUE;
375  }
376  }
377 
378  if (OldLmPasswordPresent && NewLmPasswordPresent)
379  {
380  /* Encrypt the old LM hash with the new LM hash */
381  Status = SystemFunction012((const BYTE *)&OldLmPassword,
382  (const BYTE *)&NewLmPassword,
383  (LPBYTE)&OldLmEncryptedWithNewLm);
384  if (!NT_SUCCESS(Status))
385  {
386  TRACE("SystemFunction012 failed (Status 0x%08lx)\n", Status);
387  return Status;
388  }
389 
390  /* Encrypt the new LM hash with the old LM hash */
391  Status = SystemFunction012((const BYTE *)&NewLmPassword,
392  (const BYTE *)&OldLmPassword,
393  (LPBYTE)&NewLmEncryptedWithOldLm);
394  if (!NT_SUCCESS(Status))
395  {
396  TRACE("SystemFunction012 failed (Status 0x%08lx)\n", Status);
397  return Status;
398  }
399 
400  pOldLmEncryptedWithNewLm = &OldLmEncryptedWithNewLm;
401  pNewLmEncryptedWithOldLm = &NewLmEncryptedWithOldLm;
402  }
403 
404  /* Encrypt the old NT hash with the new NT hash */
405  Status = SystemFunction012((const BYTE *)&OldNtPassword,
406  (const BYTE *)&NewNtPassword,
407  (LPBYTE)&OldNtEncryptedWithNewNt);
408  if (!NT_SUCCESS(Status))
409  {
410  TRACE("SystemFunction012 failed (Status 0x%08lx)\n", Status);
411  return Status;
412  }
413 
414  /* Encrypt the new NT hash with the old NT hash */
415  Status = SystemFunction012((const BYTE *)&NewNtPassword,
416  (const BYTE *)&OldNtPassword,
417  (LPBYTE)&NewNtEncryptedWithOldNt);
418  if (!NT_SUCCESS(Status))
419  {
420  TRACE("SystemFunction012 failed (Status 0x%08lx)\n", Status);
421  return Status;
422  }
423 
425  {
427  OldLmPasswordPresent && NewLmPasswordPresent,
428  pOldLmEncryptedWithNewLm,
429  pNewLmEncryptedWithOldLm,
430  TRUE,
431  &OldNtEncryptedWithNewNt,
432  &NewNtEncryptedWithOldNt,
433  FALSE,
434  NULL,
435  FALSE,
436  NULL);
437  }
439  {
441  }
442  RpcEndExcept;
443 
444  return Status;
445 }
#define RpcEndExcept
Definition: rpc.h:128
#define TRUE
Definition: types.h:120
char CHAR
Definition: xmlstorage.h:175
LONG NTSTATUS
Definition: precomp.h:26
#define ZeroMemory
Definition: winbase.h:1635
NTSTATUS NTAPI SamrChangePasswordUser(IN SAMPR_HANDLE UserHandle, IN unsigned char LmPresent, IN PENCRYPTED_LM_OWF_PASSWORD OldLmEncryptedWithNewLm, IN PENCRYPTED_LM_OWF_PASSWORD NewLmEncryptedWithOldLm, IN unsigned char NtPresent, IN PENCRYPTED_NT_OWF_PASSWORD OldNtEncryptedWithNewNt, IN PENCRYPTED_NT_OWF_PASSWORD NewNtEncryptedWithOldNt, IN unsigned char NtCrossEncryptionPresent, IN PENCRYPTED_NT_OWF_PASSWORD NewNtEncryptedWithNewLm, IN unsigned char LmCrossEncryptionPresent, IN PENCRYPTED_LM_OWF_PASSWORD NewLmEncryptedWithNewNt)
Definition: samrpc.c:8324
NTSTATUS WINAPI SystemFunction006(LPCSTR password, LPSTR hash)
Definition: crypt_lmhash.c:53
NTSTATUS WINAPI SystemFunction007(PUNICODE_STRING string, LPBYTE hash)
STRING OEM_STRING
Definition: umtypes.h:203
char * LPSTR
Definition: xmlstorage.h:182
unsigned char * LPBYTE
Definition: typedefs.h:52
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
unsigned char BYTE
Definition: mem.h:68
Status
Definition: gdiplustypes.h:24
NTSTATUS WINAPI SystemFunction012(const BYTE *in, const BYTE *key, LPBYTE out)
Definition: sysfunc.c:353
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

◆ SamChangePasswordUser2()

NTSTATUS NTAPI SamChangePasswordUser2 ( IN PUNICODE_STRING  ServerName,
IN PUNICODE_STRING  UserName,
IN PUNICODE_STRING  OldPassword,
IN PUNICODE_STRING  NewPassword 
)

Definition at line 450 of file samlib.c.

454 {
456  return STATUS_NOT_IMPLEMENTED;
457 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114

◆ SamChangePasswordUser3()

NTSTATUS NTAPI SamChangePasswordUser3 ( IN PUNICODE_STRING  ServerName,
IN PUNICODE_STRING  UserName,
IN PUNICODE_STRING  OldPassword,
IN PUNICODE_STRING  NewPassword,
OUT PDOMAIN_PASSWORD_INFORMATION EffectivePasswordPolicy,
OUT PUSER_PWD_CHANGE_FAILURE_INFORMATION PasswordChangeFailureInfo 
)

Definition at line 462 of file samlib.c.

468 {
470  return STATUS_NOT_IMPLEMENTED;
471 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114

◆ SamCloseHandle()

NTSTATUS NTAPI SamCloseHandle ( IN SAM_HANDLE  SamHandle)

Definition at line 476 of file samlib.c.

477 {
479 
480  TRACE("SamCloseHandle(%p)\n", SamHandle);
481 
483  {
484  Status = SamrCloseHandle((SAMPR_HANDLE *)&SamHandle);
485  }
487  {
489  }
490  RpcEndExcept;
491 
492  return Status;
493 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
NTSTATUS __stdcall SamrCloseHandle(SAMPR_HANDLE *SamHandle)
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGetDisplayInformationIndex(), NetGroupAdd(), NetGroupAddUser(), NetGroupDel(), NetGroupDelUser(), NetGroupEnum(), NetGroupGetInfo(), NetGroupGetUsers(), NetGroupSetInfo(), NetGroupSetUsers(), NetLocalGroupAdd(), NetLocalGroupAddMembers(), NetLocalGroupDel(), NetLocalGroupDelMembers(), NetLocalGroupEnum(), NetLocalGroupGetInfo(), NetLocalGroupGetMembers(), NetLocalGroupSetInfo(), NetQueryDisplayInformation(), NetUserAdd(), NetUserDel(), NetUserEnum(), NetUserGetGroups(), NetUserGetInfo(), NetUserGetLocalGroups(), NetUserModalsGet(), NetUserSetInfo(), SetAccountsDomainSid(), and SetAdministratorPassword().

◆ SamConnect()

NTSTATUS NTAPI SamConnect ( IN OUT PUNICODE_STRING ServerName  OPTIONAL,
OUT PSAM_HANDLE  ServerHandle,
IN ACCESS_MASK  DesiredAccess,
IN POBJECT_ATTRIBUTES  ObjectAttributes 
)

Definition at line 498 of file samlib.c.

502 {
504 
505  TRACE("SamConnect(%p %p 0x%08x %p)\n",
506  ServerName, ServerHandle, DesiredAccess, ObjectAttributes);
507 
509  {
510  Status = SamrConnect((PSAMPR_SERVER_NAME)ServerName,
511  (SAMPR_HANDLE *)ServerHandle,
512  DesiredAccess);
513  }
515  {
517  }
518  RpcEndExcept;
519 
520  return Status;
521 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define RpcEndExcept
Definition: rpc.h:128
wchar_t * PSAMPR_SERVER_NAME
Definition: authpackage.c:112
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI SamrConnect(IN PSAMPR_SERVER_NAME ServerName, OUT SAMPR_HANDLE *ServerHandle, IN ACCESS_MASK DesiredAccess)
Definition: samrpc.c:134
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGetDisplayInformationIndex(), NetGroupAdd(), NetGroupAddUser(), NetGroupDel(), NetGroupDelUser(), NetGroupEnum(), NetGroupGetInfo(), NetGroupGetUsers(), NetGroupSetInfo(), NetGroupSetUsers(), NetLocalGroupAdd(), NetLocalGroupAddMembers(), NetLocalGroupDel(), NetLocalGroupDelMembers(), NetLocalGroupEnum(), NetLocalGroupGetInfo(), NetLocalGroupGetMembers(), NetLocalGroupSetInfo(), NetQueryDisplayInformation(), NetUserAdd(), NetUserDel(), NetUserEnum(), NetUserGetGroups(), NetUserGetInfo(), NetUserGetLocalGroups(), NetUserModalsGet(), NetUserSetInfo(), SetAccountsDomainSid(), and SetAdministratorPassword().

◆ SamCreateAliasInDomain()

NTSTATUS NTAPI SamCreateAliasInDomain ( IN SAM_HANDLE  DomainHandle,
IN PUNICODE_STRING  AccountName,
IN ACCESS_MASK  DesiredAccess,
OUT PSAM_HANDLE  AliasHandle,
OUT PULONG  RelativeId 
)

Definition at line 526 of file samlib.c.

531 {
533 
534  TRACE("SamCreateAliasInDomain(%p %p 0x%08x %p %p)\n",
535  DomainHandle, AccountName, DesiredAccess, AliasHandle, RelativeId);
536 
537  *AliasHandle = NULL;
538  *RelativeId = 0;
539 
541  {
543  (PRPC_UNICODE_STRING)AccountName,
545  (SAMPR_HANDLE *)AliasHandle,
546  RelativeId);
547  }
549  {
551  }
552  RpcEndExcept;
553 
554  return Status;
555 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
NTSTATUS NTAPI SamrCreateAliasInDomain(IN SAMPR_HANDLE DomainHandle, IN PRPC_UNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT SAMPR_HANDLE *AliasHandle, OUT unsigned long *RelativeId)
Definition: samrpc.c:3006
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetLocalGroupAdd().

◆ SamCreateGroupInDomain()

NTSTATUS NTAPI SamCreateGroupInDomain ( IN SAM_HANDLE  DomainHandle,
IN PUNICODE_STRING  AccountName,
IN ACCESS_MASK  DesiredAccess,
OUT PSAM_HANDLE  GroupHandle,
OUT PULONG  RelativeId 
)

Definition at line 560 of file samlib.c.

565 {
567 
568  TRACE("SamCreateGroupInDomain(%p %p 0x%08x %p %p)\n",
569  DomainHandle, AccountName, DesiredAccess, GroupHandle, RelativeId);
570 
571  *GroupHandle = NULL;
572  *RelativeId = 0;
573 
575  {
577  (PRPC_UNICODE_STRING)AccountName,
579  (SAMPR_HANDLE *)GroupHandle,
580  RelativeId);
581  }
583  {
585  }
586  RpcEndExcept;
587 
588  return Status;
589 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI SamrCreateGroupInDomain(IN SAMPR_HANDLE DomainHandle, IN PRPC_UNICODE_STRING Name, IN ACCESS_MASK DesiredAccess, OUT SAMPR_HANDLE *GroupHandle, OUT unsigned long *RelativeId)
Definition: samrpc.c:1997
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupAdd().

◆ SamCreateUser2InDomain()

NTSTATUS NTAPI SamCreateUser2InDomain ( IN SAM_HANDLE  DomainHandle,
IN PUNICODE_STRING  AccountName,
IN ULONG  AccountType,
IN ACCESS_MASK  DesiredAccess,
OUT PSAM_HANDLE  UserHandle,
OUT PULONG  GrantedAccess,
OUT PULONG  RelativeId 
)

Definition at line 594 of file samlib.c.

601 {
603 
604  TRACE("SamCreateUser2InDomain(%p %p %lu 0x%08x %p %p %p)\n",
605  DomainHandle, AccountName, AccountType, DesiredAccess,
606  UserHandle, GrantedAccess, RelativeId);
607 
608  *UserHandle = NULL;
609  *RelativeId = 0;
610 
612  {
614  (PRPC_UNICODE_STRING)AccountName,
615  AccountType,
617  (SAMPR_HANDLE *)UserHandle,
619  RelativeId);
620 
621  }
623  {
625  }
626  RpcEndExcept;
627 
628  return Status;
629 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
NTSTATUS NTAPI SamrCreateUser2InDomain(IN SAMPR_HANDLE DomainHandle, IN PRPC_UNICODE_STRING Name, IN unsigned long AccountType, IN ACCESS_MASK DesiredAccess, OUT SAMPR_HANDLE *UserHandle, OUT unsigned long *GrantedAccess, OUT unsigned long *RelativeId)
Definition: samrpc.c:8980
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
Definition: sefuncs.h:13
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetUserAdd().

◆ SamCreateUserInDomain()

NTSTATUS NTAPI SamCreateUserInDomain ( IN SAM_HANDLE  DomainHandle,
IN PUNICODE_STRING  AccountName,
IN ACCESS_MASK  DesiredAccess,
OUT PSAM_HANDLE  UserHandle,
OUT PULONG  RelativeId 
)

Definition at line 634 of file samlib.c.

639 {
641 
642  TRACE("SamCreateUserInDomain(%p %p 0x%08x %p %p)\n",
643  DomainHandle, AccountName, DesiredAccess, UserHandle, RelativeId);
644 
645  *UserHandle = NULL;
646  *RelativeId = 0;
647 
649  {
651  (PRPC_UNICODE_STRING)AccountName,
653  (SAMPR_HANDLE *)UserHandle,
654  RelativeId);
655  }
657  {
659  }
660  RpcEndExcept;
661 
662  return Status;
663 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS NTAPI SamrCreateUserInDomain(IN SAMPR_HANDLE DomainHandle, IN PRPC_UNICODE_STRING Name, IN ACCESS_MASK DesiredAccess, OUT SAMPR_HANDLE *UserHandle, OUT unsigned long *RelativeId)
Definition: samrpc.c:2396
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

◆ SamDeleteAlias()

NTSTATUS NTAPI SamDeleteAlias ( IN SAM_HANDLE  AliasHandle)

Definition at line 668 of file samlib.c.

669 {
670  SAMPR_HANDLE LocalAliasHandle;
672 
673  TRACE("SamDeleteAlias(%p)\n", AliasHandle);
674 
675  LocalAliasHandle = (SAMPR_HANDLE)AliasHandle;
676 
677  if (LocalAliasHandle == NULL)
678  return STATUS_INVALID_HANDLE;
679 
681  {
682  Status = SamrDeleteAlias(&LocalAliasHandle);
683  }
685  {
687  }
688  RpcEndExcept;
689 
690  return Status;
691 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS NTAPI SamrDeleteAlias(IN OUT SAMPR_HANDLE *AliasHandle)
Definition: samrpc.c:5316
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
void * SAMPR_HANDLE
Definition: authpackage.c:113
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetLocalGroupAdd(), and NetLocalGroupDel().

◆ SamDeleteGroup()

NTSTATUS NTAPI SamDeleteGroup ( IN SAM_HANDLE  GroupHandle)

Definition at line 696 of file samlib.c.

697 {
698  SAMPR_HANDLE LocalGroupHandle;
700 
701  TRACE("SamDeleteGroup(%p)\n", GroupHandle);
702 
703  LocalGroupHandle = (SAMPR_HANDLE)GroupHandle;
704 
705  if (LocalGroupHandle == NULL)
706  return STATUS_INVALID_HANDLE;
707 
709  {
710  Status = SamrDeleteGroup(&LocalGroupHandle);
711  }
713  {
715  }
716  RpcEndExcept;
717 
718  return Status;
719 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI SamrDeleteGroup(IN OUT SAMPR_HANDLE *GroupHandle)
Definition: samrpc.c:4628
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
void * SAMPR_HANDLE
Definition: authpackage.c:113
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupAdd(), and NetGroupDel().

◆ SamDeleteUser()

NTSTATUS NTAPI SamDeleteUser ( IN SAM_HANDLE  UserHandle)

Definition at line 724 of file samlib.c.

725 {
726  SAMPR_HANDLE LocalUserHandle;
728 
729  TRACE("SamDeleteUser(%p)\n", UserHandle);
730 
731  LocalUserHandle = (SAMPR_HANDLE)UserHandle;
732 
733  if (LocalUserHandle == NULL)
734  return STATUS_INVALID_HANDLE;
735 
737  {
738  Status = SamrDeleteUser(&LocalUserHandle);
739  }
741  {
743  }
744  RpcEndExcept;
745 
746  return Status;
747 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
NTSTATUS NTAPI SamrDeleteUser(IN OUT SAMPR_HANDLE *UserHandle)
Definition: samrpc.c:5576
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
void * SAMPR_HANDLE
Definition: authpackage.c:113
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetUserAdd(), and NetUserDel().

◆ SamEnumerateAliasesInDomain()

NTSTATUS NTAPI SamEnumerateAliasesInDomain ( IN SAM_HANDLE  DomainHandle,
IN OUT PSAM_ENUMERATE_HANDLE  EnumerationContext,
OUT PVOID Buffer,
IN ULONG  PreferedMaximumLength,
OUT PULONG  CountReturned 
)

Definition at line 752 of file samlib.c.

757 {
758  PSAMPR_ENUMERATION_BUFFER EnumBuffer = NULL;
760 
761  TRACE("SamEnumerateAliasesInDomain(%p %p %p %lu %p)\n",
762  DomainHandle, EnumerationContext, Buffer, PreferedMaximumLength,
763  CountReturned);
764 
765  if ((EnumerationContext == NULL) ||
766  (Buffer == NULL) ||
767  (CountReturned == NULL))
769 
770  *Buffer = NULL;
771 
773  {
775  EnumerationContext,
776  &EnumBuffer,
777  PreferedMaximumLength,
778  CountReturned);
779 
780  if (EnumBuffer != NULL)
781  {
782  if (EnumBuffer->Buffer != NULL)
783  {
784  *Buffer = EnumBuffer->Buffer;
785  }
786 
787  midl_user_free(EnumBuffer);
788  }
789  }
791  {
793  }
794  RpcEndExcept;
795 
796  return Status;
797 }
#define RpcEndExcept
Definition: rpc.h:128
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
PSAMPR_RID_ENUMERATION Buffer
Definition: sam.idl:96
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI SamrEnumerateAliasesInDomain(IN SAMPR_HANDLE DomainHandle, IN OUT unsigned long *EnumerationContext, OUT PSAMPR_ENUMERATION_BUFFER *Buffer, IN unsigned long PreferedMaximumLength, OUT unsigned long *CountReturned)
Definition: samrpc.c:3182
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: samlib.c:65
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetLocalGroupEnum().

◆ SamEnumerateDomainsInSamServer()

NTSTATUS NTAPI SamEnumerateDomainsInSamServer ( IN SAM_HANDLE  ServerHandle,
IN OUT PSAM_ENUMERATE_HANDLE  EnumerationContext,
OUT PVOID Buffer,
IN ULONG  PreferedMaximumLength,
OUT PULONG  CountReturned 
)

Definition at line 802 of file samlib.c.

807 {
808  PSAMPR_ENUMERATION_BUFFER EnumBuffer = NULL;
810 
811  TRACE("SamEnumerateDomainsInSamServer(%p %p %p %lu %p)\n",
812  ServerHandle, EnumerationContext, Buffer, PreferedMaximumLength,
813  CountReturned);
814 
815  if ((EnumerationContext == NULL) ||
816  (Buffer == NULL) ||
817  (CountReturned == NULL))
819 
820  *Buffer = NULL;
821 
823  {
825  EnumerationContext,
826  &EnumBuffer,
827  PreferedMaximumLength,
828  CountReturned);
829 
830  if (EnumBuffer != NULL)
831  {
832  if (EnumBuffer->Buffer != NULL)
833  {
834  *Buffer = EnumBuffer->Buffer;
835  }
836 
837  midl_user_free(EnumBuffer);
838  }
839  }
841  {
843  }
844  RpcEndExcept;
845 
846  return Status;
847 }
#define RpcEndExcept
Definition: rpc.h:128
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
PSAMPR_RID_ENUMERATION Buffer
Definition: sam.idl:96
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI SamrEnumerateDomainsInSamServer(IN SAMPR_HANDLE ServerHandle, IN OUT unsigned long *EnumerationContext, OUT PSAMPR_ENUMERATION_BUFFER *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: samrpc.c:614
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: samlib.c:65
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

◆ SamEnumerateGroupsInDomain()

NTSTATUS NTAPI SamEnumerateGroupsInDomain ( IN SAM_HANDLE  DomainHandle,
IN OUT PSAM_ENUMERATE_HANDLE  EnumerationContext,
IN PVOID Buffer,
IN ULONG  PreferedMaximumLength,
OUT PULONG  CountReturned 
)

Definition at line 852 of file samlib.c.

857 {
858  PSAMPR_ENUMERATION_BUFFER EnumBuffer = NULL;
860 
861  TRACE("SamEnumerateGroupsInDomain(%p %p %p %lu %p)\n",
862  DomainHandle, EnumerationContext, Buffer,
863  PreferedMaximumLength, CountReturned);
864 
865  if (EnumerationContext == NULL || Buffer == NULL || CountReturned == NULL)
867 
868  *Buffer = NULL;
869 
871  {
873  EnumerationContext,
874  &EnumBuffer,
875  PreferedMaximumLength,
876  CountReturned);
877  if (EnumBuffer != NULL)
878  {
879  if (EnumBuffer->Buffer != NULL)
880  *Buffer = EnumBuffer->Buffer;
881 
882  midl_user_free(EnumBuffer);
883  }
884  }
886  {
888  }
889  RpcEndExcept;
890 
891  return Status;
892 }
#define RpcEndExcept
Definition: rpc.h:128
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
NTSTATUS NTAPI SamrEnumerateGroupsInDomain(IN SAMPR_HANDLE DomainHandle, IN OUT unsigned long *EnumerationContext, OUT PSAMPR_ENUMERATION_BUFFER *Buffer, IN unsigned long PreferedMaximumLength, OUT unsigned long *CountReturned)
Definition: samrpc.c:2191
PSAMPR_RID_ENUMERATION Buffer
Definition: sam.idl:96
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: samlib.c:65
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupEnum().

◆ SamEnumerateUsersInDomain()

NTSTATUS NTAPI SamEnumerateUsersInDomain ( IN SAM_HANDLE  DomainHandle,
IN OUT PSAM_ENUMERATE_HANDLE  EnumerationContext,
IN ULONG  UserAccountControl,
OUT PVOID Buffer,
IN ULONG  PreferedMaximumLength,
OUT PULONG  CountReturned 
)

Definition at line 897 of file samlib.c.

903 {
904  PSAMPR_ENUMERATION_BUFFER EnumBuffer = NULL;
906 
907  TRACE("SamEnumerateUsersInDomain(%p %p %lx %p %lu %p)\n",
908  DomainHandle, EnumerationContext, UserAccountControl, Buffer,
909  PreferedMaximumLength, CountReturned);
910 
911  if (EnumerationContext == NULL || Buffer == NULL || CountReturned == NULL)
913 
914  *Buffer = NULL;
915 
917  {
919  EnumerationContext,
920  UserAccountControl,
921  &EnumBuffer,
922  PreferedMaximumLength,
923  CountReturned);
924  if (EnumBuffer != NULL)
925  {
926  if (EnumBuffer->Buffer != NULL)
927  {
928  *Buffer = EnumBuffer->Buffer;
929  }
930 
931  midl_user_free(EnumBuffer);
932  }
933 
934  }
936  {
938  }
939  RpcEndExcept;
940 
941  return Status;
942 }
#define RpcEndExcept
Definition: rpc.h:128
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
PSAMPR_RID_ENUMERATION Buffer
Definition: sam.idl:96
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: samlib.c:65
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
NTSTATUS NTAPI SamrEnumerateUsersInDomain(IN SAMPR_HANDLE DomainHandle, IN OUT unsigned long *EnumerationContext, IN unsigned long UserAccountControl, OUT PSAMPR_ENUMERATION_BUFFER *Buffer, IN unsigned long PreferedMaximumLength, OUT unsigned long *CountReturned)
Definition: samrpc.c:2800
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetUserEnum().

◆ SamFreeMemory()

◆ SamGetAliasMembership()

NTSTATUS NTAPI SamGetAliasMembership ( IN SAM_HANDLE  DomainHandle,
IN ULONG  PassedCount,
IN PSID Sids,
OUT PULONG  MembershipCount,
OUT PULONG Aliases 
)

Definition at line 958 of file samlib.c.

963 {
964  SAMPR_PSID_ARRAY SidArray;
965  SAMPR_ULONG_ARRAY Membership;
967 
968  TRACE("SamAliasMembership(%p %lu %p %p %p)\n",
969  DomainHandle, PassedCount, Sids, MembershipCount, Aliases);
970 
971  if (Sids == NULL ||
972  MembershipCount == NULL ||
973  Aliases == NULL)
975 
976  Membership.Element = NULL;
977 
979  {
980  SidArray.Count = PassedCount;
981  SidArray.Sids = (PSAMPR_SID_INFORMATION)Sids;
982 
984  &SidArray,
985  &Membership);
986  if (NT_SUCCESS(Status))
987  {
988  *MembershipCount = Membership.Count;
989  *Aliases = Membership.Element;
990  }
991  else
992  {
993  if (Membership.Element != NULL)
994  midl_user_free(Membership.Element);
995  }
996  }
998  {
1000  }
1001  RpcEndExcept;
1002 
1003  return Status;
1004 }
unsigned long * Element
Definition: lsasrv.h:88
#define RpcEndExcept
Definition: rpc.h:128
NTSTATUS __stdcall SamrGetAliasMembership(SAMPR_HANDLE DomainHandle, PSAMPR_PSID_ARRAY SidArray, PSAMPR_ULONG_ARRAY Membership)
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
unsigned long Count
Definition: lsasrv.h:87
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: samlib.c:65
PSAMPR_SID_INFORMATION Sids
Definition: authpackage.c:123
Status
Definition: gdiplustypes.h:24
unsigned long Count
Definition: authpackage.c:122
struct _SAMPR_SID_INFORMATION * PSAMPR_SID_INFORMATION
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by GetUserPrivileges(), and NetUserGetLocalGroups().

◆ SamGetCompatibilityMode()

NTSTATUS NTAPI SamGetCompatibilityMode ( IN SAM_HANDLE  ObjectHandle,
OUT PULONG  Mode 
)

Definition at line 1009 of file samlib.c.

1011 {
1012  TRACE("(%p %p)\n", ObjectHandle, Mode);
1013 
1014  if (Mode == NULL)
1015  return STATUS_INVALID_PARAMETER;
1016 
1018 
1019  return STATUS_SUCCESS;
1020 }
_In_ ULONG Mode
Definition: hubbusif.h:303
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define SAM_SID_COMPATIBILITY_ALL
Definition: ntsam.h:700
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
return STATUS_SUCCESS
Definition: btrfs.c:2966

◆ SamGetDisplayEnumerationIndex()

NTSTATUS NTAPI SamGetDisplayEnumerationIndex ( IN SAM_HANDLE  DomainHandle,
IN DOMAIN_DISPLAY_INFORMATION  DisplayInformation,
IN PUNICODE_STRING  Prefix,
OUT PULONG  Index 
)

Definition at line 1025 of file samlib.c.

1029 {
1030  NTSTATUS Status;
1031 
1032  TRACE("(%p %lu %wZ %p)\n",
1033  DomainHandle, DisplayInformation, Prefix, Index);
1034 
1035  if ((Prefix == NULL) ||
1036  (Index == NULL))
1037  return STATUS_INVALID_PARAMETER;
1038 
1039  RpcTryExcept
1040  {
1042  DisplayInformation,
1044  Index);
1045  }
1047  {
1049  }
1050  RpcEndExcept;
1051 
1052  return Status;
1053 }
NTSTATUS NTAPI SamrGetDisplayEnumerationIndex2(IN SAMPR_HANDLE DomainHandle, IN DOMAIN_DISPLAY_INFORMATION DisplayInformationClass, IN PRPC_UNICODE_STRING Prefix, OUT unsigned long *Index)
Definition: samrpc.c:8962
#define RpcEndExcept
Definition: rpc.h:128
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1631
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
static const UCHAR Index[8]
Definition: usbohci.c:18
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGetDisplayInformationIndex().

◆ SamGetGroupsForUser()

NTSTATUS NTAPI SamGetGroupsForUser ( IN SAM_HANDLE  UserHandle,
OUT PGROUP_MEMBERSHIP Groups,
OUT PULONG  MembershipCount 
)

Definition at line 1058 of file samlib.c.

1061 {
1062  PSAMPR_GET_GROUPS_BUFFER GroupsBuffer = NULL;
1063  NTSTATUS Status;
1064 
1065  TRACE("SamGetGroupsForUser(%p %p %p)\n",
1066  UserHandle, Groups, MembershipCount);
1067 
1068  RpcTryExcept
1069  {
1071  &GroupsBuffer);
1072  if (NT_SUCCESS(Status))
1073  {
1074  *Groups = GroupsBuffer->Groups;
1075  *MembershipCount = GroupsBuffer->MembershipCount;
1076 
1077  MIDL_user_free(GroupsBuffer);
1078  }
1079  else
1080  {
1081  if (GroupsBuffer != NULL)
1082  {
1083  if (GroupsBuffer->Groups != NULL)
1084  MIDL_user_free(GroupsBuffer->Groups);
1085 
1086  MIDL_user_free(GroupsBuffer);
1087  }
1088  }
1089  }
1091  {
1093  }
1094  RpcEndExcept;
1095 
1096  return Status;
1097 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI SamrGetGroupsForUser(IN SAMPR_HANDLE UserHandle, OUT PSAMPR_GET_GROUPS_BUFFER *Groups)
Definition: samrpc.c:8605
TOpcodeData Groups[17][8]
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24
PGROUP_MEMBERSHIP Groups
Definition: sam.idl:116
unsigned long MembershipCount
Definition: sam.idl:115
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by GetUserPrivileges(), and NetUserGetGroups().

◆ SamGetMembersInAlias()

NTSTATUS NTAPI SamGetMembersInAlias ( IN SAM_HANDLE  AliasHandle,
OUT PSID **  MemberIds,
OUT PULONG  MemberCount 
)

Definition at line 1102 of file samlib.c.

1105 {
1106  SAMPR_PSID_ARRAY_OUT SidArray;
1107  NTSTATUS Status;
1108 
1109  TRACE("SamGetMembersInAlias(%p %p %p)\n",
1110  AliasHandle, MemberIds, MemberCount);
1111 
1112  if ((MemberIds == NULL) ||
1113  (MemberCount == NULL))
1114  return STATUS_INVALID_PARAMETER;
1115 
1116  *MemberIds = NULL;
1117  *MemberCount = 0;
1118 
1119  SidArray.Sids = NULL;
1120 
1121  RpcTryExcept
1122  {
1123  Status = SamrGetMembersInAlias((SAMPR_HANDLE)AliasHandle,
1124  &SidArray);
1125  if (NT_SUCCESS(Status))
1126  {
1127  *MemberCount = SidArray.Count;
1128  *MemberIds = (PSID *)SidArray.Sids;
1129  }
1130 
1131  }
1133  {
1135  }
1136  RpcEndExcept;
1137 
1138  return Status;
1139 }
#define RpcEndExcept
Definition: rpc.h:128
NTSTATUS NTAPI SamrGetMembersInAlias(IN SAMPR_HANDLE AliasHandle, OUT PSAMPR_PSID_ARRAY_OUT Members)
Definition: samrpc.c:5454
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long Count
Definition: sam.idl:55
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
PSAMPR_SID_INFORMATION Sids
Definition: sam.idl:56
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetLocalGroupGetMembers().

◆ SamGetMembersInGroup()

NTSTATUS NTAPI SamGetMembersInGroup ( IN SAM_HANDLE  GroupHandle,
OUT PULONG MemberIds,
OUT PULONG Attributes,
OUT PULONG  MemberCount 
)

Definition at line 1144 of file samlib.c.

1148 {
1149  PSAMPR_GET_MEMBERS_BUFFER MembersBuffer = NULL;
1150  NTSTATUS Status;
1151 
1152  TRACE("SamGetMembersInGroup(%p %p %p %p)\n",
1153  GroupHandle, MemberIds, Attributes, MemberCount);
1154 
1155  RpcTryExcept
1156  {
1157  Status = SamrGetMembersInGroup((SAMPR_HANDLE)GroupHandle,
1158  &MembersBuffer);
1159  if (NT_SUCCESS(Status))
1160  {
1161  *MemberIds = MembersBuffer->Members;
1162  *Attributes = MembersBuffer->Attributes;
1163  *MemberCount = MembersBuffer->MemberCount;
1164 
1165  MIDL_user_free(MembersBuffer);
1166  }
1167  else
1168  {
1169  if (MembersBuffer != NULL)
1170  {
1171  if (MembersBuffer->Members != NULL)
1172  MIDL_user_free(MembersBuffer->Members);
1173 
1174  if (MembersBuffer->Attributes != NULL)
1175  MIDL_user_free(MembersBuffer->Attributes);
1176 
1177  MIDL_user_free(MembersBuffer);
1178  }
1179  }
1180  }
1182  {
1184  }
1185  RpcEndExcept;
1186 
1187  return Status;
1188 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI SamrGetMembersInGroup(IN SAMPR_HANDLE GroupHandle, OUT PSAMPR_GET_MEMBERS_BUFFER *Members)
Definition: samrpc.c:4758
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
unsigned long * Members
Definition: sam.idl:122
unsigned long * Attributes
Definition: sam.idl:123
unsigned long MemberCount
Definition: sam.idl:121
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupGetUsers(), and NetGroupSetUsers().

◆ SamLookupDomainInSamServer()

NTSTATUS NTAPI SamLookupDomainInSamServer ( IN SAM_HANDLE  ServerHandle,
IN PUNICODE_STRING  Name,
OUT PSID DomainId 
)

Definition at line 1193 of file samlib.c.

1196 {
1197  NTSTATUS Status;
1198 
1199  TRACE("SamLookupDomainInSamServer(%p %p %p)\n",
1200  ServerHandle, Name, DomainId);
1201 
1202  RpcTryExcept
1203  {
1206  (PRPC_SID *)DomainId);
1207  }
1209  {
1211  }
1212  RpcEndExcept;
1213 
1214  return Status;
1215 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI SamrLookupDomainInSamServer(IN SAMPR_HANDLE ServerHandle, IN PRPC_UNICODE_STRING Name, OUT PRPC_SID *DomainId)
Definition: samrpc.c:497
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

◆ SamLookupIdsInDomain()

NTSTATUS NTAPI SamLookupIdsInDomain ( IN SAM_HANDLE  DomainHandle,
IN ULONG  Count,
IN PULONG  RelativeIds,
OUT PUNICODE_STRING Names,
OUT PSID_NAME_USE *Use  OPTIONAL 
)

Definition at line 1220 of file samlib.c.

1225 {
1226  SAMPR_RETURNED_USTRING_ARRAY NamesBuffer = {0, NULL};
1227  SAMPR_ULONG_ARRAY UseBuffer = {0, NULL};
1228  ULONG i;
1229  NTSTATUS Status;
1230 
1231  TRACE("SamLookupIdsInDomain(%p %lu %p %p %p)\n",
1232  DomainHandle, Count, RelativeIds, Names, Use);
1233 
1234  *Names = NULL;
1235 
1236  if (Use != NULL)
1237  *Use = NULL;
1238 
1239  RpcTryExcept
1240  {
1241  Status = SamrLookupIdsInDomain((SAMPR_HANDLE)DomainHandle,
1242  Count,
1243  RelativeIds,
1244  &NamesBuffer,
1245  &UseBuffer);
1246  }
1248  {
1250  }
1251  RpcEndExcept;
1252 
1253  if (NT_SUCCESS(Status))
1254  {
1256  if (*Names == NULL)
1257  {
1259  goto done;
1260  }
1261 
1262  for (i = 0; i < Count; i++)
1263  {
1264  (*Names)[i].Buffer = midl_user_allocate(NamesBuffer.Element[i].MaximumLength);
1265  if ((*Names)[i].Buffer == NULL)
1266  {
1268  goto done;
1269  }
1270  }
1271 
1272  for (i = 0; i < Count; i++)
1273  {
1274  (*Names)[i].Length = NamesBuffer.Element[i].Length;
1275  (*Names)[i].MaximumLength = NamesBuffer.Element[i].MaximumLength;
1276 
1278  NamesBuffer.Element[i].Buffer,
1279  NamesBuffer.Element[i].Length);
1280  }
1281 
1282  if (Use != NULL)
1283  {
1284  *Use = midl_user_allocate(Count * sizeof(SID_NAME_USE));
1285  if (*Use == NULL)
1286  {
1288  goto done;
1289  }
1290 
1291  RtlCopyMemory(*Use,
1292  UseBuffer.Element,
1293  Count * sizeof(SID_NAME_USE));
1294  }
1295  }
1296 
1297 done:
1298  if (!NT_SUCCESS(Status))
1299  {
1300  if (*Names != NULL)
1301  {
1302  for (i = 0; i < Count; i++)
1303  {
1304  if ((*Names)[i].Buffer != NULL)
1306  }
1307 
1309  }
1310 
1311  if (Use != NULL && *Use != NULL)
1312  midl_user_free(*Use);
1313  }
1314 
1315  if (NamesBuffer.Element != NULL)
1316  {
1317  for (i = 0; i < NamesBuffer.Count; i++)
1318  {
1319  if (NamesBuffer.Element[i].Buffer != NULL)
1320  midl_user_free(NamesBuffer.Element[i].Buffer);
1321  }
1322 
1323  midl_user_free(NamesBuffer.Element);
1324  }
1325 
1326  if (UseBuffer.Element != NULL)
1327  midl_user_free(UseBuffer.Element);
1328 
1329  return 0;
1330 }
unsigned long * Element
Definition: lsasrv.h:88
PWSTR Names[NAMES_COUNT]
#define RpcEndExcept
Definition: rpc.h:128
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
enum _SID_NAME_USE SID_NAME_USE
LONG NTSTATUS
Definition: precomp.h:26
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
NTSTATUS NTAPI SamrLookupIdsInDomain(IN SAMPR_HANDLE DomainHandle, IN ULONG Count, IN ULONG *RelativeIds, OUT PSAMPR_RETURNED_USTRING_ARRAY Names, OUT PSAMPR_ULONG_ARRAY Use)
Definition: samrpc.c:3787
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
PRPC_UNICODE_STRING Element
Definition: lookup.c:22
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
void __RPC_FAR *__RPC_USER midl_user_allocate(SIZE_T len)
Definition: samlib.c:59
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: samlib.c:65
unsigned short Length
Definition: msv1_0.h:53
Status
Definition: gdiplustypes.h:24
unsigned int ULONG
Definition: retypes.h:1
unsigned short MaximumLength
Definition: msv1_0.h:54
#define RpcExcept(expr)
Definition: rpc.h:127
wchar_t * Buffer
Definition: msv1_0.h:55
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupGetUsers(), and NetUserGetLocalGroups().

◆ SamLookupNamesInDomain()

NTSTATUS NTAPI SamLookupNamesInDomain ( IN SAM_HANDLE  DomainHandle,
IN ULONG  Count,
IN PUNICODE_STRING  Names,
OUT PULONG RelativeIds,
OUT PSID_NAME_USE Use 
)

Definition at line 1335 of file samlib.c.

1340 {
1341  SAMPR_ULONG_ARRAY RidBuffer = {0, NULL};
1342  SAMPR_ULONG_ARRAY UseBuffer = {0, NULL};
1343  NTSTATUS Status;
1344 
1345  TRACE("SamLookupNamesInDomain(%p %lu %p %p %p)\n",
1346  DomainHandle, Count, Names, RelativeIds, Use);
1347 
1348  *RelativeIds = NULL;
1349  *Use = NULL;
1350 
1351  RpcTryExcept
1352  {
1354  Count,
1356  &RidBuffer,
1357  &UseBuffer);
1358  }
1360  {
1362  }
1363  RpcEndExcept;
1364 
1365  if (NT_SUCCESS(Status))
1366  {
1367  *RelativeIds = midl_user_allocate(Count * sizeof(ULONG));
1368  if (*RelativeIds == NULL)
1369  {
1371  goto done;
1372  }
1373 
1374  *Use = midl_user_allocate(Count * sizeof(SID_NAME_USE));
1375  if (*Use == NULL)
1376  {
1378  goto done;
1379  }
1380 
1381  RtlCopyMemory(*RelativeIds,
1382  RidBuffer.Element,
1383  Count * sizeof(ULONG));
1384 
1385  RtlCopyMemory(*Use,
1386  UseBuffer.Element,
1387  Count * sizeof(SID_NAME_USE));
1388  }
1389 
1390 done:
1391  if (!NT_SUCCESS(Status))
1392  {
1393  if (*RelativeIds != NULL)
1394  midl_user_free(*RelativeIds);
1395 
1396  if (*Use != NULL)
1397  midl_user_free(*Use);
1398  }
1399 
1400  if (RidBuffer.Element != NULL)
1401  midl_user_free(RidBuffer.Element);
1402 
1403  if (UseBuffer.Element != NULL)
1404  midl_user_free(UseBuffer.Element);
1405 
1406  return Status;
1407 }
unsigned long * Element
Definition: lsasrv.h:88
PWSTR Names[NAMES_COUNT]
#define RpcEndExcept
Definition: rpc.h:128
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
enum _SID_NAME_USE SID_NAME_USE
LONG NTSTATUS
Definition: precomp.h:26
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
NTSTATUS NTAPI SamrLookupNamesInDomain(IN SAMPR_HANDLE DomainHandle, IN ULONG Count, IN RPC_UNICODE_STRING Names[], OUT PSAMPR_ULONG_ARRAY RelativeIds, OUT PSAMPR_ULONG_ARRAY Use)
Definition: samrpc.c:3558
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
void __RPC_FAR *__RPC_USER midl_user_allocate(SIZE_T len)
Definition: samlib.c:59
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: samlib.c:65
Status
Definition: gdiplustypes.h:24
unsigned int ULONG
Definition: retypes.h:1
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupAddUser(), NetGroupDelUser(), NetGroupSetUsers(), NetUserGetGroups(), NetUserGetInfo(), NetUserGetLocalGroups(), OpenAliasByName(), OpenGroupByName(), and OpenUserByName().

◆ SamOpenAlias()

NTSTATUS NTAPI SamOpenAlias ( IN SAM_HANDLE  DomainHandle,
IN ACCESS_MASK  DesiredAccess,
IN ULONG  AliasId,
OUT PSAM_HANDLE  AliasHandle 
)

Definition at line 1412 of file samlib.c.

1416 {
1417  NTSTATUS Status;
1418 
1419  TRACE("SamOpenAlias(%p 0x%08x %lx %p)\n",
1420  DomainHandle, DesiredAccess, AliasId, AliasHandle);
1421 
1422  RpcTryExcept
1423  {
1424  Status = SamrOpenAlias((SAMPR_HANDLE)DomainHandle,
1425  DesiredAccess,
1426  AliasId,
1427  (SAMPR_HANDLE *)AliasHandle);
1428  }
1430  {
1432  }
1433  RpcEndExcept;
1434 
1435  return Status;
1436 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI SamrOpenAlias(IN SAMPR_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG AliasId, OUT SAMPR_HANDLE *AliasHandle)
Definition: samrpc.c:4915
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetLocalGroupEnum(), and OpenAliasByName().

◆ SamOpenDomain()

NTSTATUS NTAPI SamOpenDomain ( IN SAM_HANDLE  ServerHandle,
IN ACCESS_MASK  DesiredAccess,
IN PSID  DomainId,
OUT PSAM_HANDLE  DomainHandle 
)

Definition at line 1441 of file samlib.c.

1445 {
1446  NTSTATUS Status;
1447 
1448  TRACE("SamOpenDomain(%p 0x%08x %p %p)\n",
1449  ServerHandle, DesiredAccess, DomainId, DomainHandle);
1450 
1451  RpcTryExcept
1452  {
1453  Status = SamrOpenDomain((SAMPR_HANDLE)ServerHandle,
1454  DesiredAccess,
1455  (PRPC_SID)DomainId,
1456  (SAMPR_HANDLE *)DomainHandle);
1457  }
1459  {
1461  }
1462  RpcEndExcept;
1463 
1464  return Status;
1465 }
#define RpcEndExcept
Definition: rpc.h:128
NTSTATUS __stdcall SamrOpenDomain(SAMPR_HANDLE ServerHandle, ACCESS_MASK DesiredAccess, PRPC_SID DomainId, SAMPR_HANDLE *DomainHandle)
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetUserEnum(), NetUserGetGroups(), NetUserGetInfo(), NetUserGetLocalGroups(), NetUserModalsGet(), OpenAccountDomain(), OpenBuiltinDomain(), SetAccountsDomainSid(), and SetAdministratorPassword().

◆ SamOpenGroup()

NTSTATUS NTAPI SamOpenGroup ( IN SAM_HANDLE  DomainHandle,
IN ACCESS_MASK  DesiredAccess,
IN ULONG  GroupId,
OUT PSAM_HANDLE  GroupHandle 
)

Definition at line 1470 of file samlib.c.

1474 {
1475  NTSTATUS Status;
1476 
1477  TRACE("SamOpenGroup(%p 0x%08x %p %p)\n",
1478  DomainHandle, DesiredAccess, GroupId, GroupHandle);
1479 
1480  RpcTryExcept
1481  {
1482  Status = SamrOpenGroup((SAMPR_HANDLE)DomainHandle,
1483  DesiredAccess,
1484  GroupId,
1485  (SAMPR_HANDLE *)GroupHandle);
1486  }
1488  {
1490  }
1491  RpcEndExcept;
1492 
1493  return Status;
1494 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI SamrOpenGroup(IN SAMPR_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN unsigned long GroupId, OUT SAMPR_HANDLE *GroupHandle)
Definition: samrpc.c:4072
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetGroupEnum(), and OpenGroupByName().

◆ SamOpenUser()

NTSTATUS NTAPI SamOpenUser ( IN SAM_HANDLE  DomainHandle,
IN ACCESS_MASK  DesiredAccess,
IN ULONG  UserId,
OUT PSAM_HANDLE  UserHandle 
)

Definition at line 1499 of file samlib.c.

1503 {
1504  NTSTATUS Status;
1505 
1506  TRACE("SamOpenUser(%p 0x%08x %lx %p)\n",
1507  DomainHandle, DesiredAccess, UserId, UserHandle);
1508 
1509  RpcTryExcept
1510  {
1511  Status = SamrOpenUser((SAMPR_HANDLE)DomainHandle,
1512  DesiredAccess,
1513  UserId,
1514  (SAMPR_HANDLE *)UserHandle);
1515  }
1517  {
1519  }
1520  RpcEndExcept;
1521 
1522  return Status;
1523 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
NTSTATUS NTAPI SamrOpenUser(IN SAMPR_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG UserId, OUT SAMPR_HANDLE *UserHandle)
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetUserEnum(), NetUserGetGroups(), NetUserGetInfo(), OpenUserByName(), and SetAdministratorPassword().

◆ SamQueryDisplayInformation()

NTSTATUS NTAPI SamQueryDisplayInformation ( IN SAM_HANDLE  DomainHandle,
IN DOMAIN_DISPLAY_INFORMATION  DisplayInformation,
IN ULONG  Index,
IN ULONG  EntryCount,
IN ULONG  PreferredMaximumLength,
OUT PULONG  TotalAvailable,
OUT PULONG  TotalReturned,
OUT PULONG  ReturnedEntryCount,
OUT PVOID SortedBuffer 
)

Definition at line 1528 of file samlib.c.

1537 {
1538  SAMPR_DISPLAY_INFO_BUFFER LocalBuffer;
1539  NTSTATUS Status;
1540 
1541  TRACE("(%p %lu %lu %lu %lu %p %p %p %p)\n",
1542  DomainHandle, DisplayInformation, Index, EntryCount,
1543  PreferredMaximumLength, TotalAvailable, TotalReturned,
1544  ReturnedEntryCount, SortedBuffer);
1545 
1546  if ((TotalAvailable == NULL) ||
1547  (TotalReturned == NULL) ||
1548  (ReturnedEntryCount == NULL) ||
1549  (SortedBuffer == NULL))
1550  return STATUS_INVALID_PARAMETER;
1551 
1552  RpcTryExcept
1553  {
1555  DisplayInformation,
1556  Index,
1557  EntryCount,
1558  PreferredMaximumLength,
1559  TotalAvailable,
1560  TotalReturned,
1561  &LocalBuffer);
1562  if (NT_SUCCESS(Status))
1563  {
1564  switch (DisplayInformation)
1565  {
1566  case DomainDisplayUser:
1567  *ReturnedEntryCount = LocalBuffer.UserInformation.EntriesRead;
1568  *SortedBuffer = LocalBuffer.UserInformation.Buffer;
1569  break;
1570 
1571  case DomainDisplayMachine:
1572  *ReturnedEntryCount = LocalBuffer.MachineInformation.EntriesRead;
1573  *SortedBuffer = LocalBuffer.MachineInformation.Buffer;
1574  break;
1575 
1576  case DomainDisplayGroup:
1577  *ReturnedEntryCount = LocalBuffer.GroupInformation.EntriesRead;
1578  *SortedBuffer = LocalBuffer.GroupInformation.Buffer;
1579  break;
1580 
1581  case DomainDisplayOemUser:
1582  *ReturnedEntryCount = LocalBuffer.OemUserInformation.EntriesRead;
1583  *SortedBuffer = LocalBuffer.OemUserInformation.Buffer;
1584  break;
1585 
1586  case DomainDisplayOemGroup:
1587  *ReturnedEntryCount = LocalBuffer.OemGroupInformation.EntriesRead;
1588  *SortedBuffer = LocalBuffer.OemGroupInformation.Buffer;
1589  break;
1590 
1591  case DomainDisplayServer:
1592  /* FIXME */
1593  break;
1594  }
1595  }
1596  else
1597  {
1598  *ReturnedEntryCount = 0;
1599  *SortedBuffer = NULL;
1600  }
1601  }
1603  {
1605  }
1606  RpcEndExcept;
1607 
1608  return Status;
1609 }
#define RpcEndExcept
Definition: rpc.h:128
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER MachineInformation
Definition: sam.idl:366
LONG NTSTATUS
Definition: precomp.h:26
PSAMPR_DOMAIN_DISPLAY_OEM_USER Buffer
Definition: sam.idl:354
SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER GroupInformation
Definition: sam.idl:367
SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER OemGroupInformation
Definition: sam.idl:369
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
PSAMPR_DOMAIN_DISPLAY_OEM_GROUP Buffer
Definition: sam.idl:360
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static const UCHAR Index[8]
Definition: usbohci.c:18
SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER OemUserInformation
Definition: sam.idl:368
PSAMPR_DOMAIN_DISPLAY_GROUP Buffer
Definition: sam.idl:348
SAMPR_DOMAIN_DISPLAY_USER_BUFFER UserInformation
Definition: sam.idl:365
Status
Definition: gdiplustypes.h:24
PSAMPR_DOMAIN_DISPLAY_MACHINE Buffer
Definition: sam.idl:342
PSAMPR_DOMAIN_DISPLAY_USER Buffer
Definition: sam.idl:336
NTSTATUS NTAPI SamrQueryDisplayInformation3(IN SAMPR_HANDLE DomainHandle, IN DOMAIN_DISPLAY_INFORMATION DisplayInformationClass, IN unsigned long Index, IN unsigned long EntryCount, IN unsigned long PreferredMaximumLength, OUT unsigned long *TotalAvailable, OUT unsigned long *TotalReturned, OUT PSAMPR_DISPLAY_INFO_BUFFER Buffer)
Definition: samrpc.c:9395
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetQueryDisplayInformation().

◆ SamQueryInformationAlias()

NTSTATUS NTAPI SamQueryInformationAlias ( IN SAM_HANDLE  AliasHandle,
IN ALIAS_INFORMATION_CLASS  AliasInformationClass,
OUT PVOID Buffer 
)

Definition at line 1614 of file samlib.c.

1617 {
1618  NTSTATUS Status;
1619 
1620  TRACE("SamQueryInformationAlias(%p %lu %p)\n",
1621  AliasHandle, AliasInformationClass, Buffer);
1622 
1623  RpcTryExcept
1624  {
1626  AliasInformationClass,
1628  }
1630  {
1632  }
1633  RpcEndExcept;
1634 
1635  return Status;
1636 }
#define RpcEndExcept
Definition: rpc.h:128
LONG NTSTATUS
Definition: precomp.h:26
#define RpcTryExcept
Definition: rpc.h:126
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
Definition: bufpool.h:45
NTSTATUS NTAPI SamrQueryInformationAlias(IN SAMPR_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, OUT PSAMPR_ALIAS_INFO_BUFFER *Buffer)
Definition: samrpc.c:5138
#define RpcExceptionCode()
Definition: rpc.h:132
#define TRACE(s)
Definition: solgame.cpp:4
Status
Definition: gdiplustypes.h:24
#define RpcExcept(expr)
Definition: rpc.h:127
LONG WINAPI I_RpcMapWin32Status(RPC_STATUS status)
Definition: rpcrt4_main.c:741

Referenced by NetLocalGroupEnum(), and NetLocalGroupGetInfo().

◆ SamQueryInformationDomain()

NTSTATUS NTAPI SamQueryInformationDomain ( IN SAM_HANDLE  DomainHandle,
IN DOMAIN_INFORMATION_CLASS  DomainInformationClass,
OUT PVOID Buffer 
)

Definition at line 1641 of file samlib.c.

1644 {
1645<