[RTL]: Cleanup all the ACL functions. Mostly refactoring, commenting and styling, but there are a few important changes. First, RtlValidateAcl actually does the whole ACL validation algorithm. Second, mandatory label ACEs are not supported, because we shouldn't lie about Vista features in ntdll/kernel code.

svn path=/trunk/; revision=57331
This commit is contained in:
Alex Ionescu 2012-09-19 02:32:58 +00:00
parent f049284961
commit fb5821703c
5 changed files with 640 additions and 597 deletions

View file

@ -435,7 +435,7 @@
;@ stdcall RtlAddCompoundAce
;@ stdcall RtlAddRange ; 5.0 and 5.1 only
@ stdcall -arch=x86_64 RtlAddFunctionTable(ptr long long)
@ stdcall RtlAddMandatoryAce(ptr long long long long ptr)
;@ stdcall RtlAddMandatoryAce(ptr long long long long ptr)
@ stdcall RtlAddRefActivationContext(ptr)
;@ stdcall RtlAddRefMemoryStream
@ stdcall RtlAddVectoredContinueHandler(long ptr)

View file

@ -24,7 +24,7 @@
@ stdcall AddAuditAccessAce(ptr long long ptr long long)
@ stdcall AddAuditAccessAceEx(ptr long long long ptr long long)
@ stdcall AddAuditAccessObjectAce(ptr long long long ptr ptr ptr long long)
@ stdcall AddMandatoryAce(ptr long long long ptr)
;@ stdcall AddMandatoryAce(ptr long long long ptr)
@ stdcall AddUsersToEncryptedFile(wstr ptr)
@ stdcall AdjustTokenGroups(long long ptr long ptr ptr)
@ stdcall AdjustTokenPrivileges(long long ptr long ptr ptr)

View file

@ -394,36 +394,6 @@ AddAuditAccessObjectAce(PACL pAcl,
return TRUE;
}
/*
* @implemented
*/
BOOL
WINAPI
AddMandatoryAce(IN OUT PACL pAcl,
IN DWORD dwAceRevision,
IN DWORD AceFlags,
IN DWORD MandatoryPolicy,
IN PSID pLabelSid)
{
NTSTATUS Status;
Status = RtlAddMandatoryAce(pAcl,
dwAceRevision,
AceFlags,
MandatoryPolicy,
SYSTEM_MANDATORY_LABEL_ACE_TYPE,
pLabelSid);
if (!NT_SUCCESS(Status))
{
SetLastError(RtlNtStatusToDosError(Status));
return FALSE;
}
return TRUE;
}
/*
* @implemented
*/

View file

@ -32,7 +32,7 @@ LsapInitLsa(VOID)
/* Start the RPC server */
LsarStartRpcServer();
TRACE("Creating notification event!\n");
DbgPrint("Creating notification event!\n");
/* Notify the service manager */
hEvent = CreateEventW(NULL,
TRUE,
@ -41,7 +41,7 @@ LsapInitLsa(VOID)
if (hEvent == NULL)
{
dwError = GetLastError();
TRACE("Failed to create the notication event (Error %lu)\n", dwError);
DbgPrint("Failed to create the notication event (Error %lu)\n", dwError);
if (dwError == ERROR_ALREADY_EXISTS)
{
@ -50,13 +50,13 @@ LsapInitLsa(VOID)
L"LSA_RPC_SERVER_ACTIVE");
if (hEvent == NULL)
{
ERR("Could not open the notification event (Error %lu)\n", GetLastError());
DbgPrint("Could not open the notification event (Error %lu)\n", GetLastError());
return STATUS_UNSUCCESSFUL;
}
}
}
TRACE("Set notification event!\n");
DbgPrint("Set notification event!\n");
SetEvent(hEvent);
/* NOTE: Do not close the event handle!!!! */

File diff suppressed because it is too large Load diff