reactos/reactos/include/aclapi.h
Thomas Bluemel 569f26e923 changes in this patch by Jonathon Wilson:
1.add some definitions to ascii.h
2.add some definitions to base.h
3.add some definitions to defines.h
4.add some definitions to funcs.h
5.add some definitions to structs.h
6.add some definitions to unicode.h
7.add some definitions to winsock2.h
8.fix it so that the ACCESS_MODE definition in ntos\security.h is only visible in kernel mode
9.add lots of stubs to advapi32.dll (some stuff from appmgmt.h, winsafer.h, evntrace.h, winefs.h, sddl.h, wincred.h & mschapp.h still to be added)
10.add a bunch of stubs to iphlpapi.dll
11.modify kernel32.dll so that certain functions are forwarded to ntdll.dll instead of being stubs in kernel32.dll
12.modify lz32.dll so that everything points at kernel32.dll
13.fix msafd.h to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
14.add stubs for SendIMEMessageExW and SendIMEMessageExA to user32.dll
15.add some stubs to ws2_32.dll
16.rename WahCreateNotificationTable to WahCreateNotificationHandle in ws2help.dll (WahCreateNotificationHandle is what microsoft calls it)
17.fix ws2help.h to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
18.fix wshirda.h to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
19.fix wsock32\stubs.c to account for changes to winsock2.h (winsock2.h now needs stdlib.h to get the size_t type)
20.add some stubs/fix some others for wsock32.dll
21.add some stubs to secur32.dll (more to come when I get sspi.h, secext.h & ntsecpkg.h)
22.add stubs for GetConsoleKeyboardLayoutNameA & GetConsoleKeyboardLayoutNameW to kernel32
23.add stub for SetupChangeFontSize to syssetup.dll
24.add some header files from WINE (related to advapi, secur32 and others)
and 25.made lsass\ntsecapi.h redundant (the stuff that was in it is now in the WINE ntsecapi.h). Therefore, it should probobly be removed.

There are also a bunch of things in the defs/edfs that are there but commented out. This is because I have yet to find the prototype for them.

svn path=/trunk/; revision=6012
2003-09-08 09:56:57 +00:00

132 lines
9.8 KiB
C

/*
aclapi.h
This file is part of a free library for the Win32 API.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef _ACLAPI_H
#define _ACLAPI_H
#include <windows.h>
#include <accctrl.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef VOID (*FN_PROGRESS) (LPWSTR pObjectName,DWORD Status,PPROG_INVOKE_SETTING pInvokeSetting,PVOID Args,WINBOOL SecuritySet);
VOID STDCALL BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A pExplicitAccess,LPSTR pTrusteeName,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
VOID STDCALL BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W pExplicitAccess,LPWSTR pTrusteeName,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
DWORD STDCALL BuildSecurityDescriptorA(PTRUSTEE_A pOwner,PTRUSTEE_A pGroup,ULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_A pListOfAccessEntries,
ULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_A pListOfAuditEntries,PSECURITY_DESCRIPTOR pOldSD,PULONG pSizeNewSD,PSECURITY_DESCRIPTOR* pNewSD);
DWORD STDCALL BuildSecurityDescriptorW(PTRUSTEE_W pOwner,PTRUSTEE_W pGroup,ULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_W pListOfAccessEntries,
ULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_W pListOfAuditEntries,PSECURITY_DESCRIPTOR pOldSD,PULONG pSizeNewSD,PSECURITY_DESCRIPTOR* pNewSD);
VOID STDCALL BuildTrusteeWithNameA(PTRUSTEE_A pTrustee,LPSTR pName);
VOID STDCALL BuildTrusteeWithNameW(PTRUSTEE_W pTrustee,LPWSTR pName);
VOID STDCALL BuildTrusteeWithObjectsAndNameA(PTRUSTEE_A pTrustee,POBJECTS_AND_NAME_A pObjName,SE_OBJECT_TYPE ObjectType,
LPSTR ObjectTypeName,LPSTR InheritedObjectTypeName,LPSTR Name);
VOID STDCALL BuildTrusteeWithObjectsAndNameW(PTRUSTEE_W pTrustee,POBJECTS_AND_NAME_W pObjName,SE_OBJECT_TYPE ObjectType,
LPWSTR ObjectTypeName,LPWSTR InheritedObjectTypeName,LPWSTR Name);
VOID STDCALL BuildTrusteeWithObjectsAndSidA(PTRUSTEE_A pTrustee,POBJECTS_AND_SID pObjSid,GUID* pObjectGuid,GUID* pInheritedObjectGuid,PSID pSid);
VOID STDCALL BuildTrusteeWithObjectsAndSidW(PTRUSTEE_W pTrustee,POBJECTS_AND_SID pObjSid,GUID* pObjectGuid,GUID* pInheritedObjectGuid,PSID pSid);
VOID STDCALL BuildTrusteeWithSidA(PTRUSTEE_A pTrustee,PSID pSid);
VOID STDCALL BuildTrusteeWithSidW(PTRUSTEE_W pTrustee,PSID pSid);
DWORD STDCALL GetAuditedPermissionsFromAclA(PACL pacl,PTRUSTEE_A pTrustee,PACCESS_MASK pSuccessfulAuditedRights,PACCESS_MASK pFailedAuditRights);
DWORD STDCALL GetAuditedPermissionsFromAclW(PACL pacl,PTRUSTEE_W pTrustee,PACCESS_MASK pSuccessfulAuditedRights,PACCESS_MASK pFailedAuditRights);
DWORD STDCALL GetEffectiveRightsFromAclA(PACL pacl,PTRUSTEE_A pTrustee,PACCESS_MASK pAccessRights);
DWORD STDCALL GetEffectiveRightsFromAclW(PACL pacl,PTRUSTEE_W pTrustee,PACCESS_MASK pAccessRights);
DWORD STDCALL GetExplicitEntriesFromAclA(PACL pacl,PULONG pcCountOfExplicitEntries,PEXPLICIT_ACCESS_A* pListOfExplicitEntries);
DWORD STDCALL GetExplicitEntriesFromAclW(PACL pacl,PULONG pcCountOfExplicitEntries,PEXPLICIT_ACCESS_W* pListOfExplicitEntries);
DWORD STDCALL GetNamedSecurityInfoA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,
PSID* ppsidOwner,PSID* ppsidGroup,PACL* ppDacl,PACL* ppSacl,PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
DWORD STDCALL GetNamedSecurityInfoW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,
PSID* ppsidOwner,PSID* ppsidGroup,PACL* ppDacl,PACL* ppSacl,PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
DWORD STDCALL GetSecurityInfo(HANDLE handle,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,
PSID* ppsidOwner,PSID* ppsidGroup,PACL* ppDacl,PACL* ppSacl,PSECURITY_DESCRIPTOR* ppSecurityDescriptor);
TRUSTEE_FORM STDCALL GetTrusteeFormA(PTRUSTEE_A pTrustee);
TRUSTEE_FORM STDCALL GetTrusteeFormW(PTRUSTEE_W pTrustee);
LPSTR STDCALL GetTrusteeNameA(PTRUSTEE_A pTrustee);
LPWSTR STDCALL GetTrusteeNameW(PTRUSTEE_W pTrustee);
TRUSTEE_TYPE STDCALL GetTrusteeTypeA(PTRUSTEE_A pTrustee);
TRUSTEE_TYPE STDCALL GetTrusteeTypeW(PTRUSTEE_W pTrustee);
DWORD STDCALL LookupSecurityDescriptorPartsA(PTRUSTEE_A* pOwner,PTRUSTEE_A* pGroup,PULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_A* pListOfAccessEntries,
PULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_A* pListOfAuditEntries,PSECURITY_DESCRIPTOR pSD);
DWORD STDCALL LookupSecurityDescriptorPartsW(PTRUSTEE_W* pOwner,PTRUSTEE_W* pGroup,PULONG cCountOfAccessEntries,PEXPLICIT_ACCESS_W* pListOfAccessEntries,
PULONG cCountOfAuditEntries,PEXPLICIT_ACCESS_W* pListOfAuditEntries,PSECURITY_DESCRIPTOR pSD);
DWORD STDCALL SetEntriesInAclA(ULONG cCountOfExplicitEntries,PEXPLICIT_ACCESS_A pListOfExplicitEntries,PACL OldAcl,PACL* NewAcl);
DWORD STDCALL SetEntriesInAclW(ULONG cCountOfExplicitEntries,PEXPLICIT_ACCESS_W pListOfExplicitEntries,PACL OldAcl,PACL* NewAcl);
DWORD STDCALL SetNamedSecurityInfoA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID psidOwner,PSID psidGroup,PACL pDacl,PACL pSacl);
DWORD STDCALL SetNamedSecurityInfoW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID psidOwner,PSID psidGroup,PACL pDacl,PACL pSacl);
DWORD STDCALL SetSecurityInfo(HANDLE handle,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID psidOwner,PSID psidGroup,PACL pDacl,PACL pSacl);
DWORD STDCALL GetInheritanceSourceA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,WINBOOL Container,GUID ** pObjectClassGuids ,DWORD GuidCount,PACL pAcl,PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL,PGENERIC_MAPPING pGenericMapping,PINHERITED_FROMA pInheritArray);
DWORD STDCALL GetInheritanceSourceW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,WINBOOL Container,GUID ** pObjectClassGuids ,DWORD GuidCount,PACL pAcl,PFN_OBJECT_MGR_FUNCTS pfnArray OPTIONAL,PGENERIC_MAPPING pGenericMapping,PINHERITED_FROMW pInheritArray);
DWORD STDCALL FreeInheritedFromArray(PINHERITED_FROMW pInheritArray,USHORT AceCnt,PFN_OBJECT_MGR_FUNCTS pfnArray);
DWORD STDCALL TreeResetNamedSecurityInfoA(LPSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID pOwner,PSID pGroup,PACL pDacl,PACL pSacl,WINBOOL KeepExplicit,FN_PROGRESS fnProgress,PROG_INVOKE_SETTING ProgressInvokeSetting,PVOID Args);
DWORD STDCALL TreeResetNamedSecurityInfoW(LPWSTR pObjectName,SE_OBJECT_TYPE ObjectType,SECURITY_INFORMATION SecurityInfo,PSID pOwner,PSID pGroup,PACL pDacl,PACL pSacl,WINBOOL KeepExplicit,FN_PROGRESS fnProgress,PROG_INVOKE_SETTING ProgressInvokeSetting,PVOID Args);
VOID STDCALL BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A pExplicitAccess,LPSTR pTrusteeName,PTRUSTEE_A pTrustee,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
VOID STDCALL BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W pExplicitAccess,LPWSTR pTrusteeName,PTRUSTEE_W pTrustee,DWORD AccessPermissions,ACCESS_MODE AccessMode,DWORD Inheritance);
VOID STDCALL BuildImpersonateTrusteeA(PTRUSTEE_A pTrustee,PTRUSTEE_A pImpersonateTrustee);
VOID STDCALL BuildImpersonateTrusteeW(PTRUSTEE_W pTrustee,PTRUSTEE_W pImpersonateTrustee);
MULTIPLE_TRUSTEE_OPERATION STDCALL GetMultipleTrusteeOperationA(PTRUSTEE_A pTrustee);
MULTIPLE_TRUSTEE_OPERATION STDCALL GetMultipleTrusteeOperationW(PTRUSTEE_W pTrustee);
PTRUSTEE_A STDCALL GetMultipleTrusteeA(PTRUSTEE_A pTrustee);
PTRUSTEE_W STDCALL GetMultipleTrusteeW(PTRUSTEE_W pTrustee);
#ifndef _DISABLE_TIDENTS
#ifdef UNICODE
#define BuildExplicitAccessWithName BuildExplicitAccessWithNameW
#define BuildSecurityDescriptor BuildSecurityDescriptorW
#define BuildTrusteeWithName BuildTrusteeWithNameW
#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameW
#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidW
#define BuildTrusteeWithSid BuildTrusteeWithSidW
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW
#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclW
#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclW
#define GetNamedSecurityInfo GetNamedSecurityInfoW
#define GetTrusteeForm GetTrusteeFormW
#define GetTrusteeName GetTrusteeNameW
#define GetTrusteeType GetTrusteeTypeW
#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsW
#define SetEntriesInAcl SetEntriesInAclW
#define SetNamedSecurityInfo SetNamedSecurityInfoW
#define GetInheritanceSource GetInheritanceSourceW
#define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoW
#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameW
#define BuildImpersonateTrustee BuildImpersonateTrusteeW
#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationW
#define GetMultipleTrustee GetMultipleTrusteeW
#else
#define BuildExplicitAccessWithName BuildExplicitAccessWithNameA
#define BuildSecurityDescriptor BuildSecurityDescriptorA
#define BuildTrusteeWithName BuildTrusteeWithNameA
#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameA
#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidA
#define BuildTrusteeWithSid BuildTrusteeWithSidA
#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA
#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclA
#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclA
#define GetNamedSecurityInfo GetNamedSecurityInfoA
#define GetTrusteeForm GetTrusteeFormA
#define GetTrusteeName GetTrusteeNameA
#define GetTrusteeType GetTrusteeTypeA
#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsA
#define SetEntriesInAcl SetEntriesInAclA
#define SetNamedSecurityInfo SetNamedSecurityInfoA
#define GetInheritanceSource GetInheritanceSourceA
#define TreeResetNamedSecurityInfo TreeResetNamedSecurityInfoA
#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameA
#define BuildImpersonateTrustee BuildImpersonateTrusteeA
#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationA
#define GetMultipleTrustee GetMultipleTrusteeA
#endif /* UNICODE */
#endif
#ifdef __cplusplus
}
#endif
#endif