47 BaseSrvUpdateVDMEntry,
48 BaseSrvGetNextVDMCommand,
51 BaseSrvGetVDMExitCode,
52 BaseSrvSetReenterCount,
53 BaseSrvSetProcessShutdownParam,
54 BaseSrvGetProcessShutdownParam,
55 BaseSrvNlsSetUserInfo,
56 BaseSrvNlsSetMultipleUserInfo,
57 BaseSrvNlsCreateSection,
60 BaseSrvBatNotification,
61 BaseSrvRegisterWowExec,
62 BaseSrvSoundSentryNotification,
63 BaseSrvRefreshIniFileMapping,
64 BaseSrvDefineDosDevice,
65 BaseSrvSetTermsrvAppInstallMode,
66 BaseSrvNlsUpdateCacheCount,
67 BaseSrvSetTermsrvClientTimeZone,
68 BaseSrvSxsCreateActivationContext,
70 BaseSrvRegisterThread,
71 BaseSrvNlsGetUserInfo,
122 "BaseUpdateVDMEntry",
123 "BaseGetNextVDMCommand",
126 "BaseGetVDMExitCode",
127 "BaseSetReenterCount",
128 "BaseSetProcessShutdownParam",
129 "BaseGetProcessShutdownParam",
130 "BaseNlsSetUserInfo",
131 "BaseNlsSetMultipleUserInfo",
132 "BaseNlsCreateSection",
135 "BaseBatNotification",
136 "BaseRegisterWowExec",
137 "BaseSoundSentryNotification",
138 "BaseRefreshIniFileMapping",
139 "BaseDefineDosDevice",
140 "BaseSetTermsrvAppInstallMode",
141 "BaseNlsUpdateCacheCount",
142 "BaseSetTermsrvClientTimeZone",
143 "BaseSxsCreateActivationContext",
144 "BaseSrvDebugProcessStop",
145 "BaseRegisterThread",
146 "BaseNlsGetUserInfo",
162 DPRINT1(
"BASESRV: Unable to allocate memory in shared heap for IniFileMapping\n");
182 UCHAR KeyValueBuffer[0x40];
189 ULONG ObjectSecurityMode;
208 sizeof(KeyValueBuffer),
228 ObjectSecurityMode = 0;
285 if (ObjectSecurityMode != 0)
308 if (*RestrictedDacl ==
NULL)
363 WCHAR BnoBuffer[100];
373 HANDLE BaseSrvNamedObjectDirectory;
374 HANDLE BaseSrvRestrictedObjectDirectory;
375 PACL BnoDacl, BnoRestrictedDacl;
401 RtlInitEmptyUnicodeString(&SystemRootString,
Buffer,
sizeof(
Buffer));
403 &UnexpandedSystemRootString,
432 wcscpy(BnoBuffer,
L"\\BaseNamedObjects");
503 RtlInitEmptyUnicodeString(&BaseSrvCSDString,
Buffer,
sizeof(
Buffer));
506 BaseServerRegistryConfigurationTable,
519 BaseSrvCSDString.
Length = 0;
569 ObjectSessionInformation,
594 BaseSrvNamedObjectDirectory,
608 BaseSrvNamedObjectDirectory,
622 BaseSrvNamedObjectDirectory,
637 BaseSrvNamedObjectDirectory,
665 if ( ConnectionInfo ==
NULL ||
666 ConnectionInfoLength ==
NULL ||
667 *ConnectionInfoLength !=
sizeof(*ConnectInfo) )
669 DPRINT1(
"BASESRV: Connection failed - ConnectionInfo = 0x%p ; ConnectionInfoLength = 0x%p (%lu), expected %lu\n",
671 ConnectionInfoLength,
672 ConnectionInfoLength ? *ConnectionInfoLength : (
ULONG)-1,
673 sizeof(*ConnectInfo));
698 LoadedServerDll->NameTable = BaseServerApiNameTable;
700 LoadedServerDll->SizeOfProcessData = 0;
703 LoadedServerDll->ShutdownProcessCallback =
NULL;
static SID_IDENTIFIER_AUTHORITY NtAuthority
#define BASESRV_FIRST_API_NUMBER
struct _BASESRV_API_CONNECTINFO * PBASESRV_API_CONNECTINFO
RTL_CRITICAL_SECTION BaseSrvDDDBSMCritSec
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
NTSTATUS(NTAPI * PCSR_API_ROUTINE)(IN OUT PCSR_API_MESSAGE ApiMessage, IN OUT PCSR_REPLY_CODE ReplyCode OPTIONAL)
#define CSR_SERVER_DLL_INIT(n)
#define NT_SUCCESS(StatCode)
#define DLL_PROCESS_DETACH
BOOLEAN WINAPI DllMain(HINSTANCE Instance, DWORD Reason, LPVOID Reserved)
static SID_IDENTIFIER_AUTHORITY WorldAuthority
@ SystemTimeOfDayInformation
#define OBJ_CASE_INSENSITIVE
NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING *, UNICODE_STRING *, ULONG *)
NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL, DWORD, DWORD, PSID)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
@ ProcessLUIDDeviceMapsEnabled
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
#define InitializeObjectAttributes(p, n, a, r, s)
@ SystemObjectSecurityMode
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
NTSYSAPI NTSTATUS NTAPI RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision)
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSectionAndSpinCount(_In_ PRTL_CRITICAL_SECTION CriticalSection, _In_ ULONG SpinCount)
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
NTSYSAPI PVOID NTAPI RtlFreeSid(_In_ _Post_invalid_ PSID Sid)
#define SYMBOLIC_LINK_ALL_ACCESS
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define DIRECTORY_CREATE_OBJECT
@ KeyValuePartialInformation
#define DIRECTORY_TRAVERSE
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NtCurrentProcess()
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
#define RTL_REGISTRY_WINDOWS_NT
#define RTL_QUERY_REGISTRY_DIRECT
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
struct _KEY_VALUE_PARTIAL_INFORMATION * PKEY_VALUE_PARTIAL_INFORMATION
#define DIRECTORY_ALL_ACCESS
#define DIRECTORY_CREATE_SUBDIRECTORY
#define UNREFERENCED_PARAMETER(P)
NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid(IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount, IN ULONG SubAuthority0, IN ULONG SubAuthority1, IN ULONG SubAuthority2, IN ULONG SubAuthority3, IN ULONG SubAuthority4, IN ULONG SubAuthority5, IN ULONG SubAuthority6, IN ULONG SubAuthority7, OUT PSID *Sid)
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
NTSTATUS NTAPI NtCreateDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI NtSetInformationObject(IN HANDLE ObjectHandle, IN OBJECT_INFORMATION_CLASS ObjectInformationClass, IN PVOID ObjectInformation, IN ULONG Length)
NTSTATUS NTAPI NtCreateSymbolicLinkObject(OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PUNICODE_STRING LinkTarget)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
BOOLEAN LUIDDeviceMapsEnabled
ULONG TermsrvClientTimeZoneChangeNum
UNICODE_STRING NamedObjectDirectory
UNICODE_STRING WindowsDirectory
ULONG TermsrvClientTimeZoneId
SYSTEM_TIMEOFDAY_INFORMATION TimeOfDay
BOOLEAN DefaultSeparateVDM
UNICODE_STRING WindowsSys32x86Directory
SYSTEM_BASIC_INFORMATION SysInfo
UNICODE_STRING WindowsSystemDirectory
VOID BaseCleanupDefineDosDevice(VOID)
VOID NTAPI BaseSrvNLSInit(IN PBASE_STATIC_SERVER_DATA StaticData)
VOID BaseInitDefineDosDevice(VOID)
NTSTATUS NTAPI BaseSrvNlsConnect(IN PCSR_PROCESS CsrProcess, IN OUT PVOID ConnectionInfo, IN OUT PULONG ConnectionInfoLength)
NTSTATUS NTAPI BaseClientConnectRoutine(IN PCSR_PROCESS CsrProcess, IN OUT PVOID ConnectionInfo, IN OUT PULONG ConnectionInfoLength)
VOID NTAPI BaseClientDisconnectRoutine(IN PCSR_PROCESS CsrProcess)
BOOLEAN BaseServerApiServerValidTable[BasepMaxApiNumber - BASESRV_FIRST_API_NUMBER]
PCSR_API_ROUTINE BaseServerApiDispatchTable[BasepMaxApiNumber - BASESRV_FIRST_API_NUMBER]
UNICODE_STRING BaseSrvKernel32DllPath
NTSTATUS NTAPI CreateBaseAcls(OUT PACL *Dacl, OUT PACL *RestrictedDacl)
HANDLE BaseSrvDllInstance
PBASE_STATIC_SERVER_DATA BaseStaticServerData
PINIFILE_MAPPING BaseSrvIniFileMapping
NTSTATUS NTAPI BaseSrvInitializeIniFileMappings(IN PBASE_STATIC_SERVER_DATA StaticServerData)
VOID NTAPI BaseInitializeStaticServerData(IN PCSR_SERVER_DLL LoadedServerDll)
VOID BaseSrvCleanupVDMResources(IN PCSR_PROCESS CsrProcess)
VOID BaseInitializeVDM(VOID)
#define RTL_CONSTANT_STRING(s)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
#define TIME_ZONE_ID_INVALID
#define SECURITY_WORLD_SID_AUTHORITY
#define SECURITY_WORLD_RID
#define SECURITY_LOCAL_SYSTEM_RID
#define SECURITY_RESTRICTED_CODE_RID
#define SECURITY_NT_AUTHORITY
#define SECURITY_DESCRIPTOR_REVISION