Move non-DDK Se* function prototypes and types from ROS DDK to NTOS
headers.
Modified: trunk/reactos/include/ddk/sefuncs.h
Modified: trunk/reactos/include/ddk/setypes.h
Modified: trunk/reactos/include/ntos/security.h
Added: trunk/reactos/include/ntos/sefuncs.h
Added: trunk/reactos/include/ntos/setypes.h
Modified: trunk/reactos/include/ntos.h
_____
Modified: trunk/reactos/include/ddk/sefuncs.h
--- trunk/reactos/include/ddk/sefuncs.h 2005-06-18 15:58:39 UTC (rev
16047)
+++ trunk/reactos/include/ddk/sefuncs.h 2005-06-18 16:21:46 UTC (rev
16048)
@@ -96,37 +96,9 @@
IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext
);
-NTSTATUS
-STDCALL
-SeCaptureSecurityDescriptor(
- IN PSECURITY_DESCRIPTOR OriginalSecurityDescriptor,
- IN KPROCESSOR_MODE CurrentMode,
- IN POOL_TYPE PoolType,
- IN BOOLEAN CaptureIfKernel,
- OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor
- );
-
-
VOID STDCALL
SeCaptureSubjectContext(OUT PSECURITY_SUBJECT_CONTEXT SubjectContext);
-VOID
-STDCALL
-SeCloseObjectAuditAlarm(
- IN PVOID Object,
- IN HANDLE Handle,
- IN BOOLEAN PerformAction
- );
-
-NTSTATUS
-STDCALL
-SeCreateAccessState(
- PACCESS_STATE AccessState,
- PAUX_DATA AuxData,
- ACCESS_MASK Access,
- PGENERIC_MAPPING GenericMapping
- );
-
NTSTATUS STDCALL
SeCreateClientSecurity(IN struct _ETHREAD *Thread,
IN PSECURITY_QUALITY_OF_SERVICE Qos,
@@ -146,9 +118,6 @@
SeDeassignSecurity(IN OUT PSECURITY_DESCRIPTOR* SecurityDescriptor);
VOID STDCALL
-SeDeleteAccessState(IN PACCESS_STATE AccessState);
-
-VOID STDCALL
SeDeleteObjectAuditAlarm(IN PVOID Object,
IN HANDLE Handle);
@@ -211,17 +180,6 @@
IN PSECURITY_SUBJECT_CONTEXT SubjectContext,
IN KPROCESSOR_MODE AccessMode);
-VOID
-STDCALL
-SePrivilegeObjectAuditAlarm(
- IN HANDLE Handle,
- IN PSECURITY_SUBJECT_CONTEXT SubjectContext,
- IN ACCESS_MASK DesiredAccess,
- IN PPRIVILEGE_SET Privileges,
- IN BOOLEAN AccessGranted,
- IN KPROCESSOR_MODE CurrentMode
- );
-
NTSTATUS STDCALL
SeQueryAuthenticationIdToken(IN PACCESS_TOKEN Token,
OUT PLUID LogonId);
@@ -251,14 +209,6 @@
NTSTATUS STDCALL
SeRegisterLogonSessionTerminatedRoutine(IN
PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine);
-NTSTATUS
-STDCALL
-SeReleaseSecurityDescriptor(
- IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor,
- IN KPROCESSOR_MODE CurrentMode,
- IN BOOLEAN CaptureIfKernelMode
- );
-
VOID STDCALL
SeReleaseSubjectContext(IN PSECURITY_SUBJECT_CONTEXT SubjectContext);
@@ -290,9 +240,6 @@
SeSinglePrivilegeCheck(IN LUID PrivilegeValue,
IN KPROCESSOR_MODE PreviousMode);
-SECURITY_IMPERSONATION_LEVEL STDCALL
-SeTokenImpersonationLevel(IN PACCESS_TOKEN Token);
-
BOOLEAN
STDCALL
SeTokenIsAdmin(
@@ -305,12 +252,6 @@
IN PACCESS_TOKEN Token
);
-BOOLEAN
-STDCALL
-SeTokenIsWriteRestricted(
- IN PACCESS_TOKEN Token
- );
-
TOKEN_TYPE STDCALL
SeTokenType(IN PACCESS_TOKEN Token);
_____
Modified: trunk/reactos/include/ddk/setypes.h
--- trunk/reactos/include/ddk/setypes.h 2005-06-18 15:58:39 UTC (rev
16047)
+++ trunk/reactos/include/ddk/setypes.h 2005-06-18 16:21:46 UTC (rev
16048)
@@ -14,13 +14,6 @@
#include <ntos/security.h>
-/* TOKEN_GROUPS structure */
-#define SE_GROUP_MANDATORY (0x1L)
-#define SE_GROUP_ENABLED_BY_DEFAULT (0x2L)
-#define SE_GROUP_ENABLED (0x4L)
-#define SE_GROUP_OWNER (0x8L)
-#define SE_GROUP_LOGON_ID (0xC0000000L)
-
/* ACL Defines */
#define ACL_REVISION1 (1)
#define ACL_REVISION2 (2)
@@ -72,65 +65,6 @@
#define SID_REVISION (1)
#define SID_MAX_SUB_AUTHORITIES (15)
-typedef struct _SEP_AUDIT_POLICY_CATEGORIES {
- UCHAR System:4;
- UCHAR Logon:4;
- UCHAR ObjectAccess:4;
- UCHAR PrivilegeUse:4;
- UCHAR DetailedTracking:4;
- UCHAR PolicyChange:4;
- UCHAR AccountManagement:4;
- UCHAR DirectoryServiceAccess:4;
- UCHAR AccountLogon:4;
-} SEP_AUDIT_POLICY_CATEGORIES, *PSEP_AUDIT_POLICY_CATEGORIES;
-
-typedef struct _SEP_AUDIT_POLICY_OVERLAY {
- ULONGLONG PolicyBits:36;
- UCHAR SetBit:1;
-} SEP_AUDIT_POLICY_OVERLAY, *PSEP_AUDIT_POLICY_OVERLAY;
-
-typedef struct _SEP_AUDIT_POLICY {
- union {
- SEP_AUDIT_POLICY_CATEGORIES PolicyElements;
- SEP_AUDIT_POLICY_OVERLAY PolicyOverlay;
- ULONGLONG Overlay;
- };
-} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY;
-
-#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01
-typedef struct _TOKEN {
- TOKEN_SOURCE TokenSource; /* 0x00 */
- LUID TokenId; /* 0x10 */
- LUID AuthenticationId; /* 0x18 */
- LUID ParentTokenId; /* 0x20 */
- LARGE_INTEGER ExpirationTime; /* 0x28 */
- struct _ERESOURCE *TokenLock; /* 0x30 */
- SEP_AUDIT_POLICY AuditPolicy; /* 0x38 */
- LUID ModifiedId; /* 0x40 */
- ULONG SessionId; /* 0x48 */
- ULONG UserAndGroupCount; /* 0x4C */
- ULONG RestrictedSidCount; /* 0x50 */
- ULONG PrivilegeCount; /* 0x54 */
- ULONG VariableLength; /* 0x58 */
- ULONG DynamicCharged; /* 0x5C */
- ULONG DynamicAvailable; /* 0x60 */
- ULONG DefaultOwnerIndex; /* 0x64 */
- PSID_AND_ATTRIBUTES UserAndGroups; /* 0x68 */
- PSID_AND_ATTRIBUTES RestrictedSids; /* 0x6C */
- PSID PrimaryGroup; /* 0x70 */
- PLUID_AND_ATTRIBUTES Privileges; /* 0x74 */
- PULONG DynamicPart; /* 0x78 */
- PACL DefaultDacl; /* 0x7C */
- TOKEN_TYPE TokenType; /* 0x80 */
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; /* 0x84 */
- ULONG TokenFlags; /* 0x88 */
- BOOLEAN TokenInUse; /* 0x8C */
- PVOID ProxyData; /* 0x90 */
- PVOID AuditData; /* 0x94 */
- LUID OriginatingLogonSession; /* 0x98 */
- ULONG VariablePart; /* 0xA0 */
-} TOKEN, *PTOKEN;
-
typedef PVOID PACCESS_TOKEN;
typedef struct _SECURITY_SUBJECT_CONTEXT
@@ -223,13 +157,6 @@
AssignSecurityDescriptor
} SECURITY_OPERATION_CODE, *PSECURITY_OPERATION_CODE;
-typedef struct _AUX_DATA
-{
- PPRIVILEGE_SET PrivilegeSet;
- GENERIC_MAPPING GenericMapping;
- ULONG Reserved;
-} AUX_DATA, *PAUX_DATA;
-
typedef struct _ACCESS_STATE
{
LUID OperationID;
_____
Modified: trunk/reactos/include/ntos/security.h
--- trunk/reactos/include/ntos/security.h 2005-06-18 15:58:39 UTC
(rev 16047)
+++ trunk/reactos/include/ntos/security.h 2005-06-18 16:21:46 UTC
(rev 16048)
@@ -32,6 +32,15 @@
#define SE_REMOTE_SHUTDOWN_PRIVILEGE (24L)
#define SE_MAX_WELL_KNOWN_PRIVILEGE
SE_REMOTE_SHUTDOWN_PRIVILEGE
+/* TOKEN_GROUPS structure */
+#ifndef SE_GROUP_MANDATORY
+#define SE_GROUP_MANDATORY (0x1L)
+#define SE_GROUP_ENABLED_BY_DEFAULT (0x2L)
+#define SE_GROUP_ENABLED (0x4L)
+#define SE_GROUP_OWNER (0x8L)
+#define SE_GROUP_LOGON_ID (0xC0000000L)
+#endif
+
#if 0
/* Security descriptor control. */
#define SECURITY_DESCRIPTOR_REVISION (1)
_____
Added: trunk/reactos/include/ntos/sefuncs.h
--- trunk/reactos/include/ntos/sefuncs.h 2005-06-18 15:58:39 UTC
(rev 16047)
+++ trunk/reactos/include/ntos/sefuncs.h 2005-06-18 16:21:46 UTC
(rev 16048)
@@ -0,0 +1,63 @@
+#ifndef _INCLUDE_NTOS_SEFUNCS_H
+#define _INCLUDE_NTOS_SEFUNCS_H
+
+NTSTATUS
+STDCALL
+SeCaptureSecurityDescriptor(
+ IN PSECURITY_DESCRIPTOR OriginalSecurityDescriptor,
+ IN KPROCESSOR_MODE CurrentMode,
+ IN POOL_TYPE PoolType,
+ IN BOOLEAN CaptureIfKernel,
+ OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor
+ );
+
+VOID
+STDCALL
+SeCloseObjectAuditAlarm(
+ IN PVOID Object,
+ IN HANDLE Handle,
+ IN BOOLEAN PerformAction
+ );
+
+NTSTATUS
+STDCALL
+SeCreateAccessState(
+ PACCESS_STATE AccessState,
+ PAUX_DATA AuxData,
+ ACCESS_MASK Access,
+ PGENERIC_MAPPING GenericMapping
+ );
+
+VOID STDCALL
+SeDeleteAccessState(IN PACCESS_STATE AccessState);
+
+VOID
+STDCALL
+SePrivilegeObjectAuditAlarm(
+ IN HANDLE Handle,
+ IN PSECURITY_SUBJECT_CONTEXT SubjectContext,
+ IN ACCESS_MASK DesiredAccess,
+ IN PPRIVILEGE_SET Privileges,
+ IN BOOLEAN AccessGranted,
+ IN KPROCESSOR_MODE CurrentMode
+ );
+
+NTSTATUS
+STDCALL
+SeReleaseSecurityDescriptor(
+ IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor,
+ IN KPROCESSOR_MODE CurrentMode,
+ IN BOOLEAN CaptureIfKernelMode
+ );
+
+SECURITY_IMPERSONATION_LEVEL STDCALL
+SeTokenImpersonationLevel(IN PACCESS_TOKEN Token);
+
+BOOLEAN
+STDCALL
+SeTokenIsWriteRestricted(
+ IN PACCESS_TOKEN Token
+ );
+
+#endif /* _INCLUDE_NTOS_SEFUNCS_H */
+
_____
Added: trunk/reactos/include/ntos/setypes.h
--- trunk/reactos/include/ntos/setypes.h 2005-06-18 15:58:39 UTC
(rev 16047)
+++ trunk/reactos/include/ntos/setypes.h 2005-06-18 16:21:46 UTC
(rev 16048)
@@ -0,0 +1,70 @@
+#ifndef __INCLUDE_NTOS_SETYPES_H
+#define __INCLUDE_NTOS_SETYPES_H
+
+typedef struct _SEP_AUDIT_POLICY_CATEGORIES {
+ UCHAR System:4;
+ UCHAR Logon:4;
+ UCHAR ObjectAccess:4;
+ UCHAR PrivilegeUse:4;
+ UCHAR DetailedTracking:4;
+ UCHAR PolicyChange:4;
+ UCHAR AccountManagement:4;
+ UCHAR DirectoryServiceAccess:4;
+ UCHAR AccountLogon:4;
+} SEP_AUDIT_POLICY_CATEGORIES, *PSEP_AUDIT_POLICY_CATEGORIES;
+
+typedef struct _SEP_AUDIT_POLICY_OVERLAY {
+ ULONGLONG PolicyBits:36;
+ UCHAR SetBit:1;
+} SEP_AUDIT_POLICY_OVERLAY, *PSEP_AUDIT_POLICY_OVERLAY;
+
+typedef struct _SEP_AUDIT_POLICY {
+ union {
+ SEP_AUDIT_POLICY_CATEGORIES PolicyElements;
+ SEP_AUDIT_POLICY_OVERLAY PolicyOverlay;
+ ULONGLONG Overlay;
+ };
+} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY;
+
+#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01
+typedef struct _TOKEN {
+ TOKEN_SOURCE TokenSource; /* 0x00 */
+ LUID TokenId; /* 0x10 */
+ LUID AuthenticationId; /* 0x18 */
+ LUID ParentTokenId; /* 0x20 */
+ LARGE_INTEGER ExpirationTime; /* 0x28 */
+ struct _ERESOURCE *TokenLock; /* 0x30 */
+ SEP_AUDIT_POLICY AuditPolicy; /* 0x38 */
+ LUID ModifiedId; /* 0x40 */
+ ULONG SessionId; /* 0x48 */
+ ULONG UserAndGroupCount; /* 0x4C */
+ ULONG RestrictedSidCount; /* 0x50 */
+ ULONG PrivilegeCount; /* 0x54 */
+ ULONG VariableLength; /* 0x58 */
+ ULONG DynamicCharged; /* 0x5C */
+ ULONG DynamicAvailable; /* 0x60 */
+ ULONG DefaultOwnerIndex; /* 0x64 */
+ PSID_AND_ATTRIBUTES UserAndGroups; /* 0x68 */
+ PSID_AND_ATTRIBUTES RestrictedSids; /* 0x6C */
+ PSID PrimaryGroup; /* 0x70 */
+ PLUID_AND_ATTRIBUTES Privileges; /* 0x74 */
+ PULONG DynamicPart; /* 0x78 */
+ PACL DefaultDacl; /* 0x7C */
+ TOKEN_TYPE TokenType; /* 0x80 */
+ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; /* 0x84 */
+ ULONG TokenFlags; /* 0x88 */
+ BOOLEAN TokenInUse; /* 0x8C */
+ PVOID ProxyData; /* 0x90 */
+ PVOID AuditData; /* 0x94 */
+ LUID OriginatingLogonSession; /* 0x98 */
+ ULONG VariablePart; /* 0xA0 */
+} TOKEN, *PTOKEN;
+
+typedef struct _AUX_DATA
+{
+ PPRIVILEGE_SET PrivilegeSet;
+ GENERIC_MAPPING GenericMapping;
+ ULONG Reserved;
+} AUX_DATA, *PAUX_DATA;
+
+#endif /* __INCLUDE_NTOS_SETYPES_H */
_____
Modified: trunk/reactos/include/ntos.h
--- trunk/reactos/include/ntos.h 2005-06-18 15:58:39 UTC (rev
16047)
+++ trunk/reactos/include/ntos.h 2005-06-18 16:21:46 UTC (rev
16048)
@@ -88,6 +88,8 @@
#include "ntos/kefuncs.h" /* AG */
#include "ntos/fstypes.h" /* AG */
#include "ntos/obtypes.h"
+#include "ntos/setypes.h"
+#include "ntos/sefuncs.h"
#include "ntos/tss.h"
#include "rosrtl/thread.h"
#endif