ReactOS 0.4.16-dev-329-g9223134
|
#include <stdio.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <ndk/ketypes.h>
#include <ndk/kefuncs.h>
#include <ndk/obfuncs.h>
#include <ndk/rtlfuncs.h>
#include <ddk/ntsam.h>
#include <sddl.h>
#include <sam_s.h>
#include <wine/debug.h>
Go to the source code of this file.
Classes | |
struct | _SAM_DB_OBJECT |
struct | _SAM_ALIAS_FIXED_DATA |
struct | _SAM_DOMAIN_FIXED_DATA |
struct | _SAM_GROUP_FIXED_DATA |
struct | _SAM_USER_FIXED_DATA |
Macros | |
#define | WIN32_NO_STATUS |
#define | _INC_WINDOWS |
#define | COM_NO_WINDOWS_H |
#define | NTOS_MODE_USER |
#define | SAMP_DB_SIGNATURE 0x87654321 |
Typedefs | |
typedef enum _SAM_DB_OBJECT_TYPE | SAM_DB_OBJECT_TYPE |
typedef struct _SAM_DB_OBJECT | SAM_DB_OBJECT |
typedef struct _SAM_DB_OBJECT * | PSAM_DB_OBJECT |
typedef struct _SAM_ALIAS_FIXED_DATA | SAM_ALIAS_FIXED_DATA |
typedef struct _SAM_ALIAS_FIXED_DATA * | PSAM_ALIAS_FIXED_DATA |
typedef struct _SAM_DOMAIN_FIXED_DATA | SAM_DOMAIN_FIXED_DATA |
typedef struct _SAM_DOMAIN_FIXED_DATA * | PSAM_DOMAIN_FIXED_DATA |
typedef struct _SAM_GROUP_FIXED_DATA | SAM_GROUP_FIXED_DATA |
typedef struct _SAM_GROUP_FIXED_DATA * | PSAM_GROUP_FIXED_DATA |
typedef struct _SAM_USER_FIXED_DATA | SAM_USER_FIXED_DATA |
typedef struct _SAM_USER_FIXED_DATA * | PSAM_USER_FIXED_DATA |
Enumerations | |
enum | _SAM_DB_OBJECT_TYPE { SamDbIgnoreObject , SamDbServerObject , SamDbDomainObject , SamDbAliasObject , SamDbGroupObject , SamDbUserObject } |
Variables | |
PGENERIC_MAPPING | pServerMapping |
ENCRYPTED_NT_OWF_PASSWORD | EmptyNtHash |
ENCRYPTED_LM_OWF_PASSWORD | EmptyLmHash |
RTL_RESOURCE | SampResource |
NT_PRODUCT_TYPE | SampProductType |
typedef struct _SAM_ALIAS_FIXED_DATA * PSAM_ALIAS_FIXED_DATA |
typedef struct _SAM_DB_OBJECT * PSAM_DB_OBJECT |
typedef struct _SAM_GROUP_FIXED_DATA * PSAM_GROUP_FIXED_DATA |
typedef struct _SAM_USER_FIXED_DATA * PSAM_USER_FIXED_DATA |
typedef struct _SAM_DB_OBJECT SAM_DB_OBJECT |
Enumerator | |
---|---|
SamDbIgnoreObject | |
SamDbServerObject | |
SamDbDomainObject | |
SamDbAliasObject | |
SamDbGroupObject | |
SamDbUserObject |
Definition at line 35 of file samsrv.h.
Definition at line 103 of file utils.c.
NTSTATUS SampAddGroupMembershipToUser | ( | IN PSAM_DB_OBJECT | UserObject, |
IN ULONG | GroupId, | ||
IN ULONG | Attributes | ||
) |
Definition at line 39 of file user.c.
Referenced by SamrAddMemberToGroup().
NTSTATUS SampAddMemberToAlias | ( | IN PSAM_DB_OBJECT | AliasObject, |
IN PRPC_SID | MemberId | ||
) |
Definition at line 39 of file alias.c.
Referenced by SamrAddMemberToAlias().
NTSTATUS SampAddMemberToGroup | ( | IN PSAM_DB_OBJECT | GroupObject, |
IN ULONG | MemberId | ||
) |
Definition at line 39 of file group.c.
Referenced by SamrAddMemberToGroup().
NTSTATUS SampCheckAccountName | ( | IN PRPC_UNICODE_STRING | AccountName, |
IN USHORT | MaxLength | ||
) |
Definition at line 154 of file utils.c.
Referenced by SampSetAliasName(), SampSetGroupName(), SampSetUserName(), SamrCreateAliasInDomain(), SamrCreateGroupInDomain(), SamrCreateUser2InDomain(), and SamrCreateUserInDomain().
NTSTATUS SampCheckAccountNameInDomain | ( | IN PSAM_DB_OBJECT | DomainObject, |
IN LPCWSTR | lpAccountName | ||
) |
Definition at line 96 of file domain.c.
Referenced by SampSetAliasName(), SampSetGroupName(), SampSetUserName(), SamrCreateAliasInDomain(), SamrCreateGroupInDomain(), SamrCreateUser2InDomain(), and SamrCreateUserInDomain().
NTSTATUS SampCloseDbObject | ( | PSAM_DB_OBJECT | DbObject | ) |
Definition at line 346 of file database.c.
Referenced by SampFillUserDisplayCache(), SampGetUserGroupAttributes(), SampRemoveUserFromAllGroups(), SampSetUserGroupAttributes(), SamrAddMemberToGroup(), SamrCloseHandle(), SamrGetDomainPasswordInformation(), and SamrRemoveMemberFromGroup().
NTSTATUS SampCreateAccountDomainSD | ( | OUT PSECURITY_DESCRIPTOR * | DomainSd, |
OUT PULONG | Size | ||
) |
Definition at line 545 of file security.c.
Referenced by SampSetupCreateDomain().
NTSTATUS SampCreateAccountSid | ( | IN PSAM_DB_OBJECT | DomainObject, |
IN ULONG | ulRelativeId, | ||
IN OUT PSID * | AccountSid | ||
) |
Definition at line 303 of file domain.c.
Referenced by SamrCreateUser2InDomain(), and SamrCreateUserInDomain().
NTSTATUS SampCreateAliasSD | ( | OUT PSECURITY_DESCRIPTOR * | AliasSd, |
OUT PULONG | Size | ||
) |
Definition at line 859 of file security.c.
Referenced by SampSetupCreateAliasAccount(), and SamrCreateAliasInDomain().
NTSTATUS SampCreateBuiltinDomainSD | ( | OUT PSECURITY_DESCRIPTOR * | DomainSd, |
OUT PULONG | Size | ||
) |
Definition at line 283 of file security.c.
Referenced by SampSetupCreateDomain().
NTSTATUS SampCreateDbObject | ( | IN PSAM_DB_OBJECT | ParentObject, |
IN LPWSTR | ContainerName, | ||
IN LPWSTR | ObjectName, | ||
IN ULONG | RelativeId, | ||
IN SAM_DB_OBJECT_TYPE | ObjectType, | ||
IN ACCESS_MASK | DesiredAccess, | ||
OUT PSAM_DB_OBJECT * | DbObject | ||
) |
Definition at line 44 of file database.c.
Referenced by SamrCreateAliasInDomain(), SamrCreateGroupInDomain(), SamrCreateUser2InDomain(), and SamrCreateUserInDomain().
NTSTATUS SampCreateGroupSD | ( | OUT PSECURITY_DESCRIPTOR * | GroupSd, |
OUT PULONG | Size | ||
) |
Definition at line 1146 of file security.c.
Referenced by SampSetupCreateGroupAccount(), and SamrCreateGroupInDomain().
NTSTATUS SampCreateServerSD | ( | OUT PSECURITY_DESCRIPTOR * | ServerSd, |
OUT PULONG | Size | ||
) |
Definition at line 21 of file security.c.
Referenced by SampSetupCreateServer().
Definition at line 1433 of file security.c.
Referenced by SampSetupCreateUserAccount(), SamrCreateUser2InDomain(), and SamrCreateUserInDomain().
NTSTATUS SampDeleteAccountDbObject | ( | PSAM_DB_OBJECT | DbObject | ) |
Definition at line 368 of file database.c.
Referenced by SamrDeleteAlias(), SamrDeleteGroup(), and SamrDeleteUser().
NTSTATUS SampFillDisplayCache | ( | _In_ PSAM_DB_OBJECT | DomainObject, |
_In_ DOMAIN_DISPLAY_INFORMATION | DisplayInformationClass | ||
) |
Definition at line 172 of file display.c.
Referenced by SamrQueryDisplayInformation3().
NTSTATUS SampGetLogonHoursAttribute | ( | IN PSAM_DB_OBJECT | UserObject, |
IN OUT PSAMPR_LOGON_HOURS | LogonHours | ||
) |
Definition at line 619 of file user.c.
Referenced by SampQueryUserAccount(), SampQueryUserAll(), SampQueryUserLogon(), and SampQueryUserLogonHours().
NTSTATUS SampGetMembersInAlias | ( | IN PSAM_DB_OBJECT | AliasObject, |
OUT PULONG | MemberCount, | ||
OUT PSAMPR_SID_INFORMATION * | MemberArray | ||
) |
Definition at line 218 of file alias.c.
Referenced by SampRemoveAllMembersFromAlias(), and SamrGetMembersInAlias().
NTSTATUS SampGetObjectAttribute | ( | PSAM_DB_OBJECT | DbObject, |
LPWSTR | AttributeName, | ||
PULONG | AttributeType, | ||
LPVOID | AttributeData, | ||
PULONG | AttributeSize | ||
) |
Definition at line 516 of file database.c.
Referenced by SampAddGroupMembershipToUser(), SampAddMemberToGroup(), SampCreateAccountSid(), SampDeleteAccountDbObject(), SampFillUserDisplayCache(), SampGetLogonHoursAttribute(), SampGetObjectAttributeString(), SampGetUserGroupAttributes(), SampQueryDomainGeneral(), SampQueryDomainGeneral2(), SampQueryDomainLockout(), SampQueryDomainLogoff(), SampQueryDomainModified(), SampQueryDomainModified2(), SampQueryDomainPassword(), SampQueryDomainServerRole(), SampQueryDomainState(), SampQueryGroupAttribute(), SampQueryGroupGeneral(), SampQueryUserAccount(), SampQueryUserAll(), SampQueryUserControl(), SampQueryUserExpires(), SampQueryUserGeneral(), SampQueryUserInternal1(), SampQueryUserInternal2(), SampQueryUserLogon(), SampQueryUserPreferences(), SampQueryUserPrimaryGroup(), SampRemoveGroupMembershipFromUser(), SampRemoveMemberFromGroup(), SampRemoveUserFromAllGroups(), SampSetDomainLockout(), SampSetDomainLogoff(), SampSetDomainPassword(), SampSetDomainServerRole(), SampSetDomainState(), SampSetGroupAttribute(), SampSetUserAll(), SampSetUserControl(), SampSetUserExpires(), SampSetUserGeneral(), SampSetUserGroupAttributes(), SampSetUserInternal1(), SampSetUserInternal2(), SampSetUserPassword(), SampSetUserPreferences(), SampSetUserPrimaryGroup(), SamrChangePasswordUser(), SamrCreateAliasInDomain(), SamrCreateGroupInDomain(), SamrCreateUser2InDomain(), SamrCreateUserInDomain(), SamrDeleteGroup(), SamrGetDomainPasswordInformation(), SamrGetGroupsForUser(), SamrGetMembersInGroup(), SamrGetUserDomainPasswordInformation(), SamrQuerySecurityObject(), and SamrSetSecurityObject().
NTSTATUS SampGetObjectAttributeString | ( | PSAM_DB_OBJECT | DbObject, |
LPWSTR | AttributeName, | ||
PRPC_UNICODE_STRING | String | ||
) |
Definition at line 531 of file database.c.
Referenced by SampQueryAliasAdminComment(), SampQueryAliasGeneral(), SampQueryAliasName(), SampQueryDomainGeneral(), SampQueryDomainGeneral2(), SampQueryDomainName(), SampQueryDomainOem(), SampQueryDomainReplication(), SampQueryGroupAdminComment(), SampQueryGroupGeneral(), SampQueryGroupName(), SampQueryUserAccount(), SampQueryUserAccountName(), SampQueryUserAdminComment(), SampQueryUserAll(), SampQueryUserFullName(), SampQueryUserGeneral(), SampQueryUserHome(), SampQueryUserLogon(), SampQueryUserName(), SampQueryUserParameters(), SampQueryUserPreferences(), SampQueryUserProfile(), SampQueryUserScript(), SampQueryUserWorkStations(), SampSetAliasName(), SampSetGroupName(), and SampSetUserName().
Definition at line 138 of file utils.c.
Referenced by SamrRemoveMemberFromForeignDomain().
NTSTATUS SampGetUserGroupAttributes | ( | IN PSAM_DB_OBJECT | DomainObject, |
IN ULONG | UserId, | ||
IN ULONG | GroupId, | ||
OUT PULONG | GroupAttributes | ||
) |
Definition at line 183 of file user.c.
Referenced by SamrGetMembersInGroup().
Definition at line 21 of file database.c.
Referenced by SamIInitialize().
Definition at line 143 of file display.c.
Referenced by SamIInitialize().
Definition at line 888 of file setup.c.
Referenced by SampInitializeRegistry().
Definition at line 64 of file utils.c.
Referenced by SamIInitialize().
Definition at line 17 of file utils.c.
Referenced by SampInitializeSAM().
NTSTATUS SampOpenAliasObject | ( | IN PSAM_DB_OBJECT | DomainObject, |
IN ULONG | AliasId, | ||
IN ACCESS_MASK | DesiredAccess, | ||
OUT PSAM_DB_OBJECT * | AliasObject | ||
) |
Definition at line 14 of file alias.c.
NTSTATUS SampOpenDbObject | ( | IN PSAM_DB_OBJECT | ParentObject, |
IN LPWSTR | ContainerName, | ||
IN LPWSTR | ObjectName, | ||
IN ULONG | RelativeId, | ||
IN SAM_DB_OBJECT_TYPE | ObjectType, | ||
IN ACCESS_MASK | DesiredAccess, | ||
OUT PSAM_DB_OBJECT * | DbObject | ||
) |
Definition at line 173 of file database.c.
Referenced by SamIConnect(), SampFillUserDisplayCache(), SampOpenAliasObject(), SampOpenGroupObject(), SampOpenUserObject(), SamrConnect5(), SamrGetDomainPasswordInformation(), SamrOpenAlias(), SamrOpenDomain(), SamrOpenGroup(), and SamrOpenUser().
NTSTATUS SampOpenGroupObject | ( | IN PSAM_DB_OBJECT | DomainObject, |
IN ULONG | GroupId, | ||
IN ACCESS_MASK | DesiredAccess, | ||
OUT PSAM_DB_OBJECT * | GroupObject | ||
) |
Definition at line 14 of file group.c.
Referenced by SampRemoveUserFromAllGroups().
NTSTATUS SampOpenUserObject | ( | IN PSAM_DB_OBJECT | DomainObject, |
IN ULONG | UserId, | ||
IN ACCESS_MASK | DesiredAccess, | ||
OUT PSAM_DB_OBJECT * | UserObject | ||
) |
Definition at line 14 of file user.c.
Referenced by SampGetUserGroupAttributes(), SampSetUserGroupAttributes(), SamrAddMemberToGroup(), and SamrRemoveMemberFromGroup().
Definition at line 26 of file registry.c.
Referenced by SampAddMemberToAlias(), SampCheckAccountNameInDomain(), SampCloseDbObject(), SampCreateDbObject(), SampDeleteAccountDbObject(), SampGetNumberOfAccounts(), SampInitializeSAM(), SampOpenDbObject(), SampQueryAliasGeneral(), SampRemoveAccountNameFromDomain(), SampRemoveAllMembersFromAlias(), SampRemoveMemberFromAlias(), SampRemoveMemberFromAllAliases(), SampSetAccountNameInDomain(), SampSetupAddMemberToGroup(), SampSetupCreateAliasAccount(), SampSetupCreateDomain(), SampSetupCreateGroupAccount(), SampSetupCreateServer(), SampSetupCreateUserAccount(), SamrEnumerateAliasesInDomain(), SamrEnumerateDomainsInSamServer(), SamrEnumerateGroupsInDomain(), SamrEnumerateUsersInDomain(), SamrGetAliasMembership(), SamrLookupDomainInSamServer(), SamrLookupIdsInDomain(), and SamrLookupNamesInDomain().
NTSTATUS SampRegCreateKey | ( | IN HANDLE | ParentKeyHandle, |
IN LPCWSTR | KeyName, | ||
IN ACCESS_MASK | DesiredAccess, | ||
OUT PHANDLE | KeyHandle | ||
) |
Definition at line 42 of file registry.c.
Referenced by SampAddMemberToAlias(), SampCreateDbObject(), SampSetupCreateAliasAccount(), SampSetupCreateDomain(), SampSetupCreateGroupAccount(), SampSetupCreateServer(), and SampSetupCreateUserAccount().
Definition at line 71 of file registry.c.
Referenced by SampDeleteAccountDbObject(), SampRemoveMemberFromAlias(), SampRemoveMemberFromAllAliases(), SampSetupCreateAliasAccount(), SampSetupCreateGroupAccount(), and SampSetupCreateUserAccount().
Definition at line 212 of file registry.c.
Referenced by SampDeleteAccountDbObject(), SampRemoveAccountNameFromDomain(), SampRemoveMemberFromAlias(), and SampRemoveMemberFromAllAliases().
NTSTATUS SampRegEnumerateSubKey | ( | IN HANDLE | KeyHandle, |
IN ULONG | Index, | ||
IN ULONG | Length, | ||
OUT LPWSTR | Buffer | ||
) |
Definition at line 101 of file registry.c.
Referenced by SampFillUserDisplayCache(), SampRemoveMemberFromAllAliases(), SamrEnumerateDomainsInSamServer(), and SamrLookupDomainInSamServer().
NTSTATUS SampRegEnumerateValue | ( | IN HANDLE | KeyHandle, |
IN ULONG | Index, | ||
OUT LPWSTR | Name, | ||
IN OUT PULONG | NameLength, | ||
OUT PULONG Type | OPTIONAL, | ||
OUT PVOID Data | OPTIONAL, | ||
IN OUT PULONG DataLength | OPTIONAL | ||
) |
Definition at line 226 of file registry.c.
Referenced by SampGetMembersInAlias(), SamrEnumerateAliasesInDomain(), SamrEnumerateGroupsInDomain(), SamrEnumerateUsersInDomain(), and SamrGetAliasMembership().
NTSTATUS SampRegOpenKey | ( | IN HANDLE | ParentKeyHandle, |
IN LPCWSTR | KeyName, | ||
IN ACCESS_MASK | DesiredAccess, | ||
OUT PHANDLE | KeyHandle | ||
) |
Definition at line 158 of file registry.c.
Referenced by SampCheckAccountNameInDomain(), SampCreateDbObject(), SampDeleteAccountDbObject(), SampFillUserDisplayCache(), SampGetMembersInAlias(), SampGetNumberOfAccounts(), SampInitDatabase(), SampInitializeSAM(), SampOpenDbObject(), SampQueryAliasGeneral(), SampRemoveAccountNameFromDomain(), SampRemoveAllMembersFromAlias(), SampRemoveMemberFromAlias(), SampRemoveMemberFromAllAliases(), SampSetAccountNameInDomain(), SampSetupAddMemberToGroup(), SampSetupCreateAliasAccount(), SampSetupCreateGroupAccount(), SampSetupCreateUserAccount(), SamrEnumerateAliasesInDomain(), SamrEnumerateDomainsInSamServer(), SamrEnumerateGroupsInDomain(), SamrEnumerateUsersInDomain(), SamrGetAliasMembership(), SamrLookupDomainInSamServer(), SamrLookupIdsInDomain(), and SamrLookupNamesInDomain().
Definition at line 181 of file registry.c.
Referenced by SampGetMembersInAlias(), SampGetNumberOfAccounts(), SampQueryAliasGeneral(), SampRemoveMemberFromAlias(), and SamrGetAliasMembership().