mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
2002-10-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
* apps/tests/tokentest/tokentest.c (ROS_ACE_HEADER): Move field AccessMask ... (ROS_ACE): ... here. (DisplayDacl): Make pAce an ROS_ACE*; Use new path for AceType; Use sizeof(ACE) instead of sizeof(ACE_HEADER). * include/ntos/security.h (ACE_HEADER): Move field AccessMask ... (ACE): ... here. * lib/ntdll/rtl/acl.c: Use new path for AccessMask. * ntoskrnl/se/semgr.c: Ditto. * ntoskrnl/se/acl.c (SepInitDACLs): Use new path for AccessMask; Use sizeof(ACE) instead of sizeof(ACE_HEADER). * ntoskrnl/se/token.c (SepCreateSystemProcessToken): Use sizeof(ACE) instead of sizeof(ACE_HEADER). svn path=/trunk/; revision=3654
This commit is contained in:
parent
6efd5e3b01
commit
c28439db70
7 changed files with 39 additions and 23 deletions
|
@ -1,3 +1,19 @@
|
|||
2002-10-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* apps/tests/tokentest/tokentest.c (ROS_ACE_HEADER): Move field
|
||||
AccessMask ...
|
||||
(ROS_ACE): ... here.
|
||||
(DisplayDacl): Make pAce an ROS_ACE*; Use new path for AceType; Use
|
||||
sizeof(ACE) instead of sizeof(ACE_HEADER).
|
||||
* include/ntos/security.h (ACE_HEADER): Move field AccessMask ...
|
||||
(ACE): ... here.
|
||||
* lib/ntdll/rtl/acl.c: Use new path for AccessMask.
|
||||
* ntoskrnl/se/semgr.c: Ditto.
|
||||
* ntoskrnl/se/acl.c (SepInitDACLs): Use new path for AccessMask; Use
|
||||
sizeof(ACE) instead of sizeof(ACE_HEADER).
|
||||
* ntoskrnl/se/token.c (SepCreateSystemProcessToken): Use sizeof(ACE)
|
||||
instead of sizeof(ACE_HEADER).
|
||||
|
||||
2002-10-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||
|
||||
* include/napi/teb.h (RTL_USER_PROCESS_PARAMETERS): Use field names
|
||||
|
|
|
@ -45,12 +45,12 @@ typedef struct _ROS_ACE_HEADER
|
|||
CHAR AceType;
|
||||
CHAR AceFlags;
|
||||
USHORT AceSize;
|
||||
ACCESS_MASK AccessMask;
|
||||
} ROS_ACE_HEADER, *PROS_ACE_HEADER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ACE_HEADER Header;
|
||||
ACCESS_MASK AccessMask;
|
||||
} ROS_ACE, *PROS_ACE;
|
||||
|
||||
NTSYSAPI
|
||||
|
@ -247,7 +247,7 @@ DisplayDacl(PACL pAcl)
|
|||
for (i = 0; i < pAcl->AceCount; i++)
|
||||
{
|
||||
UNICODE_STRING scSid;
|
||||
ROS_ACE_HEADER* pAce;
|
||||
ROS_ACE* pAce;
|
||||
LPWSTR wszType = 0;
|
||||
PSID pSid;
|
||||
|
||||
|
@ -259,9 +259,9 @@ DisplayDacl(PACL pAcl)
|
|||
}
|
||||
|
||||
pSid = (PSID) (pAce + 1);
|
||||
if ( pAce->AceType == ACCESS_ALLOWED_ACE_TYPE )
|
||||
if ( pAce->Header.AceType == ACCESS_ALLOWED_ACE_TYPE )
|
||||
wszType = L"allow";
|
||||
if ( pAce->AceType == ACCESS_DENIED_ACE_TYPE )
|
||||
if ( pAce->Header.AceType == ACCESS_DENIED_ACE_TYPE )
|
||||
wszType = L"deny ";
|
||||
|
||||
status = RtlConvertSidToUnicodeString(&scSid, pSid, TRUE);
|
||||
|
@ -437,8 +437,8 @@ CreateInitialSystemToken(HANDLE* phSystemToken)
|
|||
|
||||
// Calculate the length needed for the ACL
|
||||
uSize = sizeof(ACL);
|
||||
uSize += sizeof(ACE_HEADER) + sizeof(sidSystem);
|
||||
uSize += sizeof(ACE_HEADER) + sizeof(sidAdministrators);
|
||||
uSize += sizeof(ACE) + sizeof(sidSystem);
|
||||
uSize += sizeof(ACE) + sizeof(sidAdministrators);
|
||||
uSize = (uSize & (~3)) + 8;
|
||||
tkDefaultDacl.DefaultDacl = (PACL) malloc(uSize);
|
||||
|
||||
|
|
|
@ -173,15 +173,15 @@ typedef SECURITY_QUALITY_OF_SERVICE* PSECURITY_QUALITY_OF_SERVICE;
|
|||
|
||||
typedef struct _ACE_HEADER
|
||||
{
|
||||
CHAR AceType;
|
||||
CHAR AceFlags;
|
||||
USHORT AceSize;
|
||||
ACCESS_MASK AccessMask;
|
||||
BYTE AceType;
|
||||
BYTE AceFlags;
|
||||
WORD AceSize;
|
||||
} ACE_HEADER, *PACE_HEADER;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ACE_HEADER Header;
|
||||
ACCESS_MASK AccessMask;
|
||||
} ACE, *PACE;
|
||||
|
||||
typedef struct _SID_IDENTIFIER_AUTHORITY
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: acl.c,v 1.8 2002/09/08 10:23:04 chorns Exp $
|
||||
/* $Id: acl.c,v 1.9 2002/10/25 21:48:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -137,7 +137,7 @@ RtlpAddKnownAce(PACL Acl,
|
|||
Ace->Header.AceFlags = 0;
|
||||
Ace->Header.AceType = Type;
|
||||
Ace->Header.AceSize = RtlLengthSid(Sid) + sizeof(ACE);
|
||||
Ace->Header.AccessMask = AccessMask;
|
||||
Ace->AccessMask = AccessMask;
|
||||
RtlCopySid(RtlLengthSid(Sid), (PSID)(Ace + 1), Sid);
|
||||
Acl->AceCount++;
|
||||
Acl->AclRevision = Revision;
|
||||
|
@ -320,7 +320,7 @@ RtlAddAuditAccessAce(PACL Acl,
|
|||
Ace->Header.AceFlags = Flags;
|
||||
Ace->Header.AceType = 2;
|
||||
Ace->Header.AceSize = RtlLengthSid(Sid) + sizeof(ACE);
|
||||
Ace->Header.AccessMask = AccessMask;
|
||||
Ace->AccessMask = AccessMask;
|
||||
RtlCopySid(RtlLengthSid(Sid),
|
||||
(PSID)(Ace + 1),
|
||||
Sid);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: acl.c,v 1.9 2002/09/08 10:23:43 chorns Exp $
|
||||
/* $Id: acl.c,v 1.10 2002/10/25 21:48:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -40,11 +40,11 @@ SepInitDACLs(VOID)
|
|||
ULONG AclLength4;
|
||||
|
||||
AclLength2 = sizeof(ACL) +
|
||||
2 * (RtlLengthRequiredSid(1) + sizeof(ACE_HEADER));
|
||||
2 * (RtlLengthRequiredSid(1) + sizeof(ACE));
|
||||
AclLength3 = sizeof(ACL) +
|
||||
3 * (RtlLengthRequiredSid(1) + sizeof(ACE_HEADER));
|
||||
3 * (RtlLengthRequiredSid(1) + sizeof(ACE));
|
||||
AclLength4 = sizeof(ACL) +
|
||||
4 * (RtlLengthRequiredSid(1) + sizeof(ACE_HEADER));
|
||||
4 * (RtlLengthRequiredSid(1) + sizeof(ACE));
|
||||
|
||||
/* create PublicDefaultDacl */
|
||||
SePublicDefaultDacl = ExAllocatePoolWithTag(NonPagedPool,
|
||||
|
@ -210,7 +210,7 @@ RtlpAddKnownAce(PACL Acl,
|
|||
Ace->Header.AceFlags = 0;
|
||||
Ace->Header.AceType = Type;
|
||||
Ace->Header.AceSize = RtlLengthSid(Sid) + sizeof(ACE);
|
||||
Ace->Header.AccessMask = AccessMask;
|
||||
Ace->AccessMask = AccessMask;
|
||||
RtlCopySid(RtlLengthSid(Sid), (PSID)(Ace + 1), Sid);
|
||||
Acl->AceCount++;
|
||||
Acl->AclRevision = Revision;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: semgr.c,v 1.22 2002/09/08 10:23:43 chorns Exp $
|
||||
/* $Id: semgr.c,v 1.23 2002/10/25 21:48:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -479,7 +479,7 @@ SeAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
|
|||
if (SepSidInToken(SubjectSecurityContext->ClientToken, Sid))
|
||||
{
|
||||
CurrentAccess = CurrentAccess |
|
||||
CurrentAce->Header.AccessMask;
|
||||
CurrentAce->AccessMask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: token.c,v 1.21 2002/09/08 10:23:43 chorns Exp $
|
||||
/* $Id: token.c,v 1.22 2002/10/25 21:48:00 chorns Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -1078,8 +1078,8 @@ SepCreateSystemProcessToken(struct _EPROCESS* Process)
|
|||
assert( i == 20 );
|
||||
|
||||
uSize = sizeof(ACL);
|
||||
uSize += sizeof(ACE_HEADER) + uLocalSystemLength;
|
||||
uSize += sizeof(ACE_HEADER) + uAdminsLength;
|
||||
uSize += sizeof(ACE) + uLocalSystemLength;
|
||||
uSize += sizeof(ACE) + uAdminsLength;
|
||||
uSize = (uSize & (~3)) + 8;
|
||||
AccessToken->DefaultDacl =
|
||||
(PACL) ExAllocatePoolWithTag(NonPagedPool,
|
||||
|
|
Loading…
Reference in a new issue