Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
cf188c83
Commit
cf188c83
authored
Feb 06, 2021
by
Erich E. Hoover
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Strip the wine prefix from reparse point paths external to the prefix.
Signed-off-by:
Erich E. Hoover
<
erich.e.hoover@gmail.com
>
parent
ddc31659
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
file.c
dlls/ntdll/unix/file.c
+29
-0
No files found.
dlls/ntdll/unix/file.c
View file @
cf188c83
...
...
@@ -6031,6 +6031,33 @@ static void ignore_server_ioctl_struct_holes( ULONG code, const void *in_buffer,
}
void
strip_external_path
(
char
*
path
,
SIZE_T
*
len
)
{
static
char
*
unix_root
=
NULL
;
static
int
unix_root_len
=
0
;
if
(
unix_root
==
NULL
)
{
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
WCHAR
*
nt_name
;
if
(
unix_to_nt_file_name
(
"/"
,
&
nt_name
)
!=
STATUS_SUCCESS
)
return
;
nameW
.
Buffer
=
nt_name
;
nameW
.
Length
=
wcslen
(
nt_name
)
*
sizeof
(
WCHAR
);
InitializeObjectAttributes
(
&
attr
,
&
nameW
,
OBJ_CASE_INSENSITIVE
,
0
,
NULL
);
nt_to_unix_file_name
(
&
attr
,
&
unix_root
,
FILE_OPEN
);
free
(
nt_name
);
if
(
unix_root
==
NULL
)
return
;
unix_root_len
=
strlen
(
unix_root
);
}
if
(
strncmp
(
unix_root
,
path
,
unix_root_len
)
!=
0
)
return
;
*
len
-=
unix_root_len
;
memmove
(
path
,
&
path
[
unix_root_len
-
1
],
*
len
+
1
);
}
/*
* Retrieve the unix name corresponding to a file handle, remove that directory, and then symlink
* the requested directory to the location of the old directory.
...
...
@@ -6175,6 +6202,8 @@ have_dest:
goto
cleanup
;
}
}
else
strip_external_path
(
unix_dest
,
&
unix_dest_len
);
TRACE
(
"Linking %s to %s
\n
"
,
unix_src
,
&
unix_dest
[
relative_offset
]
);
...
...
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