208 ULONG AccountControl = 0;
237 return AccountControl;
246 ULONG SystemSecondsSince1970;
247 ULONG PasswordSecondsSince1970;
257 return SystemSecondsSince1970 - PasswordSecondsSince1970;
277 Ace->Mask &= ~USER_CHANGE_PASSWORD;
306 TRACE(
"SamQuerySecurityObject() failed (Status 0x%08lx)\n",
Status);
317 TRACE(
"RtlGetDaclSecurityDescriptor() failed (Status 0x%08lx)\n",
Status);
322 if (Present ==
FALSE)
324 TRACE(
"No DACL present\n");
335 TRACE(
"RtlQueryInformationAcl() failed (Status 0x%08lx)\n",
Status);
341 if (LocalDacl ==
NULL)
343 TRACE(
"Memory allocation failed\n");
358 TRACE(
"done (ApiStatus: 0x%08lx)\n", ApiStatus);
419 ULONG GroupCount, SidCount, AliasCount,
i;
426 FIXME(
"GetUserPrivileges(%p)\n", UserHandle);
434 ERR(
"SamGetGroupsForUser() failed (Status 0x%08lx)\n",
Status);
460 for (
i = 0;
i < GroupCount;
i++)
463 GroupMembership[
i].RelativeId,
481 ERR(
"SamGetAliasMembership() failed (Status 0x%08lx)\n",
Status);
489 for (
i = 0;
i < AliasCount;
i++)
491 switch (AliasArray[
i])
530 if (AliasArray !=
NULL)
533 if (SidArray !=
NULL)
535 for (
i = 0;
i < SidCount;
i++)
541 if (GroupMembership !=
NULL)
562 DWORD Priv = 0, AuthFlags = 0;
584 ERR(
"SamQueryInformationUser failed (Status %08lx)\n",
Status);
1393 if (UserInfo !=
NULL)
1405 if (LocalBuffer !=
NULL)
1603 if (parm_err !=
NULL)
1717 if (parm_err !=
NULL)
1853 if (parm_err !=
NULL)
1986 if (parm_err !=
NULL)
2136 if (parm_err !=
NULL)
2200 ERR(
"SamSetInformationUser failed (Status %08lx)\n",
Status);
2233 ERR(
"SamLookupNamesInDomain(%wZ) failed (Status %08lx)\n", UserName,
Status);
2240 ERR(
"Object is not a user!\n");
2252 ERR(
"SamOpenUser failed (Status %08lx)\n",
Status);
2258 if (RelativeIds !=
NULL)
2290 if (parm_err !=
NULL)
2306 if (servername !=
NULL)
2316 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
2323 (servername !=
NULL) ? &ServerName :
NULL,
2328 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
2347 ERR(
"SamCreateUser2InDomain failed (Status %08lx)\n",
Status);
2359 ERR(
"SetUserInfo failed (Status %lu)\n", ApiStatus);
2364 if (UserHandle !=
NULL)
2372 if (DomainHandle !=
NULL)
2375 if (ServerHandle !=
NULL)
2406 ULONG RequestBufferSize;
2407 ULONG ResponseBufferSize = 0;
2421 if ((oldpassword ==
NULL) ||
2422 (newpassword ==
NULL))
2452 (
PVOID*)&RequestBuffer);
2509 (
PVOID*)&ResponseBuffer,
2510 &ResponseBufferSize,
2525 if (RequestBuffer !=
NULL)
2528 if (ResponseBuffer !=
NULL)
2556 if (servername !=
NULL)
2568 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
2579 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
2591 TRACE(
"OpenUserByName(%wZ) failed (ApiStatus %lu)\n", &UserName, ApiStatus);
2595 if (UserHandle ==
NULL)
2597 if (DomainHandle !=
NULL)
2600 DomainHandle =
NULL;
2605 (servername !=
NULL) ? &ServerName :
NULL,
2610 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
2622 ERR(
"OpenUserByName(%wZ) failed (ApiStatus %lu)\n", &UserName, ApiStatus);
2633 ERR(
"SamDeleteUser failed (Status %08lx)\n",
Status);
2642 if (UserHandle !=
NULL)
2645 if (DomainHandle !=
NULL)
2648 if (ServerHandle !=
NULL)
2670 EnumContext->
Count = 0;
2671 EnumContext->
Index = 0;
2686 *AllocatedEnumContext = EnumContext;
2719 ListEntry = ListEntry->
Flink)
2722 if (EnumContext->
EnumHandle == EnumerationHandle)
2724 FoundEnumContext = EnumContext;
2732 return FoundEnumContext;
2760 filter,
bufptr, prefmaxlen, entriesread, totalentries, resume_handle);
2766 if (servername !=
NULL)
2769 if (resume_handle !=
NULL && *resume_handle != 0)
2785 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
2795 ERR(
"GetAccountDomainSid failed (Status %08lx)\n",
Status);
2807 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
2816 ERR(
"GetBuiltinDomainSid failed (Status %08lx)\n",
Status);
2832 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
2840 TRACE(
"EnumContext->Index: %lu\n", EnumContext->
Index);
2841 TRACE(
"EnumContext->Count: %lu\n", EnumContext->
Count);
2843 if (EnumContext->
Index >= EnumContext->
Count)
2851 TRACE(
"Calling SamEnumerateUsersInDomain\n");
2857 &EnumContext->
Count);
2859 TRACE(
"SamEnumerateUsersInDomain returned (Status %08lx)\n",
Status);
2862 ERR(
"SamEnumerateUsersInDomain failed (Status %08lx)\n",
Status);
2878 TRACE(
"EnumContext: %lu\n", EnumContext);
2879 TRACE(
"EnumContext->Count: %lu\n", EnumContext->
Count);
2880 TRACE(
"EnumContext->Buffer: %p\n", EnumContext->
Buffer);
2897 ERR(
"SamOpenUser failed (Status %08lx)\n",
Status);
2910 ERR(
"BuildUserInfoBuffer failed (ApiStatus %lu)\n", ApiStatus);
2917 EnumContext->
Index++;
2926 if (EnumContext !=
NULL)
2927 *totalentries = EnumContext->
Count;
2931 if (EnumContext !=
NULL)
2950 for (
i = 0;
i < EnumContext->
Count;
i++)
2963 if (UserHandle !=
NULL)
2966 if (resume_handle !=
NULL)
2967 *resume_handle = EnumContext ? EnumContext->
EnumHandle : 0;
2971 TRACE(
"return %lu\n", ApiStatus);
3008 if (servername !=
NULL)
3020 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
3030 ERR(
"GetAccountDomainSid failed (Status %08lx)\n",
Status);
3039 &AccountDomainHandle);
3042 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
3055 ERR(
"SamLookupNamesInDomain(%wZ) failed (Status %08lx)\n", &UserName,
Status);
3066 ERR(
"Account is not a User!\n");
3078 ERR(
"SamOpenUser failed (Status %08lx)\n",
Status);
3089 ERR(
"SamGetGroupsForUser failed (Status %08lx)\n",
Status);
3095 if (GroupCount == 0)
3104 if (GroupMembership !=
NULL)
3107 if (UserHandle !=
NULL)
3110 if (RelativeIds !=
NULL)
3119 if (AccountDomainHandle !=
NULL)
3122 if (ServerHandle !=
NULL)
3170 if (servername !=
NULL)
3182 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
3191 ERR(
"GetBuiltinDomainSid failed (Status %08lx)\n",
Status);
3204 &BuiltinDomainHandle);
3207 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
3217 ERR(
"GetAccountDomainSid failed (Status %08lx)\n",
Status);
3226 &AccountDomainHandle);
3229 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
3242 ERR(
"SamLookupNamesInDomain(%wZ) failed (Status %08lx)\n", &UserName,
Status);
3253 ERR(
"No user found!\n");
3258 TRACE(
"RID: %lu\n", RelativeIds[0]);
3271 ERR(
"SamOpenUser failed (Status %08lx)\n",
Status);
3284 ERR(
"BuildUserInfoBuffer failed (ApiStatus %08lu)\n", ApiStatus);
3289 if (UserHandle !=
NULL)
3292 if (RelativeIds !=
NULL)
3298 if (AccountDomainHandle !=
NULL)
3304 if (BuiltinDomainHandle !=
NULL)
3310 if (ServerHandle !=
NULL)
3342 ULONG BuiltinMemberCount = 0;
3343 ULONG AccountMemberCount = 0;
3357 TRACE(
"(%s, %s, %d, %08x, %p %d, %p, %p) stub!\n",
3359 prefmaxlen, entriesread, totalentries);
3369 WARN(
"The flag LG_INCLUDE_INDIRECT is not supported yet!\n");
3372 if (servername !=
NULL)
3384 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
3392 &BuiltinDomainHandle);
3395 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
3405 ERR(
"GetAccountDomainSid failed (Status %08lx)\n",
Status);
3414 &AccountDomainHandle);
3417 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
3430 ERR(
"SamLookupNamesInDomain(%wZ) failed (Status %08lx)\n", &UserName,
Status);
3441 ERR(
"Account is not a User!\n");
3452 ERR(
"BuildSidFromSidAndRid failed!\n");
3460 &BuiltinMemberCount,
3464 ERR(
"SamGetAliasMembership failed (Status %08lx)\n",
Status);
3469 if (BuiltinMemberCount > 0)
3479 ERR(
"SamLookupIdsInDomain failed (Status %08lx)\n",
Status);
3489 &AccountMemberCount,
3493 ERR(
"SamGetAliasMembership failed (Status %08lx)\n",
Status);
3498 if (AccountMemberCount > 0)
3508 ERR(
"SamLookupIdsInDomain failed (Status %08lx)\n",
Status);
3517 for (
i = 0;
i < BuiltinMemberCount;
i++)
3519 if (BuiltinNames[
i].
Length > 0)
3526 for (
i = 0;
i < AccountMemberCount;
i++)
3528 if (AccountNames[
i].
Length > 0)
3552 for (
i = 0;
i < BuiltinMemberCount;
i++)
3554 if (BuiltinNames[
i].
Length > 0)
3566 for (
i = 0;
i < AccountMemberCount;
i++)
3568 if (AccountNames[
i].
Length > 0)
3581 if (AccountNames !=
NULL)
3584 if (BuiltinNames !=
NULL)
3587 if (AccountAliases !=
NULL)
3590 if (BuiltinAliases !=
NULL)
3593 if (RelativeIds !=
NULL)
3599 if (UserSid !=
NULL)
3605 if (AccountDomainHandle !=
NULL)
3608 if (BuiltinDomainHandle !=
NULL)
3611 if (ServerHandle !=
NULL)
3621 *entriesread =
Count;
3622 *totalentries =
Count;
3686 if (servername !=
NULL)
3696 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
3706 ERR(
"GetAccountDomainSid failed (Status %08lx)\n",
Status);
3741 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
3752 (
PVOID*)&PasswordInfo);
3761 (
PVOID*)&LogoffInfo);
3775 (
PVOID*)&ServerRoleInfo);
3784 (
PVOID*)&ReplicationInfo);
3792 ReplicationInfo->ReplicaSourceNodeName.Length +
sizeof(
WCHAR);
3807 NameInfo->DomainName.Length +
sizeof(
WCHAR) +
3815 (
PVOID*)&LockoutInfo);
3826 TRACE(
"Invalid level %d is specified\n",
level);
3836 WARN(
"NetApiBufferAllocate() failed\n");
3907 if (LockoutInfo !=
NULL)
3910 if (NameInfo !=
NULL)
3913 if (ReplicationInfo !=
NULL)
3916 if (ServerRoleInfo !=
NULL)
3919 if (LogoffInfo !=
NULL)
3922 if (PasswordInfo !=
NULL)
3925 if (DomainSid !=
NULL)
3928 if (DomainHandle !=
NULL)
3931 if (ServerHandle !=
NULL)
3964 FIXME(
"(%s %s %lu %p %lu)\n",
3989 TRACE(
"(%s %s %lu %p %p)\n",
3992 if (parm_err !=
NULL)
4030 if (servername !=
NULL)
4042 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
4049 (servername !=
NULL) ? &ServerName :
NULL,
4051 &AccountDomainHandle);
4054 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
4066 ERR(
"OpenUserByName(%wZ) failed (ApiStatus %lu)\n", &UserName, ApiStatus);
4077 ERR(
"SetUserInfo failed (Status %lu)\n", ApiStatus);
4081 if (UserHandle !=
NULL)
4084 if (AccountDomainHandle !=
NULL)
4087 if (ServerHandle !=
NULL)
#define InterlockedIncrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
ULONG AuthenticationPackage
static const ACEFLAG AceType[]
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
#define ERROR_ACCESS_DENIED
NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer)
NET_API_STATUS WINAPI NetApiBufferAllocate(DWORD ByteCount, LPVOID *Buffer)
NET_API_STATUS WINAPI NetpNtStatusToApiStatus(_In_ NTSTATUS Status)
static VOID FreeEnumContext(PENUM_CONTEXT EnumContext)
CRITICAL_SECTION g_EnumContextListLock
NET_API_STATUS WINAPI NetUserSetGroups(LPCWSTR servername, LPCWSTR username, DWORD level, LPBYTE buf, DWORD num_entries)
LIST_ENTRY g_EnumContextListHead
struct _ENUM_CONTEXT * PENUM_CONTEXT
NET_API_STATUS WINAPI NetUserModalsSet(IN LPCWSTR servername, IN DWORD level, IN LPBYTE buf, OUT LPDWORD parm_err)
NET_API_STATUS WINAPI NetUserEnum(LPCWSTR servername, DWORD level, DWORD filter, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle)
static NET_API_STATUS AllocateEnumContext(PENUM_CONTEXT *AllocatedEnumContext)
static NET_API_STATUS GetUserPrivileges(_In_ SAM_HANDLE BuiltinDomainHandle, _In_ SAM_HANDLE UserHandle, _In_ PSID AccountDomainSid, _In_ ULONG RelativeId, _Out_ PDWORD Priv, _Out_ PDWORD AuthFlags)
static ULONG GetAccountFlags(ULONG AccountControl, PACL Dacl)
static NET_API_STATUS SetUserInfo(SAM_HANDLE UserHandle, LPBYTE UserInfo, DWORD Level, PDWORD parm_err)
static NET_API_STATUS OpenUserByName(SAM_HANDLE DomainHandle, PUNICODE_STRING UserName, ULONG DesiredAccess, PSAM_HANDLE UserHandle)
static NET_API_STATUS BuildUserInfoBuffer(_In_ SAM_HANDLE BuiltinDomainHandle, _In_ SAM_HANDLE UserHandle, _In_ PSID AccountDomainSid, _In_ ULONG RelativeId, _In_ DWORD level, _Out_ LPVOID *Buffer)
NET_API_STATUS WINAPI NetUserAdd(LPCWSTR servername, DWORD level, LPBYTE bufptr, LPDWORD parm_err)
NET_API_STATUS WINAPI NetUserGetGroups(LPCWSTR servername, LPCWSTR username, DWORD level, LPBYTE *bufptr, DWORD prefixmaxlen, LPDWORD entriesread, LPDWORD totalentries)
NET_API_STATUS WINAPI NetUserChangePassword(LPCWSTR domainname, LPCWSTR username, LPCWSTR oldpassword, LPCWSTR newpassword)
static ULONG GetAccountControl(ULONG Flags)
static ULONG DeltaTimeToSeconds(LARGE_INTEGER DeltaTime)
static NTSTATUS GetAllowedWorldAce(IN PACL Acl, OUT PACCESS_ALLOWED_ACE *Ace)
NET_API_STATUS WINAPI NetUserGetInfo(LPCWSTR servername, LPCWSTR username, DWORD level, LPBYTE *bufptr)
static PENUM_CONTEXT LookupEnumContext(SAM_ENUMERATE_HANDLE EnumerationHandle)
NET_API_STATUS WINAPI NetUserGetLocalGroups(LPCWSTR servername, LPCWSTR username, DWORD level, DWORD flags, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries)
struct _ENUM_CONTEXT ENUM_CONTEXT
NET_API_STATUS WINAPI NetUserSetInfo(LPCWSTR servername, LPCWSTR username, DWORD level, LPBYTE buf, LPDWORD parm_err)
NET_API_STATUS WINAPI NetUserModalsGet(LPCWSTR servername, DWORD level, LPBYTE *bufptr)
static VOID ChangeUserDacl(IN PACL Dacl, IN ULONG Flags)
NET_API_STATUS WINAPI NetUserDel(LPCWSTR servername, LPCWSTR username)
static DWORD GetPasswordAge(IN PLARGE_INTEGER PasswordLastSet)
static NET_API_STATUS GetUserDacl(IN SAM_HANDLE UserHandle, OUT PACL *Dacl)
static VOID FreeUserInfo(PUSER_ALL_INFORMATION UserInfo)
static SID_IDENTIFIER_AUTHORITY WorldAuthority
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOLEAN NTAPI RtlTimeToSecondsSince1970(PLARGE_INTEGER Time, PULONG ElapsedSeconds)
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationAcl(PACL, LPVOID, DWORD, ACL_INFORMATION_CLASS)
VOID NTAPI ProtocolStatus(NDIS_HANDLE BindingContext, NDIS_STATUS GenerelStatus, PVOID StatusBuffer, UINT StatusBufferSize)
Called by NDIS when the underlying driver has changed state.
struct _USER_MODALS_INFO_0 USER_MODALS_INFO_0
#define UF_ACCOUNTDISABLE
struct _USER_MODALS_INFO_1 * PUSER_MODALS_INFO_1
#define UF_DONT_EXPIRE_PASSWD
#define UF_PASSWD_CANT_CHANGE
struct _USER_INFO_1008 * PUSER_INFO_1008
#define UF_HOMEDIR_REQUIRED
struct _USER_INFO_3 * PUSER_INFO_3
struct _USER_INFO_1003 * PUSER_INFO_1003
struct _USER_INFO_0 USER_INFO_0
struct _USER_INFO_2 * PUSER_INFO_2
#define UF_PASSWD_NOTREQD
struct _USER_INFO_1051 * PUSER_INFO_1051
struct _LOCALGROUP_USERS_INFO_0 LOCALGROUP_USERS_INFO_0
struct _USER_INFO_1025 * PUSER_INFO_1025
struct _USER_MODALS_INFO_2 * PUSER_MODALS_INFO_2
struct _USER_MODALS_INFO_3 * PUSER_MODALS_INFO_3
struct _USER_INFO_20 * PUSER_INFO_20
struct _USER_INFO_1053 * PUSER_INFO_1053
#define UF_SERVER_TRUST_ACCOUNT
struct _USER_INFO_1006 * PUSER_INFO_1006
struct _USER_INFO_3 USER_INFO_3
struct _USER_INFO_1 USER_INFO_1
struct _USER_MODALS_INFO_2 USER_MODALS_INFO_2
struct _USER_INFO_1017 * PUSER_INFO_1017
#define UF_INTERDOMAIN_TRUST_ACCOUNT
struct _USER_MODALS_INFO_3 USER_MODALS_INFO_3
#define UF_NORMAL_ACCOUNT
struct _USER_INFO_4 * PUSER_INFO_4
struct _USER_INFO_1009 * PUSER_INFO_1009
struct _USER_INFO_1014 * PUSER_INFO_1014
#define USER_MAXSTORAGE_UNLIMITED
#define LG_INCLUDE_INDIRECT
struct _USER_INFO_1020 * PUSER_INFO_1020
#define UF_TEMP_DUPLICATE_ACCOUNT
struct _USER_INFO_1052 * PUSER_INFO_1052
struct _USER_INFO_1011 * PUSER_INFO_1011
struct _USER_INFO_22 * PUSER_INFO_22
struct _USER_INFO_11 * PUSER_INFO_11
struct _USER_INFO_11 USER_INFO_11
struct _USER_MODALS_INFO_1 USER_MODALS_INFO_1
struct _USER_INFO_1 * PUSER_INFO_1
struct _USER_INFO_10 * PUSER_INFO_10
struct _USER_INFO_1012 * PUSER_INFO_1012
struct _USER_INFO_4 USER_INFO_4
#define UF_WORKSTATION_TRUST_ACCOUNT
#define USER_UNITS_PER_WEEK_PARMNUM
struct _USER_INFO_1024 * PUSER_INFO_1024
struct _USER_INFO_23 * PUSER_INFO_23
struct _USER_INFO_1007 * PUSER_INFO_1007
struct _USER_INFO_0 * PUSER_INFO_0
struct _USER_INFO_2 USER_INFO_2
struct _USER_INFO_20 USER_INFO_20
struct _USER_INFO_1013 * PUSER_INFO_1013
struct _USER_INFO_23 USER_INFO_23
struct _USER_INFO_10 USER_INFO_10
struct _USER_MODALS_INFO_0 * PUSER_MODALS_INFO_0
#define NERR_UserNotFound
#define NERR_InternalError
#define NERR_GroupNotFound
enum _SID_NAME_USE * PSID_NAME_USE
NTSTATUS NTAPI LsaConnectUntrusted(OUT PHANDLE LsaHandle)
#define memcpy(s1, s2, n)
struct _ACCESS_ALLOWED_ACE * PACCESS_ALLOWED_ACE
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
NTSYSAPI PULONG NTAPI RtlSubAuthoritySid(_In_ PSID Sid, _In_ ULONG SubAuthority)
NTSYSAPI NTSTATUS NTAPI RtlGetAce(PACL Acl, ULONG AceIndex, PVOID *Ace)
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
NTSYSAPI BOOLEAN NTAPI RtlEqualSid(_In_ PSID Sid1, _In_ PSID Sid2)
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
NTSTATUS OpenBuiltinDomain(IN SAM_HANDLE ServerHandle, IN ULONG DesiredAccess, OUT SAM_HANDLE *DomainHandle)
VOID CopySidFromSidAndRid(_Out_ PSID DstSid, _In_ PSID SrcSid, _In_ ULONG RelativeId)
NTSTATUS GetBuiltinDomainSid(OUT PSID *BuiltinDomainSid)
NET_API_STATUS BuildSidFromSidAndRid(IN PSID SrcSid, IN ULONG RelativeId, OUT PSID *DestSid)
NTSTATUS OpenAccountDomain(IN SAM_HANDLE ServerHandle, IN PUNICODE_STRING ServerName, IN ULONG DesiredAccess, OUT PSAM_HANDLE DomainHandle)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSYSAPI NTSTATUS NTAPI RtlInitializeSid(IN OUT PSID Sid, IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount)
NTSTATUS NTAPI NtQuerySystemTime(OUT PLARGE_INTEGER SystemTime)
#define USER_READ_GENERAL
@ DomainLogoffInformation
@ DomainReplicationInformation
@ DomainServerRoleInformation
@ DomainPasswordInformation
@ DomainLockoutInformation
#define USER_ALL_SCRIPTPATH
#define USER_ALL_COUNTRYCODE
#define USER_NORMAL_ACCOUNT
#define USER_ALL_ADMINCOMMENT
#define USER_ALL_PARAMETERS
#define USER_ALL_WORKSTATIONS
#define USER_PASSWORD_NOT_REQUIRED
#define USER_READ_PREFERENCES
ULONG SAM_ENUMERATE_HANDLE
#define USER_READ_ACCOUNT
#define USER_WORKSTATION_TRUST_ACCOUNT
#define USER_ALL_HOMEDIRECTORY
#define USER_ALL_USERNAME
#define USER_ALL_HOMEDIRECTORYDRIVE
#define SAM_SERVER_LOOKUP_DOMAIN
#define USER_ALL_PASSWORDEXPIRED
#define USER_ALL_USERCOMMENT
#define USER_ALL_ACCOUNTEXPIRES
#define SAM_SERVER_CONNECT
#define USER_ALL_LOGONHOURS
#define USER_PASSWORD_EXPIRED
#define USER_HOME_DIRECTORY_REQUIRED
#define USER_TEMP_DUPLICATE_ACCOUNT
#define USER_ALL_PRIMARYGROUPID
@ DomainServerRolePrimary
#define USER_ALL_USERACCOUNTCONTROL
#define DOMAIN_READ_PASSWORD_PARAMETERS
#define USER_DONT_EXPIRE_PASSWORD
#define USER_ALL_FULLNAME
#define USER_CHANGE_PASSWORD
#define DOMAIN_CREATE_USER
#define USER_ALL_CODEPAGE
#define DOMAIN_GET_ALIAS_MEMBERSHIP
#define USER_ALL_PROFILEPATH
#define USER_ALL_NTPASSWORDPRESENT
#define DOMAIN_LIST_ACCOUNTS
#define USER_SERVER_TRUST_ACCOUNT
#define USER_INTERDOMAIN_TRUST_ACCOUNT
#define USER_ACCOUNT_AUTO_LOCKED
#define USER_ACCOUNT_DISABLED
#define DOMAIN_READ_OTHER_PARAMETERS
NTSTATUS NTAPI LsaLookupAuthenticationPackage(HANDLE, PLSA_STRING, PULONG)
struct _MSV1_0_CHANGEPASSWORD_REQUEST MSV1_0_CHANGEPASSWORD_REQUEST
#define MSV1_0_PACKAGE_NAME
NTSTATUS NTAPI LsaCallAuthenticationPackage(HANDLE, ULONG, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS)
NTSTATUS NTAPI LsaFreeReturnBuffer(PVOID)
#define STATUS_NONE_MAPPED
static NTSTATUS GetAccountDomainSid(_In_ PRPC_SID *Sid)
NTSTATUS NTAPI SamQueryInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, OUT PVOID *Buffer)
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 SamQueryInformationDomain(IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, OUT PVOID *Buffer)
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 SamOpenUser(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG UserId, OUT PSAM_HANDLE UserHandle)
NTSTATUS NTAPI SamGetGroupsForUser(IN SAM_HANDLE UserHandle, OUT PGROUP_MEMBERSHIP *Groups, OUT PULONG MembershipCount)
NTSTATUS NTAPI SamSetInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, IN PVOID Buffer)
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 SamConnect(IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI SamCloseHandle(IN SAM_HANDLE SamHandle)
NTSTATUS NTAPI SamOpenDomain(IN SAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT PSAM_HANDLE DomainHandle)
NTSTATUS NTAPI SamQuerySecurityObject(IN SAM_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
NTSTATUS NTAPI SamDeleteUser(IN SAM_HANDLE UserHandle)
NTSTATUS NTAPI SamGetAliasMembership(IN SAM_HANDLE DomainHandle, IN ULONG PassedCount, IN PSID *Sids, OUT PULONG MembershipCount, OUT PULONG *Aliases)
LARGE_INTEGER LockoutObservationWindow
LARGE_INTEGER LockoutDuration
LARGE_INTEGER ForceLogoff
UNICODE_STRING DomainName
USHORT PasswordHistoryLength
LARGE_INTEGER MinPasswordAge
LARGE_INTEGER MaxPasswordAge
UNICODE_STRING ReplicaSourceNodeName
DOMAIN_SERVER_ROLE DomainServerRole
SAM_HANDLE BuiltinDomainHandle
SAM_HANDLE AccountDomainHandle
SAM_ENUMERATE_HANDLE EnumerationContext
PSAM_RID_ENUMERATION Buffer
struct _LIST_ENTRY * Flink
MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType
UNICODE_STRING AccountName
UNICODE_STRING NewPassword
UNICODE_STRING OldPassword
UNICODE_STRING DomainName
LPWSTR usri1009_script_path
LPWSTR usri1011_full_name
LPWSTR usri1012_usr_comment
LPWSTR usri1014_workstations
DWORD usri1017_acct_expires
PBYTE usri1020_logon_hours
DWORD usri1020_units_per_week
DWORD usri1024_country_code
DWORD usri1051_primary_group_id
LPWSTR usri1053_home_dir_drive
LPWSTR usri10_usr_comment
LPWSTR usri11_usr_comment
DWORD usri11_bad_pw_count
DWORD usri11_units_per_week
LPWSTR usri11_logon_server
DWORD usri11_password_age
LPWSTR usri11_workstations
DWORD usri11_country_code
DWORD usri22_units_per_week
LPWSTR usri22_script_path
DWORD usri22_country_code
LPWSTR usri22_workstations
LPWSTR usri22_usr_comment
DWORD usri22_acct_expires
LPWSTR usri2_logon_server
DWORD usri2_units_per_week
LPWSTR usri2_workstations
DWORD usri3_units_per_week
LPWSTR usri3_workstations
LPWSTR usri3_home_dir_drive
DWORD usri3_primary_group_id
DWORD usri3_password_expired
LPWSTR usri3_logon_server
LPWSTR usri4_workstations
DWORD usri4_password_expired
LPWSTR usri4_home_dir_drive
DWORD usri4_primary_group_id
DWORD usri4_units_per_week
LPWSTR usri4_logon_server
DWORD usrmod0_min_passwd_age
DWORD usrmod0_force_logoff
DWORD usrmod0_min_passwd_len
DWORD usrmod0_max_passwd_age
DWORD usrmod0_password_hist_len
LPWSTR usrmod2_domain_name
DWORD usrmod3_lockout_observation_window
DWORD usrmod3_lockout_threshold
DWORD usrmod3_lockout_duration
static unsigned int bufptr
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_MORE_ENTRIES
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define ERROR_INVALID_LEVEL
#define ERROR_NONE_MAPPED
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
_Must_inspect_result_ _In_ ULONG Flags
_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
#define DOMAIN_ALIAS_RID_USERS
#define DACL_SECURITY_INFORMATION
#define SECURITY_WORLD_SID_AUTHORITY
#define SECURITY_WORLD_RID
#define DOMAIN_ALIAS_RID_SYSTEM_OPS
#define ACCESS_ALLOWED_ACE_TYPE
#define DOMAIN_ALIAS_RID_ACCOUNT_OPS
#define DOMAIN_ALIAS_RID_PRINT_OPS
#define SID_MAX_SUB_AUTHORITIES
#define DOMAIN_ALIAS_RID_ADMINS