ReactOS 0.4.15-dev-8096-ga0eec98
symlink.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/io/iomgr/symlink.c
5 * PURPOSE: I/O Wrappers for Symbolic Links
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 * Eric Kohl
8 */
9
10/* INCLUDES *****************************************************************/
11
12#include <ntoskrnl.h>
13#define NDEBUG
14#include <debug.h>
15
16/* FUNCTIONS ****************************************************************/
17
18/*
19 * @implemented
20 */
25{
29 PAGED_CODE();
30
31 /* Initialize the object attributes and create the link */
35 NULL,
42
43 /* Return status */
44 return Status;
45}
46
47/*
48 * @implemented
49 */
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}
88
89/*
90 * @implemented
91 */
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}
117
118/* EOF */
#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 TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
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
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject(_Out_ PHANDLE SymbolicLinkHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
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)
NTSYSAPI NTSTATUS NTAPI ZwMakeTemporaryObject(_In_ HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
#define SYMBOLIC_LINK_ALL_ACCESS
Definition: nt_native.h:1267
#define DELETE
Definition: nt_native.h:57
PSECURITY_DESCRIPTOR SePublicDefaultSd
Definition: sd.c:16
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
_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
_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