Author: weiden
Date: Tue Dec 11 20:22:34 2007
New Revision: 31155
URL:
http://svn.reactos.org/svn/reactos?rev=31155&view=rev
Log:
Replace GetOwner helper function with the already existing AccpGetAceSid function and
enhance it to also support SYSTEM_MANDATORY_LABEL_ACE_TYPE
Modified:
trunk/reactos/dll/win32/ntmarta/ntmarta.c
Modified: trunk/reactos/dll/win32/ntmarta/ntmarta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ntmarta/ntmarta.…
==============================================================================
--- trunk/reactos/dll/win32/ntmarta/ntmarta.c (original)
+++ trunk/reactos/dll/win32/ntmarta/ntmarta.c Tue Dec 11 20:22:34 2007
@@ -140,6 +140,11 @@
Size += sizeof(Ace->InheritedObjectType);
break;
}
+
+ case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
+ Size = FIELD_OFFSET(SYSTEM_MANDATORY_LABEL_ACE,
+ SidStart);
+ break;
}
return Size;
@@ -1000,24 +1005,6 @@
}
}
-static PSID
-GetOwner(PACE_HEADER Ace)
-{
- switch (Ace->AceType)
- {
- case ACCESS_ALLOWED_ACE_TYPE:
- return (PSID)&((PACCESS_ALLOWED_ACE)Ace)->SidStart;
- case ACCESS_DENIED_ACE_TYPE:
- return (PSID)&((PACCESS_DENIED_ACE)Ace)->SidStart;
- case SYSTEM_AUDIT_ACE_TYPE:
- return (PSID)&((PSYSTEM_AUDIT_ACE)Ace)->SidStart;
- case SYSTEM_MANDATORY_LABEL_ACE_TYPE:
- return (PSID)&((PSYSTEM_MANDATORY_LABEL_ACE)Ace)->SidStart;
- default:
- DPRINT1("Unknown ACE type 0x%x\n", Ace->AceType);
- return NULL;
- }
-}
/**********************************************************************
* AccRewriteSetEntriesInAcl EXPORTED
@@ -1073,7 +1060,7 @@
continue;
if (!GetAce(OldAcl, i, (PVOID*)&pAce))
goto cleanup;
- pSid2 = GetOwner(pAce);
+ pSid2 = AccpGetAceSid(pAce);
if (RtlEqualSid(pSid1, pSid2))
{
pKeepAce[i] = FALSE;