Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
088ababf
Commit
088ababf
authored
Jul 15, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Create symbolic links as permanent objects.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
77e74fb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+11
-12
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
088ababf
...
...
@@ -1591,17 +1591,19 @@ NTSTATUS WINAPI IoCreateSymbolicLink( UNICODE_STRING *name, UNICODE_STRING *targ
{
HANDLE
handle
;
OBJECT_ATTRIBUTES
attr
;
NTSTATUS
ret
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
name
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
OBJ_PERMANENT
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
TRACE
(
"%s -> %s
\n
"
,
debugstr_us
(
name
),
debugstr_us
(
target
)
);
/* FIXME: store handle somewhere */
return
NtCreateSymbolicLinkObject
(
&
handle
,
SYMBOLIC_LINK_ALL_ACCESS
,
&
attr
,
target
);
if
(
!
(
ret
=
NtCreateSymbolicLinkObject
(
&
handle
,
SYMBOLIC_LINK_ALL_ACCESS
,
&
attr
,
target
)))
NtClose
(
handle
);
return
ret
;
}
...
...
@@ -1612,17 +1614,19 @@ NTSTATUS WINAPI IoCreateUnprotectedSymbolicLink( UNICODE_STRING *name, UNICODE_S
{
HANDLE
handle
;
OBJECT_ATTRIBUTES
attr
;
NTSTATUS
ret
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
name
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
OBJ_PERMANENT
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
TRACE
(
"%s -> %s
\n
"
,
debugstr_us
(
name
),
debugstr_us
(
target
)
);
/* FIXME: store handle somewhere */
return
NtCreateSymbolicLinkObject
(
&
handle
,
SYMBOLIC_LINK_ALL_ACCESS
,
&
attr
,
target
);
if
(
!
(
ret
=
NtCreateSymbolicLinkObject
(
&
handle
,
SYMBOLIC_LINK_ALL_ACCESS
,
&
attr
,
target
)))
NtClose
(
handle
);
return
ret
;
}
...
...
@@ -1644,12 +1648,7 @@ NTSTATUS WINAPI IoDeleteSymbolicLink( UNICODE_STRING *name )
if
(
!
(
status
=
NtOpenSymbolicLinkObject
(
&
handle
,
0
,
&
attr
)))
{
SERVER_START_REQ
(
unlink_object
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
NtMakeTemporaryObject
(
handle
);
NtClose
(
handle
);
}
return
status
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment