155#define ADS_RIGHT_DS_CREATE_CHILD 0x0001
156#define ADS_RIGHT_DS_DELETE_CHILD 0x0002
157#define ADS_RIGHT_ACTRL_DS_LIST 0x0004
158#define ADS_RIGHT_DS_SELF 0x0008
159#define ADS_RIGHT_DS_READ_PROP 0x0010
160#define ADS_RIGHT_DS_WRITE_PROP 0x0020
161#define ADS_RIGHT_DS_DELETE_TREE 0x0040
162#define ADS_RIGHT_DS_LIST_OBJECT 0x0080
163#define ADS_RIGHT_DS_CONTROL_ACCESS 0x0100
259 if (!ServerName || !ServerName[0])
264 if (
Result && (ServerName[0] ==
'\\') && (ServerName[1] ==
'\\'))
282 DWORD SubAuthority[4];
286 memcpy(
sid, &computer_sid,
sizeof(computer_sid) );
309 ERR(
"NtOpenProcessToken failed! Status %08x.\n",
Status);
377 BOOL DisableAllPrivileges,
386 DisableAllPrivileges,
559 if (SidsToDisable !=
NULL)
562 if (DisableSids ==
NULL)
578 if (PrivilegesToDelete !=
NULL)
581 if (DeletePrivileges ==
NULL)
598 if (SidsToRestrict !=
NULL)
601 if (RestrictedSids ==
NULL)
610 RestrictedSids->
GroupCount = RestrictedSidCount;
641 if (DisableSids !=
NULL)
646 if (DeletePrivileges !=
NULL)
651 if (RestrictedSids !=
NULL)
677 BYTE nSubAuthorityCount,
685 pIdentifierAuthority, nSubAuthorityCount,
686 nSubAuthority0, nSubAuthority1, nSubAuthority2, nSubAuthority3,
687 nSubAuthority4, nSubAuthority5, nSubAuthority6, nSubAuthority7,
771 if (*
cbSid < output_sid_length)
773 *
cbSid = output_sid_length;
785 *
cbSid = output_sid_length;
866 BYTE nSubAuthorityCount)
871 pIdentifierAuthority,
954 LPDWORD lpdwAbsoluteSecurityDescriptorSize,
967 pAbsoluteSecurityDescriptor,
968 lpdwAbsoluteSecurityDescriptorSize,
976 lpdwPrimaryGroupSize);
996 TRACE(
"(%p,0x%08x,%p,0x%08x,%p)\n",
Handle, RequestedInformation,
997 pSecurityDescriptor,
nLength, lpnLengthNeeded);
1010 DWORD dwAclRevision)
1030 TRACE(
"(%p)\n", hNamedPipe);
1145 DWORD dwStartingAceIndex,
1147 DWORD nAceListLength)
1199 DWORD nAclInformationLength,
1203 nAclInformationLength, dwAclInformationClass));
1391 RequestedInformation,
1392 pSecurityDescriptor,
1419 TRACE(
"GetFileSecurityW() called\n");
1428 ERR(
"Invalid path\n");
1452 ERR(
"NtOpenFile() failed (Status %lx)\n",
Status);
1458 RequestedInformation,
1459 pSecurityDescriptor,
1465 ERR(
"NtQuerySecurityObject() failed (Status %lx)\n",
Status);
1496 pSecurityDescriptor);
1522 TRACE(
"SetFileSecurityW() called\n");
1531 ERR(
"Invalid path\n");
1555 ERR(
"NtOpenFile() failed (Status %lx)\n",
Status);
1562 pSecurityDescriptor);
1567 ERR(
"NtSetSecurityObject() failed (Status %lx)\n",
Status);
1601 FIXME(
"(0x%08x,0x%08x,0x%08x,0x%08x):stub\n",
x1,
x2,x3,x4);
1670 (
PULONG)PrivilegeSetLength,
1704 PSID PrincipalSelfSid,
1708 DWORD ObjectTypeListLength,
1816 LPDWORD hReferencedDomainNameLength,
1830 *hReferencedDomainNameLength *
sizeof(
WCHAR));
1836 lpReferencedDomainNameW,
1837 hReferencedDomainNameLength,
1840 if (
ret && lpReferencedDomainNameW)
1844 lpReferencedDomainNameW,
1845 *hReferencedDomainNameLength + 1,
1847 *hReferencedDomainNameLength + 1,
1931 DWORD AccessPermissions,
1953 DWORD AccessPermissions,
1975 DWORD ObjectsPresent = 0;
2011 DWORD ObjectsPresent = 0;
2050 DWORD ObjectsPresent = 0;
2099 DWORD ObjectsPresent = 0;
2207 TRACE(
"(%p)\n", pTrustee);
2220 TRACE(
"(%p)\n", pTrustee);
2272 DWORD nAclInformationLength,
2279 nAclInformationLength,
2280 dwAclInformationClass);
2358 while (*szAcl && *szAcl !=
'(')
2364 else if (*szAcl ==
'A')
2369 else if (*szAcl ==
'I')
2404 while (*szAcl ==
' ')
2407 while (lpaf->
wstr &&
2415 *StringAcl = szAcl +
len;
2441 while (*szAcl ==
' ')
2444 while (*szAcl !=
';')
2448 while (lpaf->
wstr &&
2512 while (*szAcl ==
' ')
2515 if ((*szAcl ==
'0') && (*(szAcl + 1) ==
'x'))
2519 while (*
p && *
p !=
';')
2522 if (
p - szAcl <= 10 )
2532 while (*szAcl !=
';')
2536 while (lpaf->
wstr &&
2546 rights |= lpaf->
value;
2584 while (*StringAcl ==
'(')
2592 if (*StringAcl !=
';')
2603 if (*StringAcl !=
';')
2611 if (*StringAcl !=
';')
2616 while (*StringAcl ==
' ')
2618 if (*StringAcl !=
';')
2620 FIXME(
"Support for *_OBJECT_ACE_TYPE not implemented\n");
2626 while (*StringAcl ==
' ')
2628 if (*StringAcl !=
';')
2630 FIXME(
"Support for *_OBJECT_ACE_TYPE not implemented\n");
2638 while (*StringAcl && *StringAcl !=
')')
2642 if (*StringAcl !=
')')
2660 ERR(
"ACL too large\n");
2676 WARN(
"Invalid ACE string format\n");
2684 LPCWSTR StringSecurityDescriptor,
2702 while (*StringSecurityDescriptor ==
' ')
2703 StringSecurityDescriptor++;
2705 while (*StringSecurityDescriptor)
2707 toktype = *StringSecurityDescriptor;
2710 StringSecurityDescriptor++;
2711 if (*StringSecurityDescriptor !=
':')
2716 StringSecurityDescriptor++;
2719 lptoken = StringSecurityDescriptor;
2720 while (*lptoken && *lptoken !=
':')
2726 len = lptoken - StringSecurityDescriptor;
2809 FIXME(
"Unknown token\n");
2814 StringSecurityDescriptor = lptoken;
2832 DWORD StringSDRevision,
2834 PULONG SecurityDescriptorSize)
2838 LPWSTR StringSecurityDescriptorW;
2843 if (StringSecurityDescriptorW)
2849 SecurityDescriptorSize);
2862 DWORD StringSDRevision,
2864 PULONG SecurityDescriptorSize)
2894 if (!psd)
goto lend;
2906 if (SecurityDescriptorSize)
2907 *SecurityDescriptorSize = cBytes;
2912 TRACE(
" ret=%d\n", bret);
2934 WCHAR fmt[] = {
'S',
'-',
'%',
'u',
'-',
'%',
'd',0 };
2935 WCHAR subauthfmt[] = {
'-',
'%',
'u',0 };
2948 FIXME(
"not matching MS' bugs\n");
3022 static const WCHAR fmtW[] = {
'0',
'x',
'%',
'x',0};
3042 for (
i = 0;
i < 32;
i++)
3054 for (
i = 0;
i < 32;
i++)
3055 if (
mask & (1 <<
i))
3062 static const WCHAR openbr =
'(';
3063 static const WCHAR closebr =
')';
3064 static const WCHAR semicolon =
';';
3142 if (!
DumpAce(ace, pwptr, plen))
3151 static const WCHAR prefix[] = {
'O',
':',0};
3162 if (!
DumpSid(psid, pwptr, plen))
3169 static const WCHAR prefix[] = {
'G',
':',0};
3180 if (!
DumpSid(psid, pwptr, plen))
3187 static const WCHAR dacl[] = {
'D',
':',0};
3189 BOOL present, defaulted;
3210 static const WCHAR sacl[] = {
'S',
':',0};
3212 BOOL present, defaulted;
3241 ERR(
"Program requested unknown SDDL revision %d\n", SDRevision);
3289 *OutputString = wstr;
3291 *OutputLen =
strlenW(*OutputString)+1;
3309 if (*OutputString ==
NULL)
3319 if (OutputLen !=
NULL)
3325 *OutputString =
NULL;
3343 else if (!StringSid || !
Sid)
3366 else if (!StringSid || !
Sid)
3387 WCHAR FixedBuffer[64];
3411 if (
NULL == *StringSid)
3456 if (
NULL == *StringSid)
3499 TRACE(
"CreateProcessWithLogonW(%s %s %s 0x%08x %s %s 0x%08x %p %s %p %p)\n",
debugstr_w(lpUsername),
debugstr_w(lpDomain),
3502 lpStartupInfo, lpProcessInformation);
3507 L"\\pipe\\seclogon",
3512 WARN(
"RpcStringBindingCompose returned 0x%x\n",
Status);
3522 WARN(
"RpcBindingFromStringBinding returned 0x%x\n",
Status);
3528 WARN(
"RpcStringFree returned 0x%x\n",
Status);
3538 Request.dwLogonFlags = dwLogonFlags;
3539 Request.dwCreationFlags = dwCreationFlags;
3542 TRACE(
"Request.dwProcessId %lu\n",
Request.dwProcessId);
3565 WARN(
"RpcBindingFree returned 0x%x\n",
Status);
3579 TRACE(
"CreateProcessWithLogonW() done\n");
3588 FIXME(
"%p 0x%08x %s %s 0x%08x %p %s %p %p - semi-stub\n",
token,
3590 creation_flags, environment,
debugstr_w(current_directory),
3591 startup_info, process_information);
3595 current_directory, startup_info, process_information );
3613 TRACE(
"%p 0x%08x 0x%08x 0x%08x %p\n", ExistingTokenHandle, dwDesiredAccess,
3621 if (lpTokenAttributes !=
NULL)
3625 lpTokenAttributes->bInheritHandle ?
OBJ_INHERIT : 0,
3627 lpTokenAttributes->lpSecurityDescriptor);
3645 DuplicateTokenHandle);
3648 ERR(
"NtDuplicateToken failed: Status %08x\n",
Status);
3653 TRACE(
"Returning token %p.\n", *DuplicateTokenHandle);
3671 DuplicateTokenHandle);
3679 if (StringSid[0] ==
'S' && StringSid[1] ==
'-')
3684 if (*StringSid ==
'-')
3725 TRACE(
"StringSid is NULL, returning FALSE\n");
3729 while (*StringSid ==
' ')
3738 TRACE(
"only size requested, returning TRUE with %d\n", *cBytes);
3742 if (StringSid[0] ==
'S' && StringSid[1] ==
'-')
3757 TRACE(
"SubAuthorityCount is 0\n");
3764 while (*StringSid && *StringSid !=
'-')
3766 if (*StringSid ==
'-')
3774 identAuth =
atoiW(StringSid);
3781 while (*StringSid && *StringSid !=
'-')
3783 if (*StringSid ==
'-')
3790 while (*StringSid && *StringSid !=
'-')
3792 if (*StringSid ==
'-')
3834 TRACE(
"returning %s\n", bret ?
"TRUE" :
"FALSE");
3858 TRACE(
"%s %d %d %p %p %p %p %p\n", pObjectName,
ObjectType, SecurityInfo,
3859 ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor);
3869 ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor );
3882 DWORD required_size;
3885 FIXME(
"(%p %p %p): semi-stub\n",
sid, domain_sid,
size );
3906 if (*
size < required_size || !domain_sid)
3908 *
size = required_size;
3915 for (
i = 0;
i < 4;
i++)
3918 *
size = required_size;
static GENERIC_MAPPING GenericMapping
enum _ACCESS_MODE ACCESS_MODE
enum _TRUSTEE_FORM TRUSTEE_FORM
enum _TRUSTEE_TYPE TRUSTEE_TYPE
@ TRUSTEE_IS_OBJECTS_AND_SID
@ TRUSTEE_IS_OBJECTS_AND_NAME
enum _SE_OBJECT_TYPE SE_OBJECT_TYPE
NTSTATUS NTAPI NtAccessCheck(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ HANDLE TokenHandle, _In_ ACCESS_MASK DesiredAccess, _In_ PGENERIC_MAPPING GenericMapping, _Out_opt_ PPRIVILEGE_SET PrivilegeSet, _Inout_ PULONG PrivilegeSetLength, _Out_ PACCESS_MASK GrantedAccess, _Out_ PNTSTATUS AccessStatus)
Determines whether security access rights can be given to an object depending on the security descrip...
static unsigned char bytes[4]
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
VOID __stdcall SeclCreateProcessWithLogonW(_In_ handle_t hBinding, _In_ SECL_REQUEST *pRequest, _Out_ SECL_RESPONSE *pResponse)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
SIZE_T LPPROCESS_INFORMATION
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define NT_SUCCESS(StatCode)
BOOL WINAPI LookupAccountNameW(LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSID Sid, LPDWORD cbSid, LPWSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse)
DWORD WINAPI GetNamedSecurityInfoW(LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID *ppsidOwner, PSID *ppsidGroup, PACL *ppDacl, PACL *ppSacl, PSECURITY_DESCRIPTOR *ppSecurityDescriptor)
BOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName, LPCWSTR lpName, LPWSTR lpDisplayName, LPDWORD cchDisplayName, LPDWORD lpLanguageId)
BOOL WINAPI LookupPrivilegeNameW(LPCWSTR lpSystemName, PLUID lpLuid, LPWSTR lpName, LPDWORD cchName)
DWORD WINAPI SetNamedSecurityInfoW(LPWSTR pObjectName, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID psidOwner, PSID psidGroup, PACL pDacl, PACL pSacl)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI GetAclInformation(PACL pAcl, LPVOID pAclInformation, DWORD nAclInformationLength, ACL_INFORMATION_CLASS dwAclInformationClass)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
#define ADS_RIGHT_DS_LIST_OBJECT
BOOL WINAPI LookupAccountNameA(LPCSTR SystemName, LPCSTR AccountName, PSID Sid, LPDWORD SidLength, LPSTR ReferencedDomainName, LPDWORD hReferencedDomainNameLength, PSID_NAME_USE SidNameUse)
static BOOL DumpSacl(PSECURITY_DESCRIPTOR SecurityDescriptor, WCHAR **pwptr, ULONG *plen)
static const WCHAR SDDL_AUDIT_FAILURE[]
BOOL WINAPI PrivilegeCheck(HANDLE ClientToken, PPRIVILEGE_SET RequiredPrivileges, LPBOOL pfResult)
static const ACEFLAG AceFlags[]
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA(PSECURITY_DESCRIPTOR SecurityDescriptor, DWORD SDRevision, SECURITY_INFORMATION Information, LPSTR *OutputString, PULONG OutputLen)
static const WELLKNOWNRID WellKnownRids[]
BOOL WINAPI CreateRestrictedToken(_In_ HANDLE ExistingTokenHandle, _In_ DWORD Flags, _In_ DWORD DisableSidCount, _In_reads_opt_(DisableSidCount) PSID_AND_ATTRIBUTES SidsToDisable, _In_ DWORD DeletePrivilegeCount, _In_reads_opt_(DeletePrivilegeCount) PLUID_AND_ATTRIBUTES PrivilegesToDelete, _In_ DWORD RestrictedSidCount, _In_reads_opt_(RestrictedSidCount) PSID_AND_ATTRIBUTES SidsToRestrict, _Outptr_ PHANDLE NewTokenHandle)
Creates a filtered token that is a restricted one of the regular access token. A restricted token can...
BOOL WINAPI SetAclInformation(PACL pAcl, LPVOID pAclInformation, DWORD nAclInformationLength, ACL_INFORMATION_CLASS dwAclInformationClass)
BOOL WINAPI DuplicateToken(IN HANDLE ExistingTokenHandle, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, OUT PHANDLE DuplicateTokenHandle)
BOOL WINAPI ConvertStringSidToSidW(LPCWSTR StringSid, PSID *Sid)
BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR *StringSid)
BOOL WINAPI SetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength)
static DWORD ParseAclStringFlags(LPCWSTR *StringAcl)
BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorA(LPCSTR StringSecurityDescriptor, DWORD StringSDRevision, PSECURITY_DESCRIPTOR *SecurityDescriptor, PULONG SecurityDescriptorSize)
BOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR lpSystemName, LPCSTR lpName, LPSTR lpDisplayName, LPDWORD cchDisplayName, LPDWORD lpLanguageId)
TRUSTEE_TYPE WINAPI GetTrusteeTypeW(PTRUSTEE_W pTrustee)
static const ACEFLAG AceRights[]
static BYTE ParseAceStringFlags(LPCWSTR *StringAcl)
static const WCHAR SDDL_CONTAINER_INHERIT[]
static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes)
BOOL WINAPI InitializeSid(PSID Sid, PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount)
struct _ACEFLAG * LPACEFLAG
BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW(PSECURITY_DESCRIPTOR SecurityDescriptor, DWORD SDRevision, SECURITY_INFORMATION RequestedInformation, LPWSTR *OutputString, PULONG OutputLen)
static const WCHAR SDDL_AUDIT[]
static LPWSTR SERV_dup(LPCSTR str)
static BOOL DumpGroup(PSECURITY_DESCRIPTOR SecurityDescriptor, WCHAR **pwptr, ULONG *plen)
static BOOL DumpAce(LPVOID pace, WCHAR **pwptr, ULONG *plen)
DWORD WINAPI GetSecurityInfoExA(HANDLE hObject, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, LPCSTR lpProvider, LPCSTR lpProperty, PACTRL_ACCESSA *ppAccessList, PACTRL_AUDITA *ppAuditList, LPSTR *lppOwner, LPSTR *lppGroup)
static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(LPCWSTR StringSecurityDescriptor, SECURITY_DESCRIPTOR_RELATIVE *SecurityDescriptor, LPDWORD cBytes)
BOOL WINAPI ConvertStringSidToSidA(LPCSTR StringSid, PSID *Sid)
BOOL WINAPI EqualPrefixSid(PSID pSid1, PSID pSid2)
#define ADS_RIGHT_DS_DELETE_TREE
#define ADS_RIGHT_ACTRL_DS_LIST
VOID WINAPI BuildTrusteeWithSidA(PTRUSTEE_A pTrustee, PSID pSid)
DWORD WINAPI GetSecurityInfoExW(HANDLE hObject, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, LPCWSTR lpProvider, LPCWSTR lpProperty, PACTRL_ACCESSW *ppAccessList, PACTRL_AUDITW *ppAuditList, LPWSTR *lppOwner, LPWSTR *lppGroup)
LPWSTR WINAPI GetTrusteeNameW(PTRUSTEE_W pTrustee)
static const WCHAR SDDL_NO_WRITE_UP[]
BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
BOOL WINAPI AddAccessDeniedAceEx(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, PSID pSid)
static const WCHAR SDDL_OBJECT_AUDIT[]
BOOL WINAPI AddAce(PACL pAcl, DWORD dwAceRevision, DWORD dwStartingAceIndex, LPVOID pAceList, DWORD nAceListLength)
static BOOL DumpOwner(PSECURITY_DESCRIPTOR SecurityDescriptor, WCHAR **pwptr, ULONG *plen)
static const WCHAR SDDL_OBJECT_INHERIT[]
static void DumpString(LPCWSTR string, int cch, WCHAR **pwptr, ULONG *plen)
BOOL WINAPI DeleteAce(PACL pAcl, DWORD dwAceIndex)
TRUSTEE_TYPE WINAPI GetTrusteeTypeA(PTRUSTEE_A pTrustee)
static BOOL DumpSid(PSID psid, WCHAR **pwptr, ULONG *plen)
BOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor, PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor, LPDWORD lpdwAbsoluteSecurityDescriptorSize, PACL pDacl, LPDWORD lpdwDaclSize, PACL pSacl, LPDWORD lpdwSaclSize, PSID pOwner, LPDWORD lpdwOwnerSize, PSID pPrimaryGroup, LPDWORD lpdwPrimaryGroupSize)
#define ADS_RIGHT_DS_CREATE_CHILD
PDWORD WINAPI GetSidSubAuthority(PSID pSid, DWORD nSubAuthority)
static const WCHAR SDDL_ACCESS_ALLOWED[]
static const WCHAR SDDL_OBJECT_ACCESS_DENIED[]
LPSTR WINAPI GetTrusteeNameA(PTRUSTEE_A pTrustee)
static BOOL DumpSidNumeric(PSID psid, WCHAR **pwptr, ULONG *plen)
BOOL WINAPI SetFileSecurityW(LPCWSTR lpFileName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
VOID WINAPI BuildExplicitAccessWithNameA(PEXPLICIT_ACCESSA pExplicitAccess, LPSTR pTrusteeName, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance)
#define ADS_RIGHT_DS_READ_PROP
BOOL WINAPI SetThreadToken(IN PHANDLE ThreadHandle OPTIONAL, IN HANDLE TokenHandle)
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
DWORD WINAPI GetSidLengthRequired(UCHAR nSubAuthorityCount)
BOOL WINAPI IsValidSid(PSID pSid)
static const WCHAR SDDL_INHERIT_ONLY[]
#define ADS_RIGHT_DS_DELETE_CHILD
BOOL WINAPI SynchronizeWindows31FilesAndWindowsNTRegistry(DWORD x1, DWORD x2, DWORD x3, DWORD x4)
BOOL WINAPI AreAnyAccessesGranted(DWORD GrantedAccess, DWORD DesiredAccess)
BOOL WINAPI IsWellKnownSid(IN PSID pSid, IN WELL_KNOWN_SID_TYPE WellKnownSidType)
VOID WINAPI BuildTrusteeWithObjectsAndNameW(PTRUSTEEW pTrustee, POBJECTS_AND_NAME_W pObjName, SE_OBJECT_TYPE ObjectType, LPWSTR ObjectTypeName, LPWSTR InheritedObjectTypeName, LPWSTR Name)
BOOL WINAPI CopySid(DWORD nDestinationSidLength, PSID pDestinationSid, PSID pSourceSid)
static const WCHAR SDDL_INHERITED[]
static const WCHAR SDDL_ACCESS_DENIED[]
BOOL WINAPI AddAuditAccessAce(PACL pAcl, DWORD dwAceRevision, DWORD dwAccessMask, PSID pSid, BOOL bAuditSuccess, BOOL bAuditFailure)
BOOL WINAPI AllocateLocallyUniqueId(PLUID Luid)
PUCHAR WINAPI GetSidSubAuthorityCount(PSID pSid)
BOOL WINAPI GetKernelObjectSecurity(HANDLE Handle, SECURITY_INFORMATION RequestedInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, LPDWORD lpnLengthNeeded)
BOOL WINAPI InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision)
#define ADS_RIGHT_DS_CONTROL_ACCESS
BOOL WINAPI ImpersonateNamedPipeClient(HANDLE hNamedPipe)
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
VOID WINAPI BuildExplicitAccessWithNameW(PEXPLICIT_ACCESSW pExplicitAccess, LPWSTR pTrusteeName, DWORD AccessPermissions, ACCESS_MODE AccessMode, DWORD Inheritance)
static DWORD ComputeStringSidSize(LPCWSTR StringSid)
static const WCHAR SDDL_OBJECT_ALARM[]
VOID WINAPI BuildTrusteeWithObjectsAndSidW(PTRUSTEEW pTrustee, POBJECTS_AND_SID pObjSid, GUID *pObjectGuid, GUID *pInheritedObjectGuid, PSID pSid)
static const WCHAR SDDL_MANDATORY_LABEL[]
static const WCHAR SDDL_ALARM[]
static const WCHAR SDDL_OBJECT_ACCESS_ALLOWED[]
BOOL WINAPI AddAccessAllowedAce(PACL pAcl, DWORD dwAceRevision, DWORD AccessMask, PSID pSid)
static const SID sidWorld
BOOL WINAPI AddAccessAllowedAceEx(PACL pAcl, DWORD dwAceRevision, DWORD AceFlags, DWORD AccessMask, PSID pSid)
BOOL ADVAPI_IsLocalComputer(LPCWSTR ServerName)
VOID WINAPI BuildTrusteeWithObjectsAndNameA(PTRUSTEEA pTrustee, POBJECTS_AND_NAME_A pObjName, SE_OBJECT_TYPE ObjectType, LPSTR ObjectTypeName, LPSTR InheritedObjectTypeName, LPSTR Name)
DWORD WINAPI GetLengthSid(PSID pSid)
BOOL WINAPI QueryWindows31FilesMigration(DWORD x1)
static const WCHAR SDDL_NO_PROPAGATE[]
VOID WINAPI BuildTrusteeWithNameA(PTRUSTEE_A pTrustee, LPSTR name)
static const WELLKNOWNSID WellKnownSids[]
BOOL WINAPI OpenThreadToken(HANDLE ThreadHandle, DWORD DesiredAccess, BOOL OpenAsSelf, HANDLE *TokenHandle)
PVOID WINAPI FreeSid(PSID pSid)
BOOL WINAPI ConvertSidToStringSidA(PSID Sid, LPSTR *StringSid)
BOOL WINAPI SetFileSecurityA(LPCSTR lpFileName, SECURITY_INFORMATION SecurityInformation, PSECURITY_DESCRIPTOR pSecurityDescriptor)
BOOL WINAPI GetWindowsAccountDomainSid(PSID sid, PSID domain_sid, DWORD *size)
static const WCHAR SDDL_NO_EXECUTE_UP[]
#define ADS_RIGHT_DS_WRITE_PROP
BOOL WINAPI CreateProcessWithTokenW(HANDLE token, DWORD logon_flags, LPCWSTR application_name, LPWSTR command_line, DWORD creation_flags, void *environment, LPCWSTR current_directory, STARTUPINFOW *startup_info, PROCESS_INFORMATION *process_information)
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
BOOL WINAPI AccessCheck(IN PSECURITY_DESCRIPTOR pSecurityDescriptor, IN HANDLE ClientToken, IN DWORD DesiredAccess, IN PGENERIC_MAPPING GenericMapping, OUT PPRIVILEGE_