https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7692c10527a18a34fa282…
commit 7692c10527a18a34fa282905a361aa5ed26094f6
Author: George Bișoc <george.bisoc(a)reactos.org>
AuthorDate: Sat Jul 24 12:21:28 2021 +0200
Commit: George Bișoc <george.bisoc(a)reactos.org>
CommitDate: Sat Jul 31 16:10:50 2021 +0200
[NTOS:SE] Unify all the SRM tags in one place
And rename SEP_LOGON_SESSION_TAG and SEP_LOGON_NOTIFICATION_TAG to TAG_LOGON_SESSION
and TAG_LOGON_NOTIFICATION respectively.
---
ntoskrnl/include/internal/tag.h | 31 ++++++++++++++++---------------
ntoskrnl/se/sid.c | 2 --
ntoskrnl/se/srm.c | 13 +++++--------
3 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/ntoskrnl/include/internal/tag.h b/ntoskrnl/include/internal/tag.h
index 804a1a93dea..b92b4e99edf 100644
--- a/ntoskrnl/include/internal/tag.h
+++ b/ntoskrnl/include/internal/tag.h
@@ -170,26 +170,27 @@
#define TAG_HDTB 'BTDH'
/* Security Manager Tags */
-#define TAG_SE ' eS'
-#define TAG_ACL 'cAeS'
-#define TAG_SID 'iSeS'
-#define TAG_SD 'dSeS'
-#define TAG_QOS 'sQeS'
-#define TAG_LUID 'uLeS'
-#define TAG_PRIVILEGE_SET 'rPeS'
-#define TAG_TOKEN_DYNAMIC 'dTeS'
-#define TAG_SE_HANDLES_TAB 'aHeS'
-#define TAG_SE_DIR_BUFFER 'bDeS'
-#define TAG_SE_PROXY_DATA 'dPoT'
-#define TAG_SE_TOKEN_LOCK 'lTeS'
+#define TAG_SE ' eS'
+#define TAG_ACL 'cAeS'
+#define TAG_SID 'iSeS'
+#define TAG_SD 'dSeS'
+#define TAG_QOS 'sQeS'
+#define TAG_LUID 'uLeS'
+#define TAG_SEPA 'aPeS'
+#define TAG_PRIVILEGE_SET 'rPeS'
+#define TAG_TOKEN_DYNAMIC 'dTeS'
+#define TAG_SE_HANDLES_TAB 'aHeS'
+#define TAG_SE_DIR_BUFFER 'bDeS'
+#define TAG_SE_PROXY_DATA 'dPoT'
+#define TAG_SE_TOKEN_LOCK 'lTeS'
+#define TAG_LOGON_SESSION 'sLeS'
+#define TAG_LOGON_NOTIFICATION 'nLeS'
+#define TAG_SID_AND_ATTRIBUTES 'aSeS'
/* LPC Tags */
#define TAG_LPC_MESSAGE 'McpL'
#define TAG_LPC_ZONE 'ZcpL'
-/* Se Process Audit */
-#define TAG_SEPA 'aPeS'
-
#define TAG_WAIT 'tiaW'
#define TAG_SEC_QUERY 'qSbO'
diff --git a/ntoskrnl/se/sid.c b/ntoskrnl/se/sid.c
index cf00fba7a3a..24a7a9b526e 100644
--- a/ntoskrnl/se/sid.c
+++ b/ntoskrnl/se/sid.c
@@ -13,8 +13,6 @@
#define NDEBUG
#include <debug.h>
-#define TAG_SID_AND_ATTRIBUTES 'aSeS'
-
/* GLOBALS ********************************************************************/
SID_IDENTIFIER_AUTHORITY SeNullSidAuthority = {SECURITY_NULL_SID_AUTHORITY};
diff --git a/ntoskrnl/se/srm.c b/ntoskrnl/se/srm.c
index fab71aa41d9..23fa3b02120 100644
--- a/ntoskrnl/se/srm.c
+++ b/ntoskrnl/se/srm.c
@@ -19,9 +19,6 @@ extern LUID SeAnonymousAuthenticationId;
/* PRIVATE DEFINITIONS ********************************************************/
-#define SEP_LOGON_SESSION_TAG 'sLeS'
-#define SEP_LOGON_NOTIFICATION_TAG 'nLeS'
-
typedef struct _SEP_LOGON_SESSION_TERMINATED_NOTIFICATION
{
struct _SEP_LOGON_SESSION_TERMINATED_NOTIFICATION *Next;
@@ -334,7 +331,7 @@ SepRmCreateLogonSession(
/* Allocate a new session structure */
NewSession = ExAllocatePoolWithTag(PagedPool,
sizeof(SEP_LOGON_SESSION_REFERENCES),
- SEP_LOGON_SESSION_TAG);
+ TAG_LOGON_SESSION);
if (NewSession == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
@@ -375,7 +372,7 @@ Leave:
if (!NT_SUCCESS(Status))
{
- ExFreePoolWithTag(NewSession, SEP_LOGON_SESSION_TAG);
+ ExFreePoolWithTag(NewSession, TAG_LOGON_SESSION);
}
return Status;
@@ -482,7 +479,7 @@ SepRmDeleteLogonSession(
/* If we're here then we've deleted the logon session successfully */
DPRINT("SepRmDeleteLogonSession(): Logon session deleted with
success!\n");
Status = STATUS_SUCCESS;
- ExFreePoolWithTag(SessionToDelete, SEP_LOGON_SESSION_TAG);
+ ExFreePoolWithTag(SessionToDelete, TAG_LOGON_SESSION);
Leave:
/* Release the database lock */
@@ -1307,7 +1304,7 @@ SeRegisterLogonSessionTerminatedRoutine(
/* Allocate a new notification item */
Notification = ExAllocatePoolWithTag(PagedPool,
sizeof(SEP_LOGON_SESSION_TERMINATED_NOTIFICATION),
- SEP_LOGON_NOTIFICATION_TAG);
+ TAG_LOGON_NOTIFICATION);
if (Notification == NULL)
return STATUS_INSUFFICIENT_RESOURCES;
@@ -1373,7 +1370,7 @@ SeUnregisterLogonSessionTerminatedRoutine(
/* Free the current notification item */
ExFreePoolWithTag(Current,
- SEP_LOGON_NOTIFICATION_TAG);
+ TAG_LOGON_NOTIFICATION);
Status = STATUS_SUCCESS;
}