2012-05-20 18:31:10 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
2013-01-12 16:22:46 +00:00
|
|
|
* PROJECT: Security Account Manager (LSA) Server
|
2012-05-20 18:31:10 +00:00
|
|
|
* FILE: reactos/dll/win32/samsrv/samsrv.h
|
|
|
|
* PURPOSE: Common header file
|
|
|
|
*
|
|
|
|
* PROGRAMMERS: Eric Kohl
|
|
|
|
*/
|
|
|
|
|
2012-05-31 11:07:51 +00:00
|
|
|
#include <stdio.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <stdlib.h>
|
2014-01-25 13:16:43 +00:00
|
|
|
|
2012-05-20 18:31:10 +00:00
|
|
|
#define WIN32_NO_STATUS
|
2013-01-24 23:00:42 +00:00
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
2014-01-25 13:16:43 +00:00
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winreg.h>
|
2012-05-20 18:31:10 +00:00
|
|
|
#define NTOS_MODE_USER
|
2012-07-01 16:51:10 +00:00
|
|
|
#include <ndk/kefuncs.h>
|
2012-05-27 05:33:07 +00:00
|
|
|
#include <ndk/rtlfuncs.h>
|
|
|
|
#include <ddk/ntsam.h>
|
2012-06-03 20:54:06 +00:00
|
|
|
#include <sddl.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <sam_s.h>
|
2012-05-20 18:31:10 +00:00
|
|
|
|
2012-05-21 13:38:32 +00:00
|
|
|
#include <wine/debug.h>
|
2013-12-27 10:25:26 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(samsrv);
|
2012-05-21 13:38:32 +00:00
|
|
|
|
2012-05-27 05:33:07 +00:00
|
|
|
typedef enum _SAM_DB_OBJECT_TYPE
|
|
|
|
{
|
|
|
|
SamDbIgnoreObject,
|
|
|
|
SamDbServerObject,
|
|
|
|
SamDbDomainObject,
|
|
|
|
SamDbAliasObject,
|
|
|
|
SamDbGroupObject,
|
|
|
|
SamDbUserObject
|
|
|
|
} SAM_DB_OBJECT_TYPE;
|
|
|
|
|
|
|
|
typedef struct _SAM_DB_OBJECT
|
|
|
|
{
|
|
|
|
ULONG Signature;
|
|
|
|
SAM_DB_OBJECT_TYPE ObjectType;
|
|
|
|
ULONG RefCount;
|
|
|
|
ACCESS_MASK Access;
|
2012-06-07 10:31:17 +00:00
|
|
|
LPWSTR Name;
|
2012-05-27 05:33:07 +00:00
|
|
|
HANDLE KeyHandle;
|
2013-01-20 10:22:15 +00:00
|
|
|
HANDLE MembersKeyHandle; // only used by Aliases
|
2012-12-29 14:44:42 +00:00
|
|
|
ULONG RelativeId;
|
2013-03-11 21:01:30 +00:00
|
|
|
BOOLEAN Trusted;
|
2012-05-27 05:33:07 +00:00
|
|
|
struct _SAM_DB_OBJECT *ParentObject;
|
|
|
|
} SAM_DB_OBJECT, *PSAM_DB_OBJECT;
|
|
|
|
|
|
|
|
#define SAMP_DB_SIGNATURE 0x87654321
|
|
|
|
|
2012-07-15 13:35:40 +00:00
|
|
|
typedef struct _SAM_ALIAS_FIXED_DATA
|
|
|
|
{
|
|
|
|
ULONG Version;
|
|
|
|
ULONG Reserved;
|
|
|
|
ULONG AliasId;
|
|
|
|
} SAM_ALIAS_FIXED_DATA, *PSAM_ALIAS_FIXED_DATA;
|
|
|
|
|
2012-07-01 16:51:10 +00:00
|
|
|
typedef struct _SAM_DOMAIN_FIXED_DATA
|
|
|
|
{
|
|
|
|
ULONG Version;
|
|
|
|
ULONG Reserved;
|
|
|
|
LARGE_INTEGER CreationTime;
|
|
|
|
LARGE_INTEGER DomainModifiedCount;
|
2013-03-12 21:27:35 +00:00
|
|
|
LARGE_INTEGER MaxPasswordAge; /* relative Time */
|
|
|
|
LARGE_INTEGER MinPasswordAge; /* relative Time */
|
|
|
|
LARGE_INTEGER ForceLogoff; /* relative Time */
|
|
|
|
LARGE_INTEGER LockoutDuration; /* relative Time */
|
|
|
|
LARGE_INTEGER LockoutObservationWindow; /* relative Time */
|
2012-07-01 16:51:10 +00:00
|
|
|
LARGE_INTEGER ModifiedCountAtLastPromotion;
|
|
|
|
ULONG NextRid;
|
|
|
|
ULONG PasswordProperties;
|
|
|
|
USHORT MinPasswordLength;
|
|
|
|
USHORT PasswordHistoryLength;
|
|
|
|
USHORT LockoutThreshold;
|
|
|
|
DOMAIN_SERVER_ENABLE_STATE DomainServerState;
|
|
|
|
DOMAIN_SERVER_ROLE DomainServerRole;
|
|
|
|
BOOLEAN UasCompatibilityRequired;
|
|
|
|
} SAM_DOMAIN_FIXED_DATA, *PSAM_DOMAIN_FIXED_DATA;
|
|
|
|
|
2012-07-15 13:35:40 +00:00
|
|
|
typedef struct _SAM_GROUP_FIXED_DATA
|
|
|
|
{
|
|
|
|
ULONG Version;
|
|
|
|
ULONG Reserved;
|
|
|
|
ULONG GroupId;
|
|
|
|
ULONG Attributes;
|
|
|
|
} SAM_GROUP_FIXED_DATA, *PSAM_GROUP_FIXED_DATA;
|
|
|
|
|
2012-07-02 23:09:20 +00:00
|
|
|
typedef struct _SAM_USER_FIXED_DATA
|
|
|
|
{
|
|
|
|
ULONG Version;
|
|
|
|
ULONG Reserved;
|
|
|
|
LARGE_INTEGER LastLogon;
|
|
|
|
LARGE_INTEGER LastLogoff;
|
|
|
|
LARGE_INTEGER PasswordLastSet;
|
|
|
|
LARGE_INTEGER AccountExpires;
|
|
|
|
LARGE_INTEGER LastBadPasswordTime;
|
|
|
|
ULONG UserId;
|
|
|
|
ULONG PrimaryGroupId;
|
|
|
|
ULONG UserAccountControl;
|
|
|
|
USHORT CountryCode;
|
|
|
|
USHORT CodePage;
|
|
|
|
USHORT BadPasswordCount;
|
|
|
|
USHORT LogonCount;
|
|
|
|
USHORT AdminCount;
|
|
|
|
USHORT OperatorCount;
|
|
|
|
} SAM_USER_FIXED_DATA, *PSAM_USER_FIXED_DATA;
|
|
|
|
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2013-03-11 21:01:30 +00:00
|
|
|
extern PGENERIC_MAPPING pServerMapping;
|
2013-05-26 10:48:54 +00:00
|
|
|
extern ENCRYPTED_NT_OWF_PASSWORD EmptyNtHash;
|
|
|
|
extern ENCRYPTED_LM_OWF_PASSWORD EmptyLmHash;
|
2013-09-01 15:46:00 +00:00
|
|
|
extern RTL_RESOURCE SampResource;
|
2013-03-11 21:01:30 +00:00
|
|
|
|
|
|
|
|
2013-03-12 20:07:56 +00:00
|
|
|
/* alias.c */
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampOpenAliasObject(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN ULONG AliasId,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
OUT PSAM_DB_OBJECT *AliasObject);
|
|
|
|
|
2013-05-23 09:42:25 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampAddMemberToAlias(IN PSAM_DB_OBJECT AliasObject,
|
|
|
|
IN PRPC_SID MemberId);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
SampRemoveMemberFromAlias(IN PSAM_DB_OBJECT AliasObject,
|
|
|
|
IN PRPC_SID MemberId);
|
|
|
|
|
2013-09-29 08:53:24 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampGetMembersInAlias(IN PSAM_DB_OBJECT AliasObject,
|
|
|
|
OUT PULONG MemberCount,
|
|
|
|
OUT PSAMPR_SID_INFORMATION *MemberArray);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampRemoveAllMembersFromAlias(IN PSAM_DB_OBJECT AliasObject);
|
|
|
|
|
2013-03-12 20:07:56 +00:00
|
|
|
|
2012-05-27 05:33:07 +00:00
|
|
|
/* database.c */
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampInitDatabase(VOID);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampCreateDbObject(IN PSAM_DB_OBJECT ParentObject,
|
|
|
|
IN LPWSTR ContainerName,
|
|
|
|
IN LPWSTR ObjectName,
|
2012-12-29 14:44:42 +00:00
|
|
|
IN ULONG RelativeId,
|
2012-05-27 05:33:07 +00:00
|
|
|
IN SAM_DB_OBJECT_TYPE ObjectType,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
OUT PSAM_DB_OBJECT *DbObject);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject,
|
|
|
|
IN LPWSTR ContainerName,
|
|
|
|
IN LPWSTR ObjectName,
|
2012-12-29 14:44:42 +00:00
|
|
|
IN ULONG RelativeId,
|
2012-05-27 05:33:07 +00:00
|
|
|
IN SAM_DB_OBJECT_TYPE ObjectType,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
OUT PSAM_DB_OBJECT *DbObject);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampValidateDbObject(SAMPR_HANDLE Handle,
|
|
|
|
SAM_DB_OBJECT_TYPE ObjectType,
|
|
|
|
ACCESS_MASK DesiredAccess,
|
|
|
|
PSAM_DB_OBJECT *DbObject);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampCloseDbObject(PSAM_DB_OBJECT DbObject);
|
|
|
|
|
2013-01-20 10:22:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampDeleteAccountDbObject(PSAM_DB_OBJECT DbObject);
|
|
|
|
|
2012-05-28 12:26:54 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampSetObjectAttribute(PSAM_DB_OBJECT DbObject,
|
|
|
|
LPWSTR AttributeName,
|
|
|
|
ULONG AttributeType,
|
|
|
|
LPVOID AttributeData,
|
|
|
|
ULONG AttributeSize);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampGetObjectAttribute(PSAM_DB_OBJECT DbObject,
|
|
|
|
LPWSTR AttributeName,
|
|
|
|
PULONG AttributeType,
|
|
|
|
LPVOID AttributeData,
|
|
|
|
PULONG AttributeSize);
|
|
|
|
|
2012-07-08 09:33:35 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampGetObjectAttributeString(PSAM_DB_OBJECT DbObject,
|
|
|
|
LPWSTR AttributeName,
|
2013-09-02 20:36:42 +00:00
|
|
|
PRPC_UNICODE_STRING String);
|
2012-07-08 09:33:35 +00:00
|
|
|
|
2013-09-02 20:36:42 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampSetObjectAttributeString(PSAM_DB_OBJECT DbObject,
|
|
|
|
LPWSTR AttributeName,
|
|
|
|
PRPC_UNICODE_STRING String);
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2013-01-12 16:22:46 +00:00
|
|
|
/* domain.c */
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampSetAccountNameInDomain(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN LPCWSTR lpContainerName,
|
|
|
|
IN LPCWSTR lpAccountName,
|
|
|
|
IN ULONG ulRelativeId);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampRemoveAccountNameFromDomain(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN LPCWSTR lpContainerName,
|
|
|
|
IN LPCWSTR lpAccountName);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampCheckAccountNameInDomain(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN LPCWSTR lpAccountName);
|
|
|
|
|
2013-05-22 13:56:49 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampRemoveMemberFromAllAliases(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN PRPC_SID MemberSid);
|
|
|
|
|
2013-10-26 09:09:31 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampCreateAccountSid(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN ULONG ulRelativeId,
|
|
|
|
IN OUT PSID *AccountSid);
|
2013-01-12 16:22:46 +00:00
|
|
|
|
2013-01-12 15:30:28 +00:00
|
|
|
/* group.h */
|
|
|
|
|
2013-03-12 20:07:56 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampOpenGroupObject(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN ULONG GroupId,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
OUT PSAM_DB_OBJECT *GroupObject);
|
|
|
|
|
2013-01-12 15:30:28 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampAddMemberToGroup(IN PSAM_DB_OBJECT GroupObject,
|
|
|
|
IN ULONG MemberId);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampRemoveMemberFromGroup(IN PSAM_DB_OBJECT GroupObject,
|
|
|
|
IN ULONG MemberId);
|
|
|
|
|
|
|
|
|
2012-06-01 18:03:25 +00:00
|
|
|
/* registry.h */
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2012-06-01 18:03:25 +00:00
|
|
|
NTSTATUS
|
2013-09-01 15:46:00 +00:00
|
|
|
SampRegCloseKey(IN OUT PHANDLE KeyHandle);
|
2012-06-03 20:54:06 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampRegCreateKey(IN HANDLE ParentKeyHandle,
|
|
|
|
IN LPCWSTR KeyName,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
2013-09-01 15:46:00 +00:00
|
|
|
OUT PHANDLE KeyHandle);
|
2012-06-03 20:54:06 +00:00
|
|
|
|
2012-07-15 13:35:40 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampRegDeleteKey(IN HANDLE ParentKeyHandle,
|
|
|
|
IN LPCWSTR KeyName);
|
|
|
|
|
2012-06-03 20:54:06 +00:00
|
|
|
NTSTATUS
|
2012-06-01 18:03:25 +00:00
|
|
|
SampRegEnumerateSubKey(IN HANDLE KeyHandle,
|
|
|
|
IN ULONG Index,
|
|
|
|
IN ULONG Length,
|
|
|
|
OUT LPWSTR Buffer);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampRegOpenKey(IN HANDLE ParentKeyHandle,
|
|
|
|
IN LPCWSTR KeyName,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
2013-09-01 15:46:00 +00:00
|
|
|
OUT PHANDLE KeyHandle);
|
2012-06-01 18:03:25 +00:00
|
|
|
|
2012-06-07 10:31:17 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampRegQueryKeyInfo(IN HANDLE KeyHandle,
|
|
|
|
OUT PULONG SubKeyCount,
|
|
|
|
OUT PULONG ValueCount);
|
|
|
|
|
2012-07-15 13:35:40 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampRegDeleteValue(IN HANDLE KeyHandle,
|
2013-01-12 15:30:28 +00:00
|
|
|
IN LPCWSTR ValueName);
|
2012-07-15 13:35:40 +00:00
|
|
|
|
2012-06-07 10:31:17 +00:00
|
|
|
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);
|
|
|
|
|
2012-06-01 18:03:25 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampRegQueryValue(IN HANDLE KeyHandle,
|
2013-01-12 15:30:28 +00:00
|
|
|
IN LPCWSTR ValueName,
|
2012-06-01 18:03:25 +00:00
|
|
|
OUT PULONG Type OPTIONAL,
|
|
|
|
OUT LPVOID Data OPTIONAL,
|
|
|
|
IN OUT PULONG DataLength OPTIONAL);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampRegSetValue(IN HANDLE KeyHandle,
|
2013-01-12 15:30:28 +00:00
|
|
|
IN LPCWSTR ValueName,
|
2012-06-01 18:03:25 +00:00
|
|
|
IN ULONG Type,
|
|
|
|
IN LPVOID Data,
|
|
|
|
IN ULONG DataLength);
|
|
|
|
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2012-05-27 05:33:07 +00:00
|
|
|
/* samspc.c */
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2013-05-22 13:56:49 +00:00
|
|
|
VOID
|
|
|
|
SampStartRpcServer(VOID);
|
2012-05-21 13:38:32 +00:00
|
|
|
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2013-06-23 14:26:18 +00:00
|
|
|
/* security.c */
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampCreateServerSD(OUT PSECURITY_DESCRIPTOR *ServerSd,
|
|
|
|
OUT PULONG Size);
|
|
|
|
|
2013-07-14 18:41:29 +00:00
|
|
|
NTSTATUS
|
2013-10-21 18:53:26 +00:00
|
|
|
SampCreateBuiltinDomainSD(OUT PSECURITY_DESCRIPTOR *DomainSd,
|
2013-07-14 18:41:29 +00:00
|
|
|
OUT PULONG Size);
|
|
|
|
|
|
|
|
NTSTATUS
|
2013-10-21 18:53:26 +00:00
|
|
|
SampCreateAccountDomainSD(OUT PSECURITY_DESCRIPTOR *DomainSd,
|
2013-07-14 18:41:29 +00:00
|
|
|
OUT PULONG Size);
|
|
|
|
|
2013-10-21 18:53:26 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampCreateAliasSD(OUT PSECURITY_DESCRIPTOR *AliasSd,
|
|
|
|
OUT PULONG Size);
|
|
|
|
|
2013-10-21 20:16:56 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampCreateGroupSD(OUT PSECURITY_DESCRIPTOR *GroupSd,
|
|
|
|
OUT PULONG Size);
|
|
|
|
|
2013-10-26 09:09:31 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampCreateUserSD(IN PSID UserSid,
|
|
|
|
OUT PSECURITY_DESCRIPTOR *UserSd,
|
|
|
|
OUT PULONG Size);
|
2013-06-23 14:26:18 +00:00
|
|
|
|
2012-05-21 13:38:32 +00:00
|
|
|
/* setup.c */
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2013-05-22 13:56:49 +00:00
|
|
|
BOOL
|
|
|
|
SampInitializeSAM(VOID);
|
2013-01-12 15:30:28 +00:00
|
|
|
|
2013-01-12 21:32:26 +00:00
|
|
|
|
|
|
|
/* user.c */
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampOpenUserObject(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN ULONG UserId,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
OUT PSAM_DB_OBJECT *UserObject);
|
|
|
|
|
|
|
|
NTSTATUS
|
2013-01-13 19:51:33 +00:00
|
|
|
SampAddGroupMembershipToUser(IN PSAM_DB_OBJECT UserObject,
|
|
|
|
IN ULONG GroupId,
|
|
|
|
IN ULONG Attributes);
|
2013-01-12 21:32:26 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2013-01-13 19:51:33 +00:00
|
|
|
SampRemoveGroupMembershipFromUser(IN PSAM_DB_OBJECT UserObject,
|
|
|
|
IN ULONG GroupId);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampGetUserGroupAttributes(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN ULONG UserId,
|
|
|
|
IN ULONG GroupId,
|
|
|
|
OUT PULONG GroupAttributes);
|
2013-01-12 21:32:26 +00:00
|
|
|
|
2013-01-14 21:56:45 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampSetUserGroupAttributes(IN PSAM_DB_OBJECT DomainObject,
|
|
|
|
IN ULONG UserId,
|
|
|
|
IN ULONG GroupId,
|
|
|
|
IN ULONG GroupAttributes);
|
|
|
|
|
2013-03-12 20:07:56 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject);
|
|
|
|
|
2013-11-16 09:07:37 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampRemoveUserFromAllAliases(IN PSAM_DB_OBJECT UserObject);
|
|
|
|
|
2013-02-03 00:13:53 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampSetUserPassword(IN PSAM_DB_OBJECT UserObject,
|
|
|
|
IN PENCRYPTED_NT_OWF_PASSWORD NtPassword,
|
|
|
|
IN BOOLEAN NtPasswordPresent,
|
|
|
|
IN PENCRYPTED_LM_OWF_PASSWORD LmPassword,
|
|
|
|
IN BOOLEAN LmPasswordPresent);
|
|
|
|
|
2013-03-31 12:27:50 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampGetLogonHoursAttrbute(IN PSAM_DB_OBJECT UserObject,
|
2013-04-07 17:58:11 +00:00
|
|
|
IN OUT PSAMPR_LOGON_HOURS LogonHours);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampSetLogonHoursAttrbute(IN PSAM_DB_OBJECT UserObject,
|
2013-03-31 12:27:50 +00:00
|
|
|
IN PSAMPR_LOGON_HOURS LogonHours);
|
|
|
|
|
2013-05-22 13:56:49 +00:00
|
|
|
|
|
|
|
/* utils.c */
|
|
|
|
|
|
|
|
INT
|
|
|
|
SampLoadString(HINSTANCE hInstance,
|
|
|
|
UINT uId,
|
|
|
|
LPWSTR lpBuffer,
|
|
|
|
INT nBufferMax);
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
SampIsSetupRunning(VOID);
|
|
|
|
|
|
|
|
PSID
|
|
|
|
AppendRidToSid(PSID SrcSid,
|
|
|
|
ULONG Rid);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SampGetRidFromSid(IN PSID Sid,
|
|
|
|
OUT PULONG Rid);
|
|
|
|
|
2013-07-28 22:18:42 +00:00
|
|
|
NTSTATUS
|
|
|
|
SampCheckAccountName(IN PRPC_UNICODE_STRING AccountName,
|
|
|
|
IN USHORT MaxLength);
|
|
|
|
|
2013-05-26 10:48:54 +00:00
|
|
|
|
|
|
|
/* Undocumented advapi32 functions */
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
WINAPI
|
|
|
|
SystemFunction006(LPCSTR password,
|
|
|
|
LPSTR hash);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
WINAPI
|
|
|
|
SystemFunction007(PUNICODE_STRING string,
|
|
|
|
LPBYTE hash);
|