ReactOS  0.4.14-dev-49-gfb4591c
sefuncs.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Security Manager Functions *
3  ******************************************************************************/
4 
5 #if (NTDDI_VERSION >= NTDDI_WIN2K)
10 NTAPI
22 
26 NTAPI
27 SeAssignSecurity(
28  _In_opt_ PSECURITY_DESCRIPTOR ParentDescriptor,
35 
38 NTAPI
40  _In_opt_ PSECURITY_DESCRIPTOR ParentDescriptor,
45  _In_ ULONG AutoInheritFlags,
49 
53 NTAPI
54 SeDeassignSecurity(
56 
59 BOOLEAN
60 NTAPI
64 
66 ULONG
67 NTAPI
70 
72 VOID
73 NTAPI
76 
78 VOID
79 NTAPI
82 
84 VOID
85 NTAPI
88 
90 VOID
91 NTAPI
95 
96 $if (_NTDDK_)
99 BOOLEAN
100 NTAPI
102  _In_ LUID PrivilegeValue,
104 $endif (_NTDDK_)
105 $if (_NTIFS_)
106 
108 VOID
109 NTAPI
112 
114 BOOLEAN
115 NTAPI
117  _Inout_ PPRIVILEGE_SET RequiredPrivileges,
120 
122 VOID
123 NTAPI
134 
136 VOID
137 NTAPI
148 
150 VOID
151 NTAPI
153  _In_ PVOID Object,
154  _In_ HANDLE Handle);
155 
158 NTAPI
161 
163 BOOLEAN
164 NTAPI
167 
169 BOOLEAN
170 NTAPI
173 
175 NTSTATUS
176 NTAPI
179  _Out_ PLUID AuthenticationId);
180 
182 NTSTATUS
183 NTAPI
187 
189 NTSTATUS
190 NTAPI
193  _In_ PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos,
194  _In_ BOOLEAN RemoteSession,
196 
198 VOID
199 NTAPI
203 
205 NTSTATUS
206 NTAPI
210 
212 NTSTATUS
213 NTAPI
216  _In_ PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos,
217  _In_ BOOLEAN ServerIsRemote,
219 
221 NTSTATUS
222 NTAPI
227  _Inout_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor);
228 
230 NTSTATUS
231 NTAPI
236  _Inout_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
239 
241 NTSTATUS
242 NTAPI
246  _In_ PSECURITY_DESCRIPTOR ModificationDescriptor,
247  _Inout_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
248  _In_ ULONG AutoInheritFlags,
251 
253 NTSTATUS
254 NTAPI
258 
260 BOOLEAN
261 NTAPI
265 
267 BOOLEAN
268 NTAPI
273 
274 VOID
275 NTAPI
279 
281 NTSTATUS
282 NTAPI
285 
287 NTSTATUS
288 NTAPI
291 
293 NTSTATUS
294 NTAPI
296  _In_ PLUID LogonId);
297 
299 NTSTATUS
300 NTAPI
304  _Outptr_result_buffer_(_Inexpressible_(token-dependent)) PVOID *TokenInformation);
305 $endif (_NTIFS_)
306 
307 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
308 $if (_NTIFS_)
309 #if (NTDDI_VERSION >= NTDDI_WIN2KSP3)
311 BOOLEAN
312 NTAPI
316 #endif
317 
318 #if (NTDDI_VERSION >= NTDDI_WINXP)
319 
321 NTSTATUS
322 NTAPI
324  _In_ PACCESS_TOKEN ExistingToken,
325  _In_ ULONG Flags,
326  _In_opt_ PTOKEN_GROUPS SidsToDisable,
327  _In_opt_ PTOKEN_PRIVILEGES PrivilegesToDelete,
328  _In_opt_ PTOKEN_GROUPS RestrictedSids,
329  _Outptr_ PACCESS_TOKEN *FilteredToken);
330 
332 VOID
333 NTAPI
336  _In_ PUNICODE_STRING LinkName,
338 
339 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
340 
341 #if (NTDDI_VERSION >= NTDDI_WINXPSP2)
342 
344 BOOLEAN
345 NTAPI
350 
352 BOOLEAN
353 NTAPI
358 
359 #endif
360 $endif (_NTIFS_)
361 
362 $if (_WDMDDK_)
363 #if (NTDDI_VERSION >= NTDDI_WS03SP1)
364 
365 _At_(AuditParameters->ParameterCount, _Const_)
366 NTSTATUS
367 NTAPI
369  _Inout_ PSE_ADT_PARAMETER_ARRAY AuditParameters,
372  _In_reads_(_Inexpressible_("depends on SE_ADT_PARAMETER_TYPE"))
373  PVOID Data);
374 
375 NTSTATUS
376 NTAPI
378  _In_ ULONG Flags,
380  _In_opt_ PSID UserSid,
381  _In_ PSE_ADT_PARAMETER_ARRAY AuditParameters);
382 
383 #endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */
385 
386 $if (_WDMDDK_ || _NTIFS_)
387 #if (NTDDI_VERSION >= NTDDI_VISTA)
389 $if (_WDMDDK_)
391 ULONG
392 NTAPI
393 SeComputeAutoInheritByObjectType(
397 
398 #ifdef SE_NTFS_WORLD_CACHE
399 VOID
400 NTAPI
401 SeGetWorldRights(
405 #endif /* SE_NTFS_WORLD_CACHE */
407 $if (_NTIFS_)
408 
410 VOID
411 NTAPI
412 SeOpenObjectAuditAlarmWithTransaction(
423 
425 VOID
426 NTAPI
438 
440 VOID
441 NTAPI
443  _In_ PACL Sacl,
447  _Out_ PBOOLEAN GenerateAudit,
448  _Out_ PBOOLEAN GenerateAlarm);
449 
451 VOID
452 NTAPI
454  _In_ PVOID Object,
457 
459 VOID
460 NTAPI
463  _Inout_ PSID_AND_ATTRIBUTES IntegritySA);
464 
466 NTSTATUS
467 NTAPI
471 
473 VOID
474 NTAPI
477  _In_ PUNICODE_STRING LinkName,
480 
482 VOID
483 NTAPI
486  _In_ GUID *ResourceManagerId,
487  _In_ ULONG NewTransactionState);
488 $endif (_NTIFS_)
489 $if (_WDMDDK_ || _NTIFS_)
490 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
492 $if (_NTIFS_)
493 
494 #if (NTDDI_VERSION >= NTDDI_VISTA || (NTDDI_VERSION >= NTDDI_WINXPSP2 && NTDDI_VERSION < NTDDI_WS03))
496 BOOLEAN
497 NTAPI
500 #endif
501 
502 #if (NTDDI_VERSION >= NTDDI_WIN7)
503 
505 BOOLEAN
506 NTAPI
510  _Out_opt_ PBOOLEAN StagingEnabled);
511 
513 VOID
514 NTAPI
517  _In_ PACL ResourceSacl,
521  _Inout_ PBOOLEAN GenerateAudit,
522  _Inout_opt_ PBOOLEAN GenerateAlarm);
523 
525 VOID
526 NTAPI
531  _Inout_ PACCESS_MASK AuditMask);
532 
533 #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
534 
535 NTSTATUS
536 NTAPI
538  _In_ ULONG Flags,
540  _In_opt_ PSID UserSid,
541  _In_ PSE_ADT_PARAMETER_ARRAY AuditParameters,
542  _In_ ULONG AuditSubcategoryId);
543 
544 BOOLEAN
545 NTAPI
548  _In_ PTOKEN_ACCESS_INFORMATION PrimaryTokenInformation,
549  _In_opt_ PTOKEN_ACCESS_INFORMATION ClientTokenInformation,
557 
559 VOID
560 NTAPI
563 
564 NTSTATUS
565 NTAPI
568  _Outptr_ PUNICODE_STRING *pImageFileName);
569 
570 #define SeLengthSid( Sid ) \
571  (8 + (4 * ((SID *)Sid)->SubAuthorityCount))
572 
573 #define SeDeleteClientSecurity(C) { \
574  if (SeTokenType((C)->ClientToken) == TokenPrimary) { \
575  PsDereferencePrimaryToken( (C)->ClientToken ); \
576  } else { \
577  PsDereferenceImpersonationToken( (C)->ClientToken ); \
578  } \
579 }
580 
581 #define SeStopImpersonatingClient() PsRevertToSelf()
582 
583 #define SeQuerySubjectContextToken( SubjectContext ) \
584  ( ARGUMENT_PRESENT( \
585  ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken \
586  ) ? \
587  ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken : \
588  ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->PrimaryToken )
589 
591 
592 $endif (_NTIFS_)
static POBJECTS_AND_NAME_A SE_OBJECT_TYPE LPSTR ObjectTypeName
Definition: security.c:77
* PNTSTATUS
Definition: strlen.c:14
enum _SE_ADT_PARAMETER_TYPE SE_ADT_PARAMETER_TYPE
NTKERNELAPI VOID NTAPI SeQueryTokenIntegrity(_In_ PACCESS_TOKEN Token, _Inout_ PSID_AND_ATTRIBUTES IntegritySA)
NTKERNELAPI NTSTATUS NTAPI SeAppendPrivileges(_Inout_ PACCESS_STATE AccessState, _In_ PPRIVILEGE_SET Privileges)
NTKERNELAPI NTSTATUS NTAPI SeAssignSecurityEx(_In_opt_ PSECURITY_DESCRIPTOR ParentDescriptor, _In_opt_ PSECURITY_DESCRIPTOR ExplicitDescriptor, _Out_ PSECURITY_DESCRIPTOR *NewDescriptor, _In_opt_ GUID *ObjectType, _In_ BOOLEAN IsDirectoryObject, _In_ ULONG AutoInheritFlags, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ PGENERIC_MAPPING GenericMapping, _In_ POOL_TYPE PoolType)
BOOLEAN NTAPI SeAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext, IN BOOLEAN SubjectContextLocked, IN ACCESS_MASK DesiredAccess, IN ACCESS_MASK PreviouslyGrantedAccess, OUT PPRIVILEGE_SET *Privileges, IN PGENERIC_MAPPING GenericMapping, IN KPROCESSOR_MODE AccessMode, OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus)
Definition: accesschk.c:340
ObjectType
Definition: metafile.c:80
NTKERNELAPI BOOLEAN NTAPI SeAuditingFileEventsWithContext(_In_ BOOLEAN AccessGranted, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext)
NTKERNELAPI NTSTATUS NTAPI SeSetSecurityDescriptorInfo(_In_opt_ PVOID Object, _In_ PSECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Inout_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, _In_ POOL_TYPE PoolType, _In_ PGENERIC_MAPPING GenericMapping)
NTKERNELAPI VOID NTAPI SeOpenObjectAuditAlarm(_In_ PUNICODE_STRING ObjectTypeName, _In_opt_ PVOID Object, _In_opt_ PUNICODE_STRING AbsoluteObjectName, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PACCESS_STATE AccessState, _In_ BOOLEAN ObjectCreated, _In_ BOOLEAN AccessGranted, _In_ KPROCESSOR_MODE AccessMode, _Out_ PBOOLEAN GenerateOnClose)
_In_opt_ PSECURITY_DESCRIPTOR ExplicitDescriptor
Definition: sefuncs.h:29
Type
Definition: Type.h:6
NTKERNELAPI VOID NTAPI SeUnlockSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
#define SE_MAX_AUDIT_PARAMETERS
Definition: setypes.h:228
NTKERNELAPI VOID NTAPI SeExamineGlobalSacl(_In_ PUNICODE_STRING ObjectType, _In_ PACL ResourceSacl, _In_ PACCESS_TOKEN Token, _In_ ACCESS_MASK DesiredAccess, _In_ BOOLEAN AccessGranted, _Inout_ PBOOLEAN GenerateAudit, _Inout_opt_ PBOOLEAN GenerateAlarm)
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK _Out_ PNTSTATUS AccessStatus
Definition: sefuncs.h:13
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:182
NTKERNELAPI VOID NTAPI SeMaximumAuditMaskFromGlobalSacl(_In_opt_ PUNICODE_STRING ObjectTypeName, _In_ ACCESS_MASK GrantedAccess, _In_ PACCESS_TOKEN Token, _Inout_ PACCESS_MASK AuditMask)
_In_ ACCESS_MASK DesiredAccess
Definition: sefuncs.h:417
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR _In_ BOOLEAN IsDirectoryObject
Definition: sefuncs.h:29
#define _In_reads_(size)
Definition: no_sal2.h:228
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE _In_ BOOLEAN ObjectCreated
Definition: sefuncs.h:414
ULONG SessionId
Definition: dllmain.c:28
LONG NTSTATUS
Definition: precomp.h:26
NTKERNELAPI VOID NTAPI SeOpenObjectForDeleteAuditAlarm(_In_ PUNICODE_STRING ObjectTypeName, _In_opt_ PVOID Object, _In_opt_ PUNICODE_STRING AbsoluteObjectName, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PACCESS_STATE AccessState, _In_ BOOLEAN ObjectCreated, _In_ BOOLEAN AccessGranted, _In_ KPROCESSOR_MODE AccessMode, _Out_ PBOOLEAN GenerateOnClose)
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID _Out_ PHANDLE Token
#define _NTIFS_
Definition: ifssupp.h:20
#define _Outptr_
Definition: no_sal2.h:396
#define _Const_
Definition: no_sal2.h:18
NTKERNELAPI NTSTATUS NTAPI SeMarkLogonSessionForTerminationNotification(_In_ PLUID LogonId)
#define _WDMDDK_
Definition: wdm.template.h:26
BOOLEAN NTAPI SeSinglePrivilegeCheck(IN LUID PrivilegeValue, IN KPROCESSOR_MODE PreviousMode)
Definition: priv.c:524
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR _In_ BOOLEAN _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext
Definition: sefuncs.h:29
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR * NewDescriptor
Definition: sefuncs.h:29
static BOOLEAN bSuccess
Definition: drive.cpp:417
NTKERNELAPI VOID NTAPI SeExamineSacl(_In_ PACL Sacl, _In_ PACCESS_TOKEN Token, _In_ ACCESS_MASK DesiredAccess, _In_ BOOLEAN AccessGranted, _Out_ PBOOLEAN GenerateAudit, _Out_ PBOOLEAN GenerateAlarm)
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING GenericMapping
Definition: sefuncs.h:13
NTKERNELAPI NTSTATUS NTAPI SeImpersonateClientEx(_In_ PSECURITY_CLIENT_CONTEXT ClientContext, _In_opt_ PETHREAD ServerThread)
#define _In_opt_
Definition: no_sal2.h:213
_Must_inspect_result_ _In_ PFLT_GET_OPERATION_STATUS_CALLBACK CallbackRoutine
Definition: fltkernel.h:1035
NTKERNELAPI NTSTATUS NTAPI SeCreateClientSecurityFromSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos, _In_ BOOLEAN ServerIsRemote, _Out_ PSECURITY_CLIENT_CONTEXT ClientContext)
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTKERNELAPI ULONG NTAPI SeObjectCreateSaclAccessBits(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTKERNELAPI NTSTATUS NTAPI SeCreateClientSecurity(_In_ PETHREAD ClientThread, _In_ PSECURITY_QUALITY_OF_SERVICE ClientSecurityQos, _In_ BOOLEAN RemoteSession, _Out_ PSECURITY_CLIENT_CONTEXT ClientContext)
_In_reads_bytes_(Length) PSECURITY_DESCRIPTOR SecurityDescriptor)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
NTKERNELAPI VOID NTAPI SeLockSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
unsigned char BOOLEAN
UINT CALLBACK ServerThread(_Inout_ PVOID Parameter)
#define _Out_writes_bytes_(size)
Definition: no_sal2.h:370
UINT CALLBACK ClientThread(_Inout_ PVOID Parameter)
#define _Out_
Definition: no_sal2.h:323
_In_opt_ PSECURITY_DESCRIPTOR _In_opt_ PSECURITY_DESCRIPTOR ParentSecurityDescriptor
Definition: sefuncs.h:395
#define _At_(target, annos)
Definition: no_sal2.h:11
#define NTKERNELAPI
NTKERNELAPI NTSTATUS NTAPI SeRegisterLogonSessionTerminatedRoutine(_In_ PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine)
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION SecurityInformation
Definition: fltkernel.h:1339
BOOLEAN NTAPI SeAccessCheckFromState(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PTOKEN_ACCESS_INFORMATION PrimaryTokenInformation, _In_opt_ PTOKEN_ACCESS_INFORMATION ClientTokenInformation, _In_ ACCESS_MASK DesiredAccess, _In_ ACCESS_MASK PreviouslyGrantedAccess, _Outptr_opt_result_maybenull_ PPRIVILEGE_SET *Privileges, _In_ PGENERIC_MAPPING GenericMapping, _In_ KPROCESSOR_MODE AccessMode, _Out_ PACCESS_MASK GrantedAccess, _Out_ PNTSTATUS AccessStatus)
NTKERNELAPI NTSTATUS NTAPI SeQuerySessionIdToken(_In_ PACCESS_TOKEN Token, _Out_ PULONG SessionId)
NTKERNELAPI BOOLEAN NTAPI SeTokenIsRestricted(_In_ PACCESS_TOKEN Token)
NTKERNELAPI BOOLEAN NTAPI SePrivilegeCheck(_Inout_ PPRIVILEGE_SET RequiredPrivileges, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ KPROCESSOR_MODE AccessMode)
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR _In_ BOOLEAN _In_ PSECURITY_SUBJECT_CONTEXT _In_ PGENERIC_MAPPING _In_ POOL_TYPE PoolType
Definition: sefuncs.h:29
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN SubjectContextLocked
Definition: sefuncs.h:13
NTKERNELAPI NTSTATUS NTAPI SeFilterToken(_In_ PACCESS_TOKEN ExistingToken, _In_ ULONG Flags, _In_opt_ PTOKEN_GROUPS SidsToDisable, _In_opt_ PTOKEN_PRIVILEGES PrivilegesToDelete, _In_opt_ PTOKEN_GROUPS RestrictedSids, _Outptr_ PACCESS_TOKEN *FilteredToken)
#define _Out_opt_
Definition: no_sal2.h:339
_In_ HANDLE Handle
Definition: extypes.h:390
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
NTKERNELAPI TOKEN_TYPE NTAPI SeTokenType(_In_ PACCESS_TOKEN Token)
NTKERNELAPI VOID NTAPI SeReleaseSubjectContext(_Inout_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
NTKERNELAPI VOID NTAPI SeFreePrivileges(_In_ PPRIVILEGE_SET Privileges)
DWORD * PSECURITY_INFORMATION
Definition: ms-dtyp.idl:311
INT POOL_TYPE
Definition: typedefs.h:76
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE _In_ BOOLEAN _In_ BOOLEAN _In_ KPROCESSOR_MODE _In_opt_ GUID * TransactionId
Definition: sefuncs.h:414
_In_ PVOID ClientContext
Definition: netioddk.h:55
NTSTATUS(NTAPI * PSE_LOGON_SESSION_TERMINATED_ROUTINE)(IN PLUID LogonId)
Definition: setypes.h:1209
#define _Outptr_result_buffer_(size)
Definition: no_sal2.h:414
NTKERNELAPI BOOLEAN NTAPI SeAuditingFileEvents(_In_ BOOLEAN AccessGranted, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
static const UCHAR Index[8]
Definition: usbohci.c:18
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE _In_ BOOLEAN _In_ BOOLEAN _In_ KPROCESSOR_MODE _In_opt_ GUID _Out_ PBOOLEAN GenerateOnClose
Definition: sefuncs.h:414
NTKERNELAPI VOID NTAPI SeCaptureSubjectContext(_Out_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
#define _Inout_
Definition: no_sal2.h:244
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTKERNELAPI NTSTATUS NTAPI SeQueryAuthenticationIdToken(_In_ PACCESS_TOKEN Token, _Out_ PLUID AuthenticationId)
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE AccessMode
Definition: sefuncs.h:13
enum _TOKEN_INFORMATION_CLASS TOKEN_INFORMATION_CLASS
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
Definition: sefuncs.h:13
_In_opt_ PVOID _In_opt_ PUNICODE_STRING AbsoluteObjectName
Definition: sefuncs.h:414
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE AccessState
Definition: sefuncs.h:414
char * PBOOLEAN
Definition: retypes.h:11
VOID NTAPI SeSetAccessStateGenericMapping(_Inout_ PACCESS_STATE AccessState, _In_ PGENERIC_MAPPING GenericMapping)
_In_opt_ PVOID Object
Definition: sefuncs.h:414
_IRQL_requires_max_(PASSIVE_LEVEL) NTSYSAPI NTSTATUS NTAPI ZwDuplicateToken(_In_ HANDLE ExistingTokenHandle
Definition: Messaging.c:64
NTKERNELAPI BOOLEAN NTAPI SeAuditingFileOrGlobalEvents(_In_ BOOLEAN AccessGranted, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext)
#define _Outptr_opt_
Definition: no_sal2.h:397
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
enum _TOKEN_TYPE TOKEN_TYPE
#define _In_
Definition: no_sal2.h:204
NTKERNELAPI NTSTATUS NTAPI SeSetSecurityDescriptorInfoEx(_In_opt_ PVOID Object, _In_ PSECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR ModificationDescriptor, _Inout_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, _In_ ULONG AutoInheritFlags, _In_ POOL_TYPE PoolType, _In_ PGENERIC_MAPPING GenericMapping)
$if(_WDMDDK_) _IRQL_requires_max_(PASSIVE_LEVEL) NTKERNELAPI BOOLEAN NTAPI SeAccessCheck(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: ke.h:1
NTSTATUS NTAPI SeLocateProcessImageName(_Inout_ PEPROCESS Process, _Outptr_ PUNICODE_STRING *pImageFileName)
BOOLEAN NTAPI SeValidSecurityDescriptor(IN ULONG Length, IN PSECURITY_DESCRIPTOR _SecurityDescriptor)
Definition: sd.c:960
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE _In_ BOOLEAN _In_ BOOLEAN AccessGranted
Definition: sefuncs.h:414
#define _Outptr_opt_result_maybenull_
Definition: no_sal2.h:410
unsigned int * PULONG
Definition: retypes.h:1
NTKERNELAPI NTSTATUS NTAPI SeUnregisterLogonSessionTerminatedRoutine(_In_ PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine)
WCHAR SourceName[256]
Definition: arping.c:28
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID LogonId
NTKERNELAPI VOID NTAPI SeDeleteObjectAuditAlarm(_In_ PVOID Object, _In_ HANDLE Handle)
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
NTKERNELAPI NTSTATUS NTAPI SeQueryInformationToken(_In_ PACCESS_TOKEN Token, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Outptr_result_buffer_(_Inexpressible_(token-dependent)) PVOID *TokenInformation)
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK PreviouslyGrantedAccess
Definition: sefuncs.h:13
unsigned int ULONG
Definition: retypes.h:1
_Const_ NTSTATUS NTAPI SeSetAuditParameter(_Inout_ PSE_ADT_PARAMETER_ARRAY AuditParameters, _In_ SE_ADT_PARAMETER_TYPE Type, _In_range_(<, SE_MAX_AUDIT_PARAMETERS) ULONG Index, _In_reads_(_Inexpressible_("depends on SE_ADT_PARAMETER_TYPE")) PVOID Data)
Definition: semgr.c:441
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
BOOLEAN NTAPI SeAuditingHardLinkEvents(IN BOOLEAN AccessGranted, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
Definition: audit.c:743
NTKERNELAPI BOOLEAN NTAPI SeAuditingHardLinkEventsWithContext(_In_ BOOLEAN AccessGranted, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL Sacl
Definition: rtlfuncs.h:1555
$endif(_WDMDDK_) $if(_NTDDK_) _IRQL_requires_max_(PASSIVE_LEVEL) NTKERNELAPI BOOLEAN NTAPI SeSinglePrivilegeCheck(_In_ LUID PrivilegeValue
Definition: ke.h:202
NTKERNELAPI NTSTATUS NTAPI SeQuerySecurityDescriptorInfo(_In_ PSECURITY_INFORMATION SecurityInformation, _Out_writes_bytes_(*Length) PSECURITY_DESCRIPTOR SecurityDescriptor, _Inout_ PULONG Length, _Inout_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor)
NTKERNELAPI BOOLEAN NTAPI SeAuditingAnyFileEventsWithContext(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext, _Out_opt_ PBOOLEAN StagingEnabled)
NTKERNELAPI VOID NTAPI SeImpersonateClient(_In_ PSECURITY_CLIENT_CONTEXT ClientContext, _In_opt_ PETHREAD ServerThread)
NTKERNELAPI VOID NTAPI SeAuditHardLinkCreationWithTransaction(_In_ PUNICODE_STRING FileName, _In_ PUNICODE_STRING LinkName, _In_ BOOLEAN bSuccess, _In_opt_ GUID *TransactionId)
#define _In_range_(lb, ub)
Definition: no_sal2.h:227
NTKERNELAPI VOID NTAPI SeDeleteObjectAuditAlarmWithTransaction(_In_ PVOID Object, _In_ HANDLE Handle, _In_opt_ GUID *TransactionId)
NTKERNELAPI VOID NTAPI SeAuditTransactionStateChange(_In_ GUID *TransactionId, _In_ GUID *ResourceManagerId, _In_ ULONG NewTransactionState)
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
Definition: sefuncs.h:13
NTKERNELAPI BOOLEAN NTAPI SeTokenIsAdmin(_In_ PACCESS_TOKEN Token)
BOOLEAN NTAPI SeTokenIsWriteRestricted(IN PACCESS_TOKEN Token)
Definition: token.c:1821
ULONG ACCESS_MASK
Definition: nt_native.h:40
NTKERNELAPI VOID NTAPI SeOpenObjectForDeleteAuditAlarmWithTransaction(_In_ PUNICODE_STRING ObjectTypeName, _In_opt_ PVOID Object, _In_opt_ PUNICODE_STRING AbsoluteObjectName, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PACCESS_STATE AccessState, _In_ BOOLEAN ObjectCreated, _In_ BOOLEAN AccessGranted, _In_ KPROCESSOR_MODE AccessMode, _In_opt_ GUID *TransactionId, _Out_ PBOOLEAN GenerateOnClose)
#define _NTDDK_
NTKERNELAPI NTSTATUS NTAPI SeSetSessionIdToken(_In_ PACCESS_TOKEN Token, _In_ ULONG SessionId)
NTKERNELAPI VOID NTAPI SeAuditHardLinkCreation(_In_ PUNICODE_STRING FileName, _In_ PUNICODE_STRING LinkName, _In_ BOOLEAN bSuccess)
_In_ TOKEN_INFORMATION_CLASS TokenInformationClass
Definition: sefuncs.h:318
NTSTATUS NTAPI SeReportSecurityEventWithSubCategory(_In_ ULONG Flags, _In_ PUNICODE_STRING SourceName, _In_opt_ PSID UserSid, _In_ PSE_ADT_PARAMETER_ARRAY AuditParameters, _In_ ULONG AuditSubcategoryId)
#define _Inout_opt_
Definition: no_sal2.h:258
NTKERNELAPI PSE_EXPORTS SeExports
Definition: semgr.c:18
_In_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext
Definition: sefuncs.h:13
NTSTATUS NTAPI SeReportSecurityEvent(_In_ ULONG Flags, _In_ PUNICODE_STRING SourceName, _In_opt_ PSID UserSid, _In_ PSE_ADT_PARAMETER_ARRAY AuditParameters)
Definition: semgr.c:371