ReactOS 0.4.16-dev-197-g92996da
symlink.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for symlink.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI IoCreateSymbolicLink (IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
 
NTSTATUS NTAPI IoCreateUnprotectedSymbolicLink (IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
 
NTSTATUS NTAPI IoDeleteSymbolicLink (IN PUNICODE_STRING SymbolicLinkName)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file symlink.c.

Function Documentation

◆ IoCreateSymbolicLink()

NTSTATUS NTAPI IoCreateSymbolicLink ( IN PUNICODE_STRING  SymbolicLinkName,
IN PUNICODE_STRING  DeviceName 
)

Definition at line 23 of file symlink.c.

25{
29 PAGED_CODE();
30
31 /* Initialize the object attributes and create the link */
35 NULL,
42
43 /* Return status */
44 return Status;
45}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define OBJ_PERMANENT
Definition: winternl.h:226
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI ZwCreateSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _In_ PUNICODE_STRING Name)
#define SYMBOLIC_LINK_ALL_ACCESS
Definition: nt_native.h:1267
PSECURITY_DESCRIPTOR SePublicDefaultSd
Definition: sd.c:16
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
Definition: wdfdevice.h:3739
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275

Referenced by _Function_class_(), CODE_SEG(), CompBattAddDevice(), ConDrvCreateController(), CreateSoundDevice(), DiskCreateSymbolicLinks(), DriverEntry(), Ex2ProcessMountPoint(), FdoCreateRawParallelPdo(), FdoStartAdapter(), FltpSetupCommunicationObjects(), FreeBT_AddDevice(), FsRtlpSetSymbolicLink(), GlobalCreateSymbolicLink(), HalpNextDriveLetter(), InitDevice(), InitializeGlobalData(), InitializeSoundBlaster(), IntVideoPortAddDeviceMapLink(), IopStartRamdisk(), IoRegisterDeviceInterface(), Mx::MxCreateSymbolicLink(), NdisMRegisterDevice(), PartitionHandleStartDevice(), RamdiskCreateDiskDevice(), SerialPnpStartDevice(), SysAudio_AddDevice(), USBPORT_CreateLegacySymbolicLink(), VfdCreateDevice(), VfdSetLink(), ViCreateDriveLetter(), and xHalIoAssignDriveLetters().

◆ IoCreateUnprotectedSymbolicLink()

NTSTATUS NTAPI IoCreateUnprotectedSymbolicLink ( IN PUNICODE_STRING  SymbolicLinkName,
IN PUNICODE_STRING  DeviceName 
)

Definition at line 52 of file symlink.c.

54{
59 PAGED_CODE();
60
61 /* Create an SD */
64 if (!NT_SUCCESS(Status)) return Status;
65
66 /* Set the DACL */
68 TRUE,
69 NULL,
70 TRUE);
71 if (!NT_SUCCESS(Status)) return Status;
72
73 /* Initialize the object attributes and create the link */
77 NULL,
84
85 /* Return status */
86 return Status;
87}
#define TRUE
Definition: types.h:120
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
_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

◆ IoDeleteSymbolicLink()

NTSTATUS NTAPI IoDeleteSymbolicLink ( IN PUNICODE_STRING  SymbolicLinkName)

Definition at line 94 of file symlink.c.

95{
99 PAGED_CODE();
100
101 /* Initialize the object attributes and open the link */
105 NULL,
106 NULL);
108 if (!NT_SUCCESS(Status)) return Status;
109
110 /* Make the link temporary and close its handle */
113
114 /* Return status */
115 return Status;
116}
NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
NTSYSAPI NTSTATUS NTAPI ZwMakeTemporaryObject(_In_ HANDLE Handle)
#define DELETE
Definition: nt_native.h:57

Referenced by _Function_class_(), CODE_SEG(), ConDrvDeleteController(), DestroySoundDevice(), DeviceEvtCleanup(), DiskDeleteSymbolicLinks(), DriverEntry(), Ex2ProcessMountPoint(), FdoRemoveAdapter(), FreeBT_AddDevice(), FreeGlobalData(), FsRtlpSetSymbolicLink(), GlobalDeleteSymbolicLink(), InitializeGlobalData(), IoRegisterDeviceInterface(), MountMgrMountedDeviceArrival(), Mx::MxDeleteSymbolicLink(), NdisMDeregisterDevice(), NdisMRegisterDevice(), nfs41_driver_unload(), PartitionHandleRemove(), RamdiskCreateDiskDevice(), ReleaseMemory(), SerialPnpStartDevice(), SysAudio_AddDevice(), SysAudio_Pnp(), Unload(), VfdCreateDevice(), VfdDeleteDevice(), VfdSetLink(), and ViDeleteDevice().