ReactOS 0.4.16-dev-329-g9223134
ntifs_ex.h File Reference
#include "Include/ntddk_ex.h"
Include dependency graph for ntifs_ex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FULL_SECURITY_INFORMATION   (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION)
 
#define IsFileObjectReadOnly(FO)   (!((FO)->WriteAccess | (FO)->DeleteAccess))
 
#define FSCTL_GET_COMPRESSION   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define FSCTL_SET_COMPRESSION   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
 
#define FSCTL_GET_NTFS_VOLUME_DATA   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define FSCTL_GET_NTFS_FILE_RECORD   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define FSCTL_GET_HFS_INFORMATION   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
#define FILE_VOLUME_QUOTAS   0x00000020
 
#define FILE_SUPPORTS_SPARSE_FILES   0x00000040
 
#define FILE_SUPPORTS_REPARSE_POINTS   0x00000080
 
#define FILE_SUPPORTS_REMOTE_STORAGE   0x00000100
 
#define FS_LFN_APIS   0x00004000
 
#define FILE_SUPPORTS_OBJECT_IDS   0x00010000
 
#define FILE_SUPPORTS_ENCRYPTION   0x00020000
 
#define FILE_NAMED_STREAMS   0x00040000
 
#define FILE_READ_ONLY_VOLUME   0x00080000
 
#define VOLUME_IS_DIRTY   (0x00000001)
 
#define VOLUME_UPGRADE_SCHEDULED   (0x00000002)
 
#define FILE_ATTRIBUTE_SPARSE_FILE   0x00000200
 
#define FILE_ATTRIBUTE_REPARSE_POINT   0x00000400
 
#define FILE_ATTRIBUTE_COMPRESSED   0x00000800
 
#define FILE_ATTRIBUTE_OFFLINE   0x00001000
 
#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED   0x00002000
 
#define FILE_ATTRIBUTE_ENCRYPTED   0x00004000
 
#define FileFsFullSizeInformation   (FS_INFORMATION_CLASS(7))
 
#define FileFsObjectIdInformation   (FS_INFORMATION_CLASS(8))
 
#define FileFsDriverPathInformation   (FS_INFORMATION_CLASS(9))
 
#define IRP_MN_SURPRISE_REMOVAL   0x17
 
#define IoCopyCurrentIrpStackLocationToNext(Irp)
 
#define IoSkipCurrentIrpStackLocation(Irp)
 
#define VPB_REMOVE_PENDING   0x00000008
 
#define FSRTL_VOLUME_DISMOUNT   1
 
#define FSRTL_VOLUME_DISMOUNT_FAILED   2
 
#define FSRTL_VOLUME_LOCK   3
 
#define FSRTL_VOLUME_LOCK_FAILED   4
 
#define FSRTL_VOLUME_UNLOCK   5
 
#define FSRTL_VOLUME_MOUNT   6
 

Typedefs

typedef NTSTATUS(* ptrFsRtlNotifyVolumeEvent) (IN PFILE_OBJECT FileObject, IN ULONG EventCode)
 

Functions

__inline PVOID MmGetSystemAddressForMdlSafer (IN PMDL Mdl)
 
NTSYSAPI NTSTATUS NTAPI RtlSetGroupSecurityDescriptor (IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID Group, IN BOOLEAN GroupDefaulted)
 
NTSYSAPI NTSTATUS NTAPI RtlSetSaclSecurityDescriptor (IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN BOOLEAN SaclPresent, IN PACL Sacl, IN BOOLEAN SaclDefaulted)
 
NTSYSAPI PUCHAR NTAPI RtlSubAuthorityCountSid (IN PSID Sid)
 
NTSYSAPI NTSTATUS NTAPI RtlAbsoluteToSelfRelativeSD (IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor, IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, IN PULONG BufferLength)
 
NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid (IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount, IN ULONG SubAuthority0, IN ULONG SubAuthority1, IN ULONG SubAuthority2, IN ULONG SubAuthority3, IN ULONG SubAuthority4, IN ULONG SubAuthority5, IN ULONG SubAuthority6, IN ULONG SubAuthority7, OUT PSID *Sid)
 
NTSYSAPI NTSTATUS NTAPI RtlConvertSidToUnicodeString (OUT PUNICODE_STRING DestinationString, IN PVOID Sid, IN BOOLEAN AllocateDestinationString)
 
NTSYSAPI NTSTATUS NTAPI RtlGetGroupSecurityDescriptor (IN PSECURITY_DESCRIPTOR SecurityDescriptor, OUT PSID *Group, OUT PBOOLEAN GroupDefaulted)
 
NTSYSAPI NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor (IN PSECURITY_DESCRIPTOR SecurityDescriptor, OUT PSID *Owner, OUT PBOOLEAN OwnerDefaulted)
 
NTSYSAPI NTSTATUS NTAPI RtlInitializeSid (IN OUT PSID Sid, IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount)
 
NTSYSAPI NTSTATUS NTAPI ZwFsControlFile (IN HANDLE DeviceHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG IoControlCode, IN PVOID InputBuffer, IN ULONG InputBufferSize, OUT PVOID OutputBuffer, IN ULONG OutputBufferSize)
 
NTSYSAPI NTSTATUS NTAPI ZwDeviceIoControlFile (IN HANDLE DeviceHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL, IN PVOID UserApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG IoControlCode, IN PVOID InputBuffer, IN ULONG InputBufferSize, OUT PVOID OutputBuffer, IN ULONG OutputBufferSize)
 
NTSYSAPI NTSTATUS NTAPI ZwQueryVolumeInformationFile (IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID FsInformation, IN ULONG Length, IN FS_INFORMATION_CLASS FsInformationClass)
 

Macro Definition Documentation

◆ FILE_ATTRIBUTE_COMPRESSED

#define FILE_ATTRIBUTE_COMPRESSED   0x00000800

Definition at line 382 of file ntifs_ex.h.

◆ FILE_ATTRIBUTE_ENCRYPTED

#define FILE_ATTRIBUTE_ENCRYPTED   0x00004000

Definition at line 385 of file ntifs_ex.h.

◆ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED

#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED   0x00002000

Definition at line 384 of file ntifs_ex.h.

◆ FILE_ATTRIBUTE_OFFLINE

#define FILE_ATTRIBUTE_OFFLINE   0x00001000

Definition at line 383 of file ntifs_ex.h.

◆ FILE_ATTRIBUTE_REPARSE_POINT

#define FILE_ATTRIBUTE_REPARSE_POINT   0x00000400

Definition at line 381 of file ntifs_ex.h.

◆ FILE_ATTRIBUTE_SPARSE_FILE

#define FILE_ATTRIBUTE_SPARSE_FILE   0x00000200

Definition at line 380 of file ntifs_ex.h.

◆ FILE_NAMED_STREAMS

#define FILE_NAMED_STREAMS   0x00040000

Definition at line 324 of file ntifs_ex.h.

◆ FILE_READ_ONLY_VOLUME

#define FILE_READ_ONLY_VOLUME   0x00080000

Definition at line 325 of file ntifs_ex.h.

◆ FILE_SUPPORTS_ENCRYPTION

#define FILE_SUPPORTS_ENCRYPTION   0x00020000

Definition at line 323 of file ntifs_ex.h.

◆ FILE_SUPPORTS_OBJECT_IDS

#define FILE_SUPPORTS_OBJECT_IDS   0x00010000

Definition at line 322 of file ntifs_ex.h.

◆ FILE_SUPPORTS_REMOTE_STORAGE

#define FILE_SUPPORTS_REMOTE_STORAGE   0x00000100

Definition at line 320 of file ntifs_ex.h.

◆ FILE_SUPPORTS_REPARSE_POINTS

#define FILE_SUPPORTS_REPARSE_POINTS   0x00000080

Definition at line 319 of file ntifs_ex.h.

◆ FILE_SUPPORTS_SPARSE_FILES

#define FILE_SUPPORTS_SPARSE_FILES   0x00000040

Definition at line 318 of file ntifs_ex.h.

◆ FILE_VOLUME_QUOTAS

#define FILE_VOLUME_QUOTAS   0x00000020

Definition at line 317 of file ntifs_ex.h.

◆ FileFsDriverPathInformation

#define FileFsDriverPathInformation   (FS_INFORMATION_CLASS(9))

Definition at line 391 of file ntifs_ex.h.

◆ FileFsFullSizeInformation

#define FileFsFullSizeInformation   (FS_INFORMATION_CLASS(7))

Definition at line 389 of file ntifs_ex.h.

◆ FileFsObjectIdInformation

#define FileFsObjectIdInformation   (FS_INFORMATION_CLASS(8))

Definition at line 390 of file ntifs_ex.h.

◆ FS_LFN_APIS

#define FS_LFN_APIS   0x00004000

Definition at line 321 of file ntifs_ex.h.

◆ FSCTL_GET_COMPRESSION

Definition at line 258 of file ntifs_ex.h.

◆ FSCTL_GET_HFS_INFORMATION

#define FSCTL_GET_HFS_INFORMATION   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)

Definition at line 264 of file ntifs_ex.h.

◆ FSCTL_GET_NTFS_FILE_RECORD

#define FSCTL_GET_NTFS_FILE_RECORD   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)

Definition at line 262 of file ntifs_ex.h.

◆ FSCTL_GET_NTFS_VOLUME_DATA

#define FSCTL_GET_NTFS_VOLUME_DATA   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)

Definition at line 261 of file ntifs_ex.h.

◆ FSCTL_SET_COMPRESSION

Definition at line 259 of file ntifs_ex.h.

◆ FSRTL_VOLUME_DISMOUNT

#define FSRTL_VOLUME_DISMOUNT   1

Definition at line 439 of file ntifs_ex.h.

◆ FSRTL_VOLUME_DISMOUNT_FAILED

#define FSRTL_VOLUME_DISMOUNT_FAILED   2

Definition at line 440 of file ntifs_ex.h.

◆ FSRTL_VOLUME_LOCK

#define FSRTL_VOLUME_LOCK   3

Definition at line 441 of file ntifs_ex.h.

◆ FSRTL_VOLUME_LOCK_FAILED

#define FSRTL_VOLUME_LOCK_FAILED   4

Definition at line 442 of file ntifs_ex.h.

◆ FSRTL_VOLUME_MOUNT

#define FSRTL_VOLUME_MOUNT   6

Definition at line 444 of file ntifs_ex.h.

◆ FSRTL_VOLUME_UNLOCK

#define FSRTL_VOLUME_UNLOCK   5

Definition at line 443 of file ntifs_ex.h.

◆ FULL_SECURITY_INFORMATION

◆ IoCopyCurrentIrpStackLocationToNext

#define IoCopyCurrentIrpStackLocationToNext (   Irp)
Value:
{ \
PIO_STACK_LOCATION nextIrpSp; \
nextIrpSp = IoGetNextIrpStackLocation( (Irp) ); \
RtlCopyMemory( nextIrpSp, irpSp, FIELD_OFFSET(IO_STACK_LOCATION, CompletionRoutine)); \
nextIrpSp->Control = 0; }
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
_In_ PIRP Irp
Definition: csq.h:116
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2695
irpSp
Definition: iofuncs.h:2719

Definition at line 413 of file ntifs_ex.h.

◆ IoSkipCurrentIrpStackLocation

#define IoSkipCurrentIrpStackLocation (   Irp)
Value:
(Irp)->CurrentLocation++; \
(Irp)->Tail.Overlay.CurrentStackLocation++;

Definition at line 421 of file ntifs_ex.h.

◆ IRP_MN_SURPRISE_REMOVAL

#define IRP_MN_SURPRISE_REMOVAL   0x17

Definition at line 408 of file ntifs_ex.h.

◆ IsFileObjectReadOnly

#define IsFileObjectReadOnly (   FO)    (!((FO)->WriteAccess | (FO)->DeleteAccess))

Definition at line 253 of file ntifs_ex.h.

◆ VOLUME_IS_DIRTY

#define VOLUME_IS_DIRTY   (0x00000001)

Definition at line 330 of file ntifs_ex.h.

◆ VOLUME_UPGRADE_SCHEDULED

#define VOLUME_UPGRADE_SCHEDULED   (0x00000002)

Definition at line 331 of file ntifs_ex.h.

◆ VPB_REMOVE_PENDING

#define VPB_REMOVE_PENDING   0x00000008

Definition at line 428 of file ntifs_ex.h.

Typedef Documentation

◆ ptrFsRtlNotifyVolumeEvent

typedef NTSTATUS(* ptrFsRtlNotifyVolumeEvent) (IN PFILE_OBJECT FileObject, IN ULONG EventCode)

Definition at line 453 of file ntifs_ex.h.

Function Documentation

◆ MmGetSystemAddressForMdlSafer()

__inline PVOID MmGetSystemAddressForMdlSafer ( IN PMDL  Mdl)

Definition at line 101 of file ntifs_ex.h.

102{
103 PVOID Addr;
104
106 Addr = Mdl->MappedSystemVa;
107 } else {
108 CSHORT PrevFlag = Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL;
109
110 Mdl->MdlFlags |= MDL_MAPPING_CAN_FAIL;
112 Mdl->MdlFlags = (Mdl->MdlFlags & ~MDL_MAPPING_CAN_FAIL) | PrevFlag;
113 }
114
115 return(Addr);
116}
PVOID NTAPI MmMapLockedPages(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode)
Definition: mdlsup.c:818
#define KernelMode
Definition: asm.h:34
short CSHORT
Definition: umtypes.h:127
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
#define MDL_MAPPING_CAN_FAIL
Definition: mmtypes.h:31
#define MDL_SOURCE_IS_NONPAGED_POOL
Definition: mmtypes.h:20
#define MDL_MAPPED_TO_SYSTEM_VA
Definition: mmtypes.h:18

Referenced by UDFGetCallersBuffer(), and UDFQueryDirectory().

◆ RtlAbsoluteToSelfRelativeSD()

NTSYSAPI NTSTATUS NTAPI RtlAbsoluteToSelfRelativeSD ( IN PSECURITY_DESCRIPTOR  AbsoluteSecurityDescriptor,
IN OUT PSECURITY_DESCRIPTOR  SelfRelativeSecurityDescriptor,
IN PULONG  BufferLength 
)

Definition at line 626 of file sd.c.

629{
632
633 /* Can't already be relative */
635
636 /* Call the other API */
640}
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor
Definition: rtlfuncs.h:1603
_Out_writes_bytes_to_opt_ BufferLength PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor
Definition: rtlfuncs.h:1132
#define STATUS_BAD_DESCRIPTOR_FORMAT
Definition: ntstatus.h:467
#define PAGED_CODE_RTL()
Definition: rtlp.h:16
NTSTATUS NTAPI RtlMakeSelfRelativeSD(IN PSECURITY_DESCRIPTOR SecurityDescriptor, OUT PSECURITY_DESCRIPTOR SelfRelativeSD, IN OUT PULONG BufferLength)
Definition: sd.c:647
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
struct _SECURITY_DESCRIPTOR * PISECURITY_DESCRIPTOR
#define SE_SELF_RELATIVE
Definition: setypes.h:834

Referenced by fcb_get_sd(), get_top_level_sd(), IntCreateServiceSecurity(), LsapCreateAccountSd(), LsapCreatePolicySd(), LsapCreateSecretSd(), LsapCreateTokenSd(), MakeSelfRelativeSD(), RtlpSysVolCheckOwnerAndSecurity(), RtlQuerySecurityObject(), SampCreateAccountDomainSD(), SampCreateAliasSD(), SampCreateBuiltinDomainSD(), SampCreateGroupSD(), SampCreateServerSD(), SampCreateUserSD(), ScmCreateDefaultServiceSD(), and TiCreateSecurityDescriptor().

◆ RtlAllocateAndInitializeSid()

NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid ( IN PSID_IDENTIFIER_AUTHORITY  IdentifierAuthority,
IN UCHAR  SubAuthorityCount,
IN ULONG  SubAuthority0,
IN ULONG  SubAuthority1,
IN ULONG  SubAuthority2,
IN ULONG  SubAuthority3,
IN ULONG  SubAuthority4,
IN ULONG  SubAuthority5,
IN ULONG  SubAuthority6,
IN ULONG  SubAuthority7,
OUT PSID Sid 
)

Definition at line 290 of file sid.c.

301{
302 PISID pSid;
304
305 /* SIDs can only have up to 8 subauthorities */
307
308 /* Allocate memory to hold the SID */
310 if (!pSid) return STATUS_NO_MEMORY;
311
312 /* Fill out the header */
316
317 /* Iteraratively drop into each successive lower count */
318 switch (SubAuthorityCount)
319 {
320 /* And copy the needed subahority */
321 case 8: pSid->SubAuthority[7] = SubAuthority7;
322 case 7: pSid->SubAuthority[6] = SubAuthority6;
323 case 6: pSid->SubAuthority[5] = SubAuthority5;
324 case 5: pSid->SubAuthority[4] = SubAuthority4;
325 case 4: pSid->SubAuthority[3] = SubAuthority3;
326 case 3: pSid->SubAuthority[2] = SubAuthority2;
327 case 2: pSid->SubAuthority[1] = SubAuthority1;
328 case 1: pSid->SubAuthority[0] = SubAuthority0;
329 default: break;
330 }
331
332 /* Return the allocated SID */
333 *Sid = pSid;
334 return STATUS_SUCCESS;
335}
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
static PSID pSid
Definition: security.c:74
_In_ PSID_IDENTIFIER_AUTHORITY _In_ UCHAR SubAuthorityCount
Definition: rtlfuncs.h:1527
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1145
_In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
Definition: rtlfuncs.h:1525
#define STATUS_INVALID_SID
Definition: ntstatus.h:356
PVOID NTAPI RtlpAllocateMemory(_In_ ULONG Bytes, _In_ ULONG Tag)
Definition: rtlcompat.c:34
#define TAG_SID
Definition: sid.c:15
ULONG NTAPI RtlLengthRequiredSid(IN ULONG SubAuthorityCount)
Definition: sid.c:54
#define STATUS_SUCCESS
Definition: shellext.h:65
BYTE Revision
Definition: ms-dtyp.idl:199
DWORD SubAuthority[*]
Definition: ms-dtyp.idl:202
BYTE SubAuthorityCount
Definition: ms-dtyp.idl:200
SID_IDENTIFIER_AUTHORITY IdentifierAuthority
Definition: ms-dtyp.idl:201
#define SID_REVISION
Definition: setypes.h:481

Referenced by AccessCheckEmptyMappingTest(), AccessGrantedMultipleObjectsTests(), AccessGrantedNoDaclTests(), AccessGrantedTests(), AllocateAndInitializeSid(), AppendRidToSid(), BuildTokenGroups(), CreateBaseAcls(), CreateNewDefaultDacl(), CreateNlsDirectorySecurity(), CreateNlsSecurityDescriptor(), CSR_API(), CsrCreateLocalSystemSD(), CsrpConnectToServer(), DenyAccessTests(), DllMain(), GetDosDevicesProtection(), GrantedAccessTests(), K32CreateDBMonMutex(), LogonUserExW(), LsapAppendRidToSid(), LsapCreateAccountSd(), LsapCreatePolicySd(), LsapCreateRandomDomainSid(), LsapCreateSecretSd(), LsapCreateTokenSd(), LsapGetDomainInfo(), MyLogonUser(), QueryTokenPrivilegesAndGroupsTests(), QueryTokenRestrictedSidsTest(), RtlpSysVolCheckOwnerAndSecurity(), RtlpSysVolCreateSecurityDescriptor(), RtlpSysVolTakeOwnership(), SampCreateAccountDomainSD(), SampCreateAliasSD(), SampCreateBuiltinDomainSD(), SampCreateGroupSD(), SampCreateServerSD(), SampCreateUserSD(), and SmpCreateSecurityDescriptors().

◆ RtlConvertSidToUnicodeString()

◆ RtlGetGroupSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlGetGroupSecurityDescriptor ( IN PSECURITY_DESCRIPTOR  SecurityDescriptor,
OUT PSID Group,
OUT PBOOLEAN  GroupDefaulted 
)

Definition at line 280 of file sd.c.

283{
286
287 /* Fail on invalid revision */
289
290 /* Get the group and if defaulted */
293
294 /* All good */
295 return STATUS_SUCCESS;
296}
_In_opt_ PSID Group
Definition: rtlfuncs.h:1658
_In_opt_ PSID _In_opt_ BOOLEAN GroupDefaulted
Definition: rtlfuncs.h:1660
FORCEINLINE PSID SepGetGroupFromDescriptor(_Inout_ PSECURITY_DESCRIPTOR _Descriptor)
Definition: se.h:89
#define STATUS_UNKNOWN_REVISION
Definition: ntstatus.h:324
_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:191
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58
#define SE_GROUP_DEFAULTED
Definition: setypes.h:820

Referenced by _test_group(), CheckDirectorySecurity__(), CheckKeySecurity__(), GetSecurityDescriptorGroup(), RtlpSetSecurityObject(), and RtlQuerySecurityObject().

◆ RtlGetOwnerSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor ( IN PSECURITY_DESCRIPTOR  SecurityDescriptor,
OUT PSID Owner,
OUT PBOOLEAN  OwnerDefaulted 
)

Definition at line 257 of file sd.c.

260{
263
264 /* Fail on invalid revision */
266
267 /* Get the owner and if defaulted */
270
271 /* All good */
272 return STATUS_SUCCESS;
273}
_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 _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1609
_In_opt_ PSID _In_opt_ BOOLEAN OwnerDefaulted
Definition: rtlfuncs.h:1684
FORCEINLINE PSID SepGetOwnerFromDescriptor(_Inout_ PSECURITY_DESCRIPTOR _Descriptor)
Definition: se.h:109
#define SE_OWNER_DEFAULTED
Definition: setypes.h:819

Referenced by CheckDirectorySecurity__(), CheckKeySecurity__(), create_directory_fcb(), create_subvol(), fcb_get_new_sd(), GetSecurityDescriptorOwner(), mknod(), RtlpSetSecurityObject(), RtlpSysVolCheckOwnerAndSecurity(), and RtlQuerySecurityObject().

◆ RtlInitializeSid()

◆ RtlSetGroupSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlSetGroupSecurityDescriptor ( IN OUT PSECURITY_DESCRIPTOR  SecurityDescriptor,
IN PSID  Group,
IN BOOLEAN  GroupDefaulted 
)

◆ RtlSetSaclSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlSetSaclSecurityDescriptor ( IN OUT PSECURITY_DESCRIPTOR  SecurityDescriptor,
IN BOOLEAN  SaclPresent,
IN PACL  Sacl,
IN BOOLEAN  SaclDefaulted 
)

Definition at line 342 of file sd.c.

346{
349
350 /* Fail on invalid revision */
352
353 /* Fail on relative descriptors */
355
356 /* Is there a SACL? */
357 if (!SaclPresent)
358 {
359 /* Caller is clearing the SACL, unset the flag and we're done */
360 Sd->Control = Sd->Control & ~SE_SACL_PRESENT;
361 return STATUS_SUCCESS;
362 }
363
364 /* Caller is setting a new SACL, set it and the flag */
365 Sd->Sacl = Sacl;
367
368 /* Set if defaulted */
369 Sd->Control &= ~SE_SACL_DEFAULTED;
371
372 /* All good */
373 return STATUS_SUCCESS;
374}
_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:1607
_Out_ PBOOLEAN SaclPresent
Definition: rtlfuncs.h:2430
_Out_ PBOOLEAN _Out_ PACL _Out_ PBOOLEAN SaclDefaulted
Definition: rtlfuncs.h:2432
#define SE_SACL_DEFAULTED
Definition: setypes.h:824
#define SE_SACL_PRESENT
Definition: setypes.h:823

Referenced by RtlQuerySecurityObject(), SampCreateAccountDomainSD(), SampCreateAliasSD(), SampCreateBuiltinDomainSD(), SampCreateGroupSD(), SampCreateServerSD(), SampCreateUserSD(), ScmCreateDefaultSD(), SetSecurityDescriptorSacl(), and TestSeAssignSecurity().

◆ RtlSubAuthorityCountSid()

NTSYSAPI PUCHAR NTAPI RtlSubAuthorityCountSid ( IN PSID  Sid)

◆ ZwDeviceIoControlFile()

NTSYSAPI NTSTATUS NTAPI ZwDeviceIoControlFile ( IN HANDLE  DeviceHandle,
IN HANDLE Event  OPTIONAL,
IN PIO_APC_ROUTINE UserApcRoutine  OPTIONAL,
IN PVOID UserApcContext  OPTIONAL,
OUT PIO_STATUS_BLOCK  IoStatusBlock,
IN ULONG  IoControlCode,
IN PVOID  InputBuffer,
IN ULONG  InputBufferSize,
OUT PVOID  OutputBuffer,
IN ULONG  OutputBufferSize 
)

◆ ZwFsControlFile()

NTSYSAPI NTSTATUS NTAPI ZwFsControlFile ( IN HANDLE  DeviceHandle,
IN HANDLE Event  OPTIONAL,
IN PIO_APC_ROUTINE ApcRoutine  OPTIONAL,
IN PVOID ApcContext  OPTIONAL,
OUT PIO_STATUS_BLOCK  IoStatusBlock,
IN ULONG  IoControlCode,
IN PVOID  InputBuffer,
IN ULONG  InputBufferSize,
OUT PVOID  OutputBuffer,
IN ULONG  OutputBufferSize 
)

◆ ZwQueryVolumeInformationFile()

NTSYSAPI NTSTATUS NTAPI ZwQueryVolumeInformationFile ( IN HANDLE  FileHandle,
OUT PIO_STATUS_BLOCK  IoStatusBlock,
OUT PVOID  FsInformation,
IN ULONG  Length,
IN FS_INFORMATION_CLASS  FsInformationClass 
)