Author: akhaldi
Date: Sun Jun 7 09:57:36 2015
New Revision: 68058
URL:
http://svn.reactos.org/svn/reactos?rev=68058&view=rev
Log:
[XDK][PSDK][DDK] Share some Se types between winnt and ntifs/wdm. WIP.
Modified:
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/psdk/winnt.h
trunk/reactos/include/xdk/setypes.h
trunk/reactos/include/xdk/winnt_old.h
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=68…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Sun Jun 7 09:57:36 2015
@@ -30,6 +30,7 @@
extern "C" {
#endif
+
/* Dependencies */
#include <ntddk.h>
#include <excpt.h>
@@ -63,6 +64,7 @@
/******************************************************************************
* Security Manager Types *
******************************************************************************/
+
#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
#define SID_IDENTIFIER_AUTHORITY_DEFINED
typedef struct _SID_IDENTIFIER_AUTHORITY {
@@ -83,6 +85,7 @@
#endif
} SID, *PISID;
#endif
+
#define SID_REVISION 1
#define SID_MAX_SUB_AUTHORITIES 15
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=6805…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sun Jun 7 09:57:36 2015
@@ -75,6 +75,7 @@
#ifdef __cplusplus
extern "C" {
#endif
+
#if !defined(_NTHALDLL_) && !defined(_BLDR_)
#define NTHALAPI DECLSPEC_IMPORT
@@ -2514,8 +2515,11 @@
typedef PVOID PSECURITY_DESCRIPTOR;
typedef ULONG SECURITY_INFORMATION, *PSECURITY_INFORMATION;
typedef ULONG ACCESS_MASK, *PACCESS_MASK;
+
+
typedef PVOID PACCESS_TOKEN;
typedef PVOID PSID;
+
#define DELETE 0x00010000L
#define READ_CONTROL 0x00020000L
@@ -2594,6 +2598,7 @@
LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
} PRIVILEGE_SET,*PPRIVILEGE_SET;
+
typedef enum _SECURITY_IMPERSONATION_LEVEL {
SecurityAnonymous,
SecurityIdentification,
@@ -2601,6 +2606,7 @@
SecurityDelegation
} SECURITY_IMPERSONATION_LEVEL, * PSECURITY_IMPERSONATION_LEVEL;
+
#define SECURITY_MAX_IMPERSONATION_LEVEL SecurityDelegation
#define SECURITY_MIN_IMPERSONATION_LEVEL SecurityAnonymous
#define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation
@@ -2608,6 +2614,7 @@
#define SECURITY_DYNAMIC_TRACKING (TRUE)
#define SECURITY_STATIC_TRACKING (FALSE)
+
typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, *PSECURITY_CONTEXT_TRACKING_MODE;
@@ -2624,6 +2631,7 @@
BOOLEAN EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL Level;
} SE_IMPERSONATION_STATE, *PSE_IMPERSONATION_STATE;
+
#define OWNER_SECURITY_INFORMATION (0x00000001L)
#define GROUP_SECURITY_INFORMATION (0x00000002L)
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=6…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun Jun 7 09:57:36 2015
@@ -4462,43 +4462,60 @@
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES;
+/******************************************************************************
+ * Security Manager Types *
+ ******************************************************************************/
+
+typedef PVOID PACCESS_TOKEN;
+typedef PVOID PSID;
+
+
typedef enum _SECURITY_IMPERSONATION_LEVEL {
SecurityAnonymous,
SecurityIdentification,
SecurityImpersonation,
SecurityDelegation
-} SECURITY_IMPERSONATION_LEVEL,*PSECURITY_IMPERSONATION_LEVEL;
-
-typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,*PSECURITY_CONTEXT_TRACKING_MODE;
+} SECURITY_IMPERSONATION_LEVEL, * PSECURITY_IMPERSONATION_LEVEL;
+
+
+typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, *PSECURITY_CONTEXT_TRACKING_MODE;
typedef struct _SECURITY_QUALITY_OF_SERVICE {
DWORD Length;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
BOOLEAN EffectiveOnly;
-} SECURITY_QUALITY_OF_SERVICE,*PSECURITY_QUALITY_OF_SERVICE;
-
-typedef PVOID PACCESS_TOKEN;
+} SECURITY_QUALITY_OF_SERVICE, *PSECURITY_QUALITY_OF_SERVICE;
typedef struct _SE_IMPERSONATION_STATE {
PACCESS_TOKEN Token;
BOOLEAN CopyOnOpen;
BOOLEAN EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL Level;
-} SE_IMPERSONATION_STATE,*PSE_IMPERSONATION_STATE;
-
+} SE_IMPERSONATION_STATE, *PSE_IMPERSONATION_STATE;
+
+
+#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
+#define SID_IDENTIFIER_AUTHORITY_DEFINED
typedef struct _SID_IDENTIFIER_AUTHORITY {
BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
-
-typedef PVOID PSID;
-
+#endif
+
+#ifndef SID_DEFINED
+#define SID_DEFINED
typedef struct _SID {
BYTE Revision;
BYTE SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
+#ifdef MIDL_PASS
+ [size_is(SubAuthorityCount)] DWORD SubAuthority[*];
+#else
DWORD SubAuthority[ANYSIZE_ARRAY];
+#endif
} SID, *PISID;
+#endif
+
#define SECURITY_MIN_SID_SIZE (sizeof(SID))
#define SECURITY_MAX_SID_SIZE (FIELD_OFFSET(SID, SubAuthority) + SID_MAX_SUB_AUTHORITIES
* sizeof(DWORD))
Modified: trunk/reactos/include/xdk/setypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/setypes.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/setypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/setypes.h [iso-8859-1] Sun Jun 7 09:57:36 2015
@@ -7,8 +7,15 @@
typedef PVOID PSECURITY_DESCRIPTOR;
typedef ULONG SECURITY_INFORMATION, *PSECURITY_INFORMATION;
typedef ULONG ACCESS_MASK, *PACCESS_MASK;
+
+$endif (_WDMDDK_)
+$if (_WDMDDK_ || _WINNT_)
+
typedef PVOID PACCESS_TOKEN;
typedef PVOID PSID;
+
+$endif (_WDMDDK_ || _WINNT_)
+$if (_WDMDDK_)
#define DELETE 0x00010000L
#define READ_CONTROL 0x00020000L
@@ -87,6 +94,9 @@
LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
} PRIVILEGE_SET,*PPRIVILEGE_SET;
+$endif(_WDMDDK_)
+$if(_WDMDDK_ || _WINNT_)
+
typedef enum _SECURITY_IMPERSONATION_LEVEL {
SecurityAnonymous,
SecurityIdentification,
@@ -94,6 +104,9 @@
SecurityDelegation
} SECURITY_IMPERSONATION_LEVEL, * PSECURITY_IMPERSONATION_LEVEL;
+$endif (_WDMDDK_ || _WINNT_)
+$if (_WDMDDK_)
+
#define SECURITY_MAX_IMPERSONATION_LEVEL SecurityDelegation
#define SECURITY_MIN_IMPERSONATION_LEVEL SecurityAnonymous
#define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation
@@ -102,10 +115,13 @@
#define SECURITY_DYNAMIC_TRACKING (TRUE)
#define SECURITY_STATIC_TRACKING (FALSE)
+$endif (_WDMDDK_)
+$if (_WDMDDK_ || _WINNT_)
+
typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, *PSECURITY_CONTEXT_TRACKING_MODE;
typedef struct _SECURITY_QUALITY_OF_SERVICE {
- ULONG Length;
+ $ULONG Length;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
BOOLEAN EffectiveOnly;
@@ -117,6 +133,9 @@
BOOLEAN EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL Level;
} SE_IMPERSONATION_STATE, *PSE_IMPERSONATION_STATE;
+
+$endif (_WDMDDK_ || _WINNT_)
+$if (_WDMDDK_)
#define OWNER_SECURITY_INFORMATION (0x00000001L)
#define GROUP_SECURITY_INFORMATION (0x00000002L)
@@ -393,27 +412,31 @@
WinThisOrganizationCertificateSid = 82,
} WELL_KNOWN_SID_TYPE;
$endif (_NTDDK_)
-$if (_NTIFS_)
+$if (_NTIFS_ || _WINNT_)
+
#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
#define SID_IDENTIFIER_AUTHORITY_DEFINED
typedef struct _SID_IDENTIFIER_AUTHORITY {
- UCHAR Value[6];
+ $UCHAR Value[6];
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
#endif
#ifndef SID_DEFINED
#define SID_DEFINED
typedef struct _SID {
- UCHAR Revision;
- UCHAR SubAuthorityCount;
+ $UCHAR Revision;
+ $UCHAR SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
#ifdef MIDL_PASS
- [size_is(SubAuthorityCount)] ULONG SubAuthority[*];
+ [size_is(SubAuthorityCount)] $ULONG SubAuthority[*];
#else
- ULONG SubAuthority[ANYSIZE_ARRAY];
+ $ULONG SubAuthority[ANYSIZE_ARRAY];
#endif
} SID, *PISID;
#endif
+
+$endif (_NTIFS_ || _WINNT_)
+$if (_NTIFS_)
#define SID_REVISION 1
#define SID_MAX_SUB_AUTHORITIES 15
Modified: trunk/reactos/include/xdk/winnt_old.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/winnt_old.h?re…
==============================================================================
--- trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] Sun Jun 7 09:57:36 2015
@@ -2567,43 +2567,7 @@
BOOL bInheritHandle;
} SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES;
-typedef enum _SECURITY_IMPERSONATION_LEVEL {
- SecurityAnonymous,
- SecurityIdentification,
- SecurityImpersonation,
- SecurityDelegation
-} SECURITY_IMPERSONATION_LEVEL,*PSECURITY_IMPERSONATION_LEVEL;
-
-typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,*PSECURITY_CONTEXT_TRACKING_MODE;
-
-typedef struct _SECURITY_QUALITY_OF_SERVICE {
- DWORD Length;
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
- SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
- BOOLEAN EffectiveOnly;
-} SECURITY_QUALITY_OF_SERVICE,*PSECURITY_QUALITY_OF_SERVICE;
-
-typedef PVOID PACCESS_TOKEN;
-
-typedef struct _SE_IMPERSONATION_STATE {
- PACCESS_TOKEN Token;
- BOOLEAN CopyOnOpen;
- BOOLEAN EffectiveOnly;
- SECURITY_IMPERSONATION_LEVEL Level;
-} SE_IMPERSONATION_STATE,*PSE_IMPERSONATION_STATE;
-
-typedef struct _SID_IDENTIFIER_AUTHORITY {
- BYTE Value[6];
-} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
-
-typedef PVOID PSID;
-
-typedef struct _SID {
- BYTE Revision;
- BYTE SubAuthorityCount;
- SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
- DWORD SubAuthority[ANYSIZE_ARRAY];
-} SID, *PISID;
+$include(setypes.h)
#define SECURITY_MIN_SID_SIZE (sizeof(SID))
#define SECURITY_MAX_SID_SIZE (FIELD_OFFSET(SID, SubAuthority) + SID_MAX_SUB_AUTHORITIES
* sizeof(DWORD))