From 80449cd2c584eb4dff5644cd102249609c62e1a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 31 Jan 2014 18:27:58 -0500 Subject: [PATCH] libwinpr-memory: start stubbing --- winpr/include/winpr/crt.h | 21 ++- winpr/include/winpr/file.h | 14 ++ winpr/include/winpr/memory.h | 41 ++++-- winpr/include/winpr/security.h | 32 +++++ winpr/include/winpr/wtypes.h | 2 + winpr/libwinpr/memory/CMakeLists.txt | 51 +++++++ winpr/libwinpr/memory/ModuleOptions.cmake | 9 ++ winpr/libwinpr/memory/memory.c | 126 ++++++++++++++++++ winpr/libwinpr/memory/memory.h | 34 +++++ winpr/libwinpr/memory/module.def | 3 + winpr/libwinpr/memory/test/.gitignore | 2 + winpr/libwinpr/memory/test/CMakeLists.txt | 30 +++++ .../memory/test/TestMemoryCreateFileMapping.c | 9 ++ winpr/libwinpr/security/security.c | 92 ++++++++++--- .../utils/collections/ListDictionary.c | 3 +- 15 files changed, 440 insertions(+), 29 deletions(-) create mode 100644 winpr/libwinpr/memory/CMakeLists.txt create mode 100644 winpr/libwinpr/memory/ModuleOptions.cmake create mode 100644 winpr/libwinpr/memory/memory.c create mode 100644 winpr/libwinpr/memory/memory.h create mode 100644 winpr/libwinpr/memory/module.def create mode 100644 winpr/libwinpr/memory/test/.gitignore create mode 100644 winpr/libwinpr/memory/test/CMakeLists.txt create mode 100644 winpr/libwinpr/memory/test/TestMemoryCreateFileMapping.c diff --git a/winpr/include/winpr/crt.h b/winpr/include/winpr/crt.h index 70ea058e5..694544a43 100644 --- a/winpr/include/winpr/crt.h +++ b/winpr/include/winpr/crt.h @@ -27,12 +27,27 @@ #include #include -#include - -/* Data Alignment */ +#include #ifndef _WIN32 +#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length)) +#define MoveMemory(Destination, Source, Length) memmove((Destination), (Source), (Length)) +#define FillMemory(Destination, Length, Fill) memset((Destination), (Fill), (Length)) +#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length)) + +#ifdef __cplusplus +extern "C" { +#endif + +WINPR_API PVOID SecureZeroMemory(PVOID ptr, SIZE_T cnt); + +#ifdef __cplusplus +} +#endif + +/* Data Alignment */ + #ifndef _ERRNO_T_DEFINED #define _ERRNO_T_DEFINED typedef int errno_t; diff --git a/winpr/include/winpr/file.h b/winpr/include/winpr/file.h index 12208dae4..9570ec380 100644 --- a/winpr/include/winpr/file.h +++ b/winpr/include/winpr/file.h @@ -102,6 +102,20 @@ #define FILE_FLAG_OPEN_NO_RECALL 0x00100000 #define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000 +#define SECTION_MAP_EXECUTE_EXPLICIT 0x00020 +#define SECTION_EXTEND_SIZE 0x00010 +#define SECTION_MAP_READ 0x00004 +#define SECTION_MAP_WRITE 0x00002 +#define SECTION_QUERY 0x00001 +#define SECTION_MAP_EXECUTE 0x00008 +#define SECTION_ALL_ACCESS 0xF001F + +#define FILE_MAP_COPY SECTION_QUERY +#define FILE_MAP_WRITE SECTION_MAP_WRITE +#define FILE_MAP_READ SECTION_MAP_READ +#define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS +#define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT + #define CREATE_NEW 1 #define CREATE_ALWAYS 2 #define OPEN_EXISTING 3 diff --git a/winpr/include/winpr/memory.h b/winpr/include/winpr/memory.h index 3a99685a8..1f64342d8 100644 --- a/winpr/include/winpr/memory.h +++ b/winpr/include/winpr/memory.h @@ -17,27 +17,48 @@ * limitations under the License. */ -#ifndef WINPR_CRT_MEMORY_H -#define WINPR_CRT_MEMORY_H +#ifndef WINPR_MEMORY_H +#define WINPR_MEMORY_H #include #include #include + #include #include +#include +#include + #ifndef _WIN32 -#define CopyMemory(Destination, Source, Length) memcpy((Destination), (Source), (Length)) -#define MoveMemory(Destination, Source, Length) memmove((Destination), (Source), (Length)) -#define FillMemory(Destination, Length, Fill) memset((Destination), (Fill), (Length)) -#define ZeroMemory(Destination, Length) memset((Destination), 0, (Length)) +#ifdef __cplusplus +extern "C" { +#endif -WINPR_API PVOID SecureZeroMemory(PVOID ptr, SIZE_T cnt); +WINPR_API HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, + DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCSTR lpName); +WINPR_API HANDLE CreateFileMappingW(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, + DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCWSTR lpName); + +WINPR_API HANDLE OpenFileMappingA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName); +WINPR_API HANDLE OpenFileMappingW(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName); + +WINPR_API LPVOID MapViewOfFile(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, + DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap); + +WINPR_API LPVOID MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, + DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap, LPVOID lpBaseAddress); + +WINPR_API BOOL FlushViewOfFile(LPCVOID lpBaseAddress, SIZE_T dwNumberOfBytesToFlush); + +WINPR_API BOOL UnmapViewOfFile(LPCVOID lpBaseAddress); + +#ifdef __cplusplus +} +#endif #endif -#include - -#endif /* WINPR_CRT_MEMORY_H */ +#endif /* WINPR_MEMORY_H */ diff --git a/winpr/include/winpr/security.h b/winpr/include/winpr/security.h index 4ad7d4d4f..f36099f89 100644 --- a/winpr/include/winpr/security.h +++ b/winpr/include/winpr/security.h @@ -371,6 +371,38 @@ typedef struct _TOKEN_APPCONTAINER_INFORMATION PSID TokenAppContainer; } TOKEN_APPCONTAINER_INFORMATION, *PTOKEN_APPCONTAINER_INFORMATION; +#ifdef __cplusplus +extern "C" { +#endif + +WINPR_API BOOL InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision); +WINPR_API DWORD GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor); +WINPR_API BOOL IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor); + +WINPR_API BOOL GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, + PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision); +WINPR_API BOOL SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, + SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet); + +WINPR_API BOOL GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, PACL* pDacl, LPBOOL lpbDaclDefaulted); +WINPR_API BOOL SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted); + +WINPR_API BOOL GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pGroup, LPBOOL lpbGroupDefaulted); +WINPR_API BOOL SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pGroup, BOOL bGroupDefaulted); + +WINPR_API BOOL GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pOwner, LPBOOL lpbOwnerDefaulted); +WINPR_API BOOL SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pOwner, BOOL bOwnerDefaulted); + +WINPR_API DWORD GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl); +WINPR_API DWORD SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl); + +WINPR_API BOOL GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbSaclPresent, PACL* pSacl, LPBOOL lpbSaclDefaulted); +WINPR_API BOOL SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bSaclPresent, PACL pSacl, BOOL bSaclDefaulted); + +#ifdef __cplusplus +} +#endif + #endif #endif /* WINPR_SECURITY_H */ diff --git a/winpr/include/winpr/wtypes.h b/winpr/include/winpr/wtypes.h index 83458f531..f3f1ce64d 100644 --- a/winpr/include/winpr/wtypes.h +++ b/winpr/include/winpr/wtypes.h @@ -268,6 +268,8 @@ typedef struct _SECURITY_DESCRIPTOR PACL Dacl; } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR; +typedef WORD SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL; + typedef struct _SECURITY_ATTRIBUTES { DWORD nLength; diff --git a/winpr/libwinpr/memory/CMakeLists.txt b/winpr/libwinpr/memory/CMakeLists.txt new file mode 100644 index 000000000..4c7e8e8ac --- /dev/null +++ b/winpr/libwinpr/memory/CMakeLists.txt @@ -0,0 +1,51 @@ +# WinPR: Windows Portable Runtime +# libwinpr-memory cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(MODULE_NAME "winpr-memory") +set(MODULE_PREFIX "WINPR_MEMORY") + +set(${MODULE_PREFIX}_SRCS + memory.c + memory.h) + +if(MSVC AND (NOT MONOLITHIC_BUILD)) + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) +endif() + +add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" + MONOLITHIC ${MONOLITHIC_BUILD} + SOURCES ${${MODULE_PREFIX}_SRCS}) + +set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") + +set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS + MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL + MODULE winpr + MODULES winpr-crt) + +if(MONOLITHIC_BUILD) + +else() + target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT WinPRTargets) +endif() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR") + +if(BUILD_TESTING) + add_subdirectory(test) +endif() diff --git a/winpr/libwinpr/memory/ModuleOptions.cmake b/winpr/libwinpr/memory/ModuleOptions.cmake new file mode 100644 index 000000000..704ddca19 --- /dev/null +++ b/winpr/libwinpr/memory/ModuleOptions.cmake @@ -0,0 +1,9 @@ + +set(MINWIN_LAYER "1") +set(MINWIN_GROUP "core") +set(MINWIN_MAJOR_VERSION "1") +set(MINWIN_MINOR_VERSION "2") +set(MINWIN_SHORT_NAME "memory") +set(MINWIN_LONG_NAME "Memory Functions") +set(MODULE_LIBRARY_NAME "api-ms-win-${MINWIN_GROUP}-${MINWIN_SHORT_NAME}-l${MINWIN_LAYER}-${MINWIN_MAJOR_VERSION}-${MINWIN_MINOR_VERSION}") + diff --git a/winpr/libwinpr/memory/memory.c b/winpr/libwinpr/memory/memory.c new file mode 100644 index 000000000..fc05a57a4 --- /dev/null +++ b/winpr/libwinpr/memory/memory.c @@ -0,0 +1,126 @@ +/** + * WinPR: Windows Portable Runtime + * Memory Functions + * + * Copyright 2014 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +/** + * api-ms-win-core-memory-l1-1-2.dll: + * + * AllocateUserPhysicalPages + * AllocateUserPhysicalPagesNuma + * CreateFileMappingFromApp + * CreateFileMappingNumaW + * CreateFileMappingW + * CreateMemoryResourceNotification + * FlushViewOfFile + * FreeUserPhysicalPages + * GetLargePageMinimum + * GetMemoryErrorHandlingCapabilities + * GetProcessWorkingSetSizeEx + * GetSystemFileCacheSize + * GetWriteWatch + * MapUserPhysicalPages + * MapViewOfFile + * MapViewOfFileEx + * MapViewOfFileFromApp + * OpenFileMappingW + * PrefetchVirtualMemory + * QueryMemoryResourceNotification + * ReadProcessMemory + * RegisterBadMemoryNotification + * ResetWriteWatch + * SetProcessWorkingSetSizeEx + * SetSystemFileCacheSize + * UnmapViewOfFile + * UnmapViewOfFileEx + * UnregisterBadMemoryNotification + * VirtualAlloc + * VirtualAllocEx + * VirtualAllocExNuma + * VirtualFree + * VirtualFreeEx + * VirtualLock + * VirtualProtect + * VirtualProtectEx + * VirtualQuery + * VirtualQueryEx + * VirtualUnlock + * WriteProcessMemory + */ + +#ifndef _WIN32 + +#include "memory.h" + +HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, + DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCSTR lpName) +{ + return NULL; +} + +HANDLE CreateFileMappingW(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect, + DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCWSTR lpName) +{ + return NULL; +} + +HANDLE OpenFileMappingA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName) +{ + return NULL; +} + +HANDLE OpenFileMappingW(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName) +{ + return NULL; +} + +LPVOID MapViewOfFile(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, + DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap) +{ + return NULL; +} + +LPVOID MapViewOfFileEx(HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOffsetHigh, + DWORD dwFileOffsetLow, SIZE_T dwNumberOfBytesToMap, LPVOID lpBaseAddress) +{ + return NULL; +} + +BOOL FlushViewOfFile(LPCVOID lpBaseAddress, SIZE_T dwNumberOfBytesToFlush) +{ + return TRUE; +} + +BOOL UnmapViewOfFile(LPCVOID lpBaseAddress) +{ + return TRUE; +} + +#endif + diff --git a/winpr/libwinpr/memory/memory.h b/winpr/libwinpr/memory/memory.h new file mode 100644 index 000000000..8071088f4 --- /dev/null +++ b/winpr/libwinpr/memory/memory.h @@ -0,0 +1,34 @@ +/** + * WinPR: Windows Portable Runtime + * Memory Functions + * + * Copyright 2014 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef WINPR_MEMORY_PRIVATE_H +#define WINPR_MEMORY_PRIVATE_H + +#ifndef _WIN32 + +#include +#include + + + +#endif + +#endif /* WINPR_MEMORY_PRIVATE_H */ + + diff --git a/winpr/libwinpr/memory/module.def b/winpr/libwinpr/memory/module.def new file mode 100644 index 000000000..14a9402ee --- /dev/null +++ b/winpr/libwinpr/memory/module.def @@ -0,0 +1,3 @@ +LIBRARY "libwinpr-memory" +EXPORTS + diff --git a/winpr/libwinpr/memory/test/.gitignore b/winpr/libwinpr/memory/test/.gitignore new file mode 100644 index 000000000..34af35fe4 --- /dev/null +++ b/winpr/libwinpr/memory/test/.gitignore @@ -0,0 +1,2 @@ +TestMemory +TestMemory.c diff --git a/winpr/libwinpr/memory/test/CMakeLists.txt b/winpr/libwinpr/memory/test/CMakeLists.txt new file mode 100644 index 000000000..b143d3f82 --- /dev/null +++ b/winpr/libwinpr/memory/test/CMakeLists.txt @@ -0,0 +1,30 @@ + +set(MODULE_NAME "TestMemory") +set(MODULE_PREFIX "TEST_MEMORY") + +set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) + +set(${MODULE_PREFIX}_TESTS + TestMemoryCreateFileMapping.c) + +create_test_sourcelist(${MODULE_PREFIX}_SRCS + ${${MODULE_PREFIX}_DRIVER} + ${${MODULE_PREFIX}_TESTS}) + +add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + +set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS + MONOLITHIC ${MONOLITHIC_BUILD} + MODULE winpr + MODULES winpr-crt) + +target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + +set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}") + +foreach(test ${${MODULE_PREFIX}_TESTS}) + get_filename_component(TestName ${test} NAME_WE) + add_test(${TestName} ${TESTING_OUTPUT_DIRECTORY}/${MODULE_NAME} ${TestName}) +endforeach() + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") diff --git a/winpr/libwinpr/memory/test/TestMemoryCreateFileMapping.c b/winpr/libwinpr/memory/test/TestMemoryCreateFileMapping.c new file mode 100644 index 000000000..918b4c468 --- /dev/null +++ b/winpr/libwinpr/memory/test/TestMemoryCreateFileMapping.c @@ -0,0 +1,9 @@ + +#include +#include + +int TestMemoryCreateFileMapping(int argc, char* argv[]) +{ + return 0; +} + diff --git a/winpr/libwinpr/security/security.c b/winpr/libwinpr/security/security.c index 51250e78b..b7f39d281 100644 --- a/winpr/libwinpr/security/security.c +++ b/winpr/libwinpr/security/security.c @@ -85,13 +85,6 @@ * GetKernelObjectSecurity * GetLengthSid * GetPrivateObjectSecurity - * GetSecurityDescriptorControl - * GetSecurityDescriptorDacl - * GetSecurityDescriptorGroup - * GetSecurityDescriptorLength - * GetSecurityDescriptorOwner - * GetSecurityDescriptorRMControl - * GetSecurityDescriptorSacl * GetSidIdentifierAuthority * GetSidLengthRequired * GetSidSubAuthority @@ -102,11 +95,9 @@ * ImpersonateLoggedOnUser * ImpersonateSelf * InitializeAcl - * InitializeSecurityDescriptor * InitializeSid * IsTokenRestricted * IsValidAcl - * IsValidSecurityDescriptor * IsValidSid * IsWellKnownSid * MakeAbsoluteSD @@ -127,12 +118,6 @@ * SetPrivateObjectSecurity * SetPrivateObjectSecurityEx * SetSecurityAccessMask - * SetSecurityDescriptorControl - * SetSecurityDescriptorDacl - * SetSecurityDescriptorGroup - * SetSecurityDescriptorOwner - * SetSecurityDescriptorRMControl - * SetSecurityDescriptorSacl * SetTokenInformation */ @@ -140,5 +125,82 @@ #include "security.h" +BOOL InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision) +{ + return TRUE; +} + +DWORD GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor) +{ + return 0; +} + +BOOL IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor) +{ + return TRUE; +} + +BOOL GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, + PSECURITY_DESCRIPTOR_CONTROL pControl, LPDWORD lpdwRevision) +{ + return TRUE; +} + +BOOL SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor, + SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet) +{ + return TRUE; +} + +BOOL GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, PACL* pDacl, LPBOOL lpbDaclDefaulted) +{ + return TRUE; +} + +BOOL SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted) +{ + return TRUE; +} + +BOOL GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pGroup, LPBOOL lpbGroupDefaulted) +{ + return TRUE; +} + +BOOL SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pGroup, BOOL bGroupDefaulted) +{ + return TRUE; +} + +BOOL GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID* pOwner, LPBOOL lpbOwnerDefaulted) +{ + return TRUE; +} + +BOOL SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID pOwner, BOOL bOwnerDefaulted) +{ + return TRUE; +} + +DWORD GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl) +{ + return 0; +} + +DWORD SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl) +{ + return 0; +} + +BOOL GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbSaclPresent, PACL* pSacl, LPBOOL lpbSaclDefaulted) +{ + return TRUE; +} + +BOOL SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bSaclPresent, PACL pSacl, BOOL bSaclDefaulted) +{ + return TRUE; +} + #endif diff --git a/winpr/libwinpr/utils/collections/ListDictionary.c b/winpr/libwinpr/utils/collections/ListDictionary.c index bef4f0757..586e20a7a 100644 --- a/winpr/libwinpr/utils/collections/ListDictionary.c +++ b/winpr/libwinpr/utils/collections/ListDictionary.c @@ -21,8 +21,9 @@ #include "config.h" #endif +#include + #include -#include /** * C equivalent of the C# ListDictionary Class: