From 25460572ab90c9028c1225a4570c343ce89b6435 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath
Date: Tue, 27 Apr 2021 01:55:20 +0530
Subject: [PATCH] headers: Add missing names in ntsecapi.h
Signed-off-by: Biswapriyo Nath
---
mingw-w64-headers/include/ntsecapi.h | 185 +++
1 file changed, 161 insertions(+), 24 deletions(-)
diff --git a/mingw-w64-headers/include/ntsecapi.h
b/mingw-w64-headers/include/ntsecapi.h
index 99fd3cb..2d4f141 100644
--- a/mingw-w64-headers/include/ntsecapi.h
+++ b/mingw-w64-headers/include/ntsecapi.h
@@ -26,9 +26,25 @@ extern "C" {
#ifndef _NTLSA_IFS_
typedef enum _SECURITY_LOGON_TYPE {
-Interactive =
2,Network,Batch,Service,Proxy,Unlock,NetworkCleartext,NewCredentials,RemoteInteractive,CachedInteractive,
-CachedRemoteInteractive,CachedUnlock
- } SECURITY_LOGON_TYPE,*PSECURITY_LOGON_TYPE;
+UndefinedLogonType = 0,
+Interactive = 2,
+Network,
+Batch,
+Service,
+Proxy,
+Unlock,
+NetworkCleartext,
+NewCredentials
+#if _WIN32_WINNT >= 0x0501
+,RemoteInteractive
+,CachedInteractive
+#endif
+#if _WIN32_WINNT >= 0x0502
+,CachedRemoteInteractive
+,CachedUnlock
+#endif
+ } SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE;
+
#endif
#ifndef _NTLSA_IFS_
@@ -36,12 +52,44 @@ extern "C" {
#ifndef _NTLSA_AUDIT_
#define _NTLSA_AUDIT_
- typedef enum _SE_ADT_PARAMETER_TYPE {
-SeAdtParmTypeNone =
0,SeAdtParmTypeString,SeAdtParmTypeFileSpec,SeAdtParmTypeUlong,SeAdtParmTypeSid,SeAdtParmTypeLogonId,
-
SeAdtParmTypeNoLogonId,SeAdtParmTypeAccessMask,SeAdtParmTypePrivs,SeAdtParmTypeObjectTypes,SeAdtParmTypeHexUlong,SeAdtParmTypePtr,
-
SeAdtParmTypeTime,SeAdtParmTypeGuid,SeAdtParmTypeLuid,SeAdtParmTypeHexInt64,SeAdtParmTypeStringList,SeAdtParmTypeSidList,
-
SeAdtParmTypeDuration,SeAdtParmTypeUserAccountControl,SeAdtParmTypeNoUac,SeAdtParmTypeMessage,SeAdtParmTypeDateTime,SeAdtParmTypeSockAddr
- } SE_ADT_PARAMETER_TYPE,*PSE_ADT_PARAMETER_TYPE;
+typedef enum _SE_ADT_PARAMETER_TYPE {
+SeAdtParmTypeNone = 0,
+SeAdtParmTypeString,
+SeAdtParmTypeFileSpec,
+SeAdtParmTypeUlong,
+SeAdtParmTypeSid,
+SeAdtParmTypeLogonId,
+SeAdtParmTypeNoLogonId,
+SeAdtParmTypeAccessMask,
+SeAdtParmTypePrivs,
+SeAdtParmTypeObjectTypes,
+SeAdtParmTypeHexUlong,
+SeAdtParmTypePtr,
+SeAdtParmTypeTime,
+SeAdtParmTypeGuid,
+SeAdtParmTypeLuid,
+SeAdtParmTypeHexInt64,
+SeAdtParmTypeStringList,
+SeAdtParmTypeSidList,
+SeAdtParmTypeDuration,
+SeAdtParmTypeUserAccountControl,
+SeAdtParmTypeNoUac,
+SeAdtParmTypeMessage,
+SeAdtParmTypeDateTime,
+SeAdtParmTypeSockAddr,
+SeAdtParmTypeSD,
+SeAdtParmTypeLogonHours,
+SeAdtParmTypeLogonIdNoSid,
+SeAdtParmTypeUlongNoConv,
+SeAdtParmTypeSockAddrNoPort,
+SeAdtParmTypeAccessReason,
+SeAdtParmTypeStagingReason,
+SeAdtParmTypeResourceAttribute,
+SeAdtParmTypeClaims,
+SeAdtParmTypeLogonIdAsSid,
+SeAdtParmTypeMultiSzString,
+SeAdtParmTypeLogonIdEx
+ } SE_ADT_PARAMETER_TYPE, *PSE_ADT_PARAMETER_TYPE;
#include
@@ -61,6 +109,19 @@ extern "C" {
PVOID Address;
} SE_ADT_PARAMETER_ARRAY_ENTRY,*PSE_ADT_PARAMETER_ARRAY_ENTRY;
+ typedef struct _SE_ADT_ACCESS_REASON {
+ACCESS_MASK AccessMask;
+ULONG AccessReasons[32];
+ULONG ObjectTypeIndex;
+ULONG AccessGranted;
+PSECURITY_DESCRIPTOR SecurityDescriptor;
+ } SE_ADT_ACCESS_REASON, *PSE_ADT_ACCESS_REASON;
+
+ typedef struct _SE_ADT_CLAIMS {
+ULONG Length;
+PCLAIMS_BLOB Claims;
+ } SE_ADT_CLAIMS, *PSE_ADT_CLAIMS;
+
#define SE_MAX_AUDIT_PARAMETERS 32
#define SE_MAX_GENERIC_AUDIT_PARAMETERS 28
@@ -71,12 +132,31 @@ extern "C" {
ULONG Length;
USHORT Type;
ULONG Flags;
-SE_ADT_PARAMETER_ARRAY_ENTRY Parameters[SE_MAX_AUDIT_PARAMETERS ];
+SE_ADT_PARAMETER_ARRAY_ENTRY Parameters[SE_MAX_AUDIT_PARAMETERS];
} SE_ADT_PARAMETER_ARRAY,*PSE_ADT_PARAMETER_ARRAY;
+ typedef struct _SE_ADT_PARAMETER_ARRAY_EX {
+ULONG CategoryId;
+ULONG AuditId;
+ULONG Version;
+ULONG ParameterCount;
+ULONG Length;
+USHORT FlatSubCategoryId;
+USHORT Type;
+ULONG Flags;
+SE_ADT_PARAMETER_ARRAY_ENTRY Parameters[SE_MAX_AUDIT_PARAMETERS];
+ } SE_ADT_PARAMETER_ARRAY_EX, *PSE_ADT_PARAMETER_ARRAY_EX;
+
#define SE_ADT_PARAMETERS_SELF_RELATIVE 0x0001
-#endif
-#endif
+#define SE_ADT_PARAMETERS_SEND_TO_LSA 0x0002
+#define SE_ADT_PARAMETER_EXTENSIBLE_AUDIT 0x0004
+#define SE_ADT_PARAMETER_GENERIC_AUDIT 0x0008
+#define SE_ADT_PARAMETER_WRITE_SYNCHRONOUS 0x0010
+
+#define LSAP_SE_ADT_PARAMETER_ARRAY_TRUE_SIZE(AuditParameters)
(sizeof(SE_ADT_PARAMETER_ARRAY) - sizeof(SE_ADT_PARAMETER_ARRAY_ENTRY) *
(SE_MAX_AUDIT_PARAMETERS - AuditParameters->ParameterCount))
+
+#endif /* _NTLSA_AUDIT_ */
+#endif /* _NTLSA_IFS_ */
typedef enum _POLICY_AUDIT_EVENT_TYPE {
AuditCategorySystem =
0,AuditCategoryLogon,AuditCategoryObjectAccess,A