mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Updated ntdll-Junction_Points patchset
Fixes: https://bugs.winehq.org/show_bug.cgi?id=56647
This commit is contained in:
parent
6a6e7da97e
commit
b0595d928b
@ -0,0 +1,51 @@
|
||||
From 246a50e7cf09bd1d77d327e170c2d7432e0d5f5e Mon Sep 17 00:00:00 2001
|
||||
From: Lorenzo Ferrillo <lorenzofersteam@live.it>
|
||||
Date: Mon, 6 May 2024 23:46:44 +0200
|
||||
Subject: [PATCH] Return correct status value if handle is not a reparse point
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/file.c | 19 ++++++++++++++-----
|
||||
1 file changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 2bfb9b7d051..93732543ae4 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -3944,9 +3944,11 @@ NTSTATUS get_reparse_point_unix(const char *unix_name, REPARSE_DATA_BUFFER *buff
|
||||
char *p;
|
||||
|
||||
ret = readlink( unix_name, link_path, sizeof(link_path) );
|
||||
+
|
||||
if (ret < 0)
|
||||
{
|
||||
- status = errno_to_status( errno );
|
||||
+ if (errno == EINVAL) status = STATUS_NOT_A_REPARSE_POINT;
|
||||
+ else status = errno_to_status( errno );
|
||||
goto cleanup;
|
||||
}
|
||||
link_path_len = ret;
|
||||
@@ -7303,10 +7305,17 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
}
|
||||
case FSCTL_GET_REPARSE_POINT:
|
||||
{
|
||||
- REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer;
|
||||
- ULONG size = out_size;
|
||||
- status = get_reparse_point( handle, buffer, &size );
|
||||
- io->Information = size;
|
||||
+ io->Information = 0;
|
||||
+ if (out_buffer){
|
||||
+ REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer;
|
||||
+ ULONG size = out_size;
|
||||
+ status = get_reparse_point( handle, buffer, &size );
|
||||
+ if (status == STATUS_SUCCESS)
|
||||
+ io->Information = size;
|
||||
+ }
|
||||
+ else {
|
||||
+ status = STATUS_INVALID_USER_BUFFER;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
case FSCTL_SET_REPARSE_POINT:
|
||||
--
|
||||
2.43.0
|
||||
|
Loading…
Reference in New Issue
Block a user