You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 9eaa37249948c4d77df37cf3649ad1db59412fcb.
[amstream-GetMultiMediaStream] Removed patch to implement AMStream GetMultiMediaStream functions (accepted upstream). [mscoree-Buffer_Overflow] Removed patch to avoid buffer overflow in mono print handler for large strings (accepted upstream). [ntdll-Fix_Free] Removed patch to fix a handle leak in RemoveDirectoryW (accepted upstream). [ntdll-FreeBSD_Directory] Removed patch to use POSIX implementation to enumerate directory content on FreeBSD (fixed upstream).
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
From 119ed83d6517c6a92ff8d30f671ab4c02ebb700c Mon Sep 17 00:00:00 2001
|
||||
From 547a16f5cfaae95ca1bc3e18833132ae89b8e88e Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 20 Aug 2014 15:28:00 -0600
|
||||
Subject: ntdll: Implement storing DOS attributes in NtCreateFile.
|
||||
|
||||
---
|
||||
dlls/ntdll/file.c | 76 ++++++++++++++++++++++++++++----------------
|
||||
dlls/ntdll/tests/directory.c | 20 ++++++------
|
||||
dlls/ntdll/tests/directory.c | 24 +++++++-------
|
||||
include/wine/port.h | 2 ++
|
||||
libs/port/xattr.c | 20 ++++++++++++
|
||||
4 files changed, 80 insertions(+), 38 deletions(-)
|
||||
4 files changed, 82 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index bcedc42..9b54854 100644
|
||||
index 37446a9..0b33acd 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -219,6 +219,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
@@ -224,6 +224,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ index bcedc42..9b54854 100644
|
||||
/**************************************************************************
|
||||
* FILE_CreateFile (internal)
|
||||
* Open a file.
|
||||
@@ -230,6 +245,10 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
@@ -235,6 +250,10 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
ULONG attributes, ULONG sharing, ULONG disposition,
|
||||
ULONG options, PVOID ea_buffer, ULONG ea_length )
|
||||
{
|
||||
@@ -47,7 +47,7 @@ index bcedc42..9b54854 100644
|
||||
ANSI_STRING unix_name;
|
||||
BOOL created = FALSE;
|
||||
|
||||
@@ -273,37 +292,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
@@ -278,37 +297,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
io->u.Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ index bcedc42..9b54854 100644
|
||||
|
||||
if (io->u.Status == STATUS_SUCCESS)
|
||||
{
|
||||
@@ -325,6 +341,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
@@ -330,6 +346,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
io->Information = FILE_OVERWRITTEN;
|
||||
break;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ index bcedc42..9b54854 100644
|
||||
}
|
||||
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
|
||||
{
|
||||
@@ -332,6 +353,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
@@ -337,6 +358,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" );
|
||||
}
|
||||
|
||||
@@ -130,47 +130,51 @@ index bcedc42..9b54854 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
|
||||
index f93c623..aa8e97f 100644
|
||||
index 431471a..e579573 100644
|
||||
--- a/dlls/ntdll/tests/directory.c
|
||||
+++ b/dlls/ntdll/tests/directory.c
|
||||
@@ -51,7 +51,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *
|
||||
@@ -55,7 +55,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *
|
||||
|
||||
/* The attribute sets to test */
|
||||
static struct testfile_s {
|
||||
- BOOL todo; /* set if it doesn't work on wine yet */
|
||||
BOOL attr_done; /* set if attributes were tested for this file already */
|
||||
const DWORD attr; /* desired attribute */
|
||||
const char *name; /* filename to use */
|
||||
@@ -60,14 +59,14 @@ static struct testfile_s {
|
||||
WCHAR name[20]; /* filename to use */
|
||||
@@ -63,16 +62,16 @@ static struct testfile_s {
|
||||
const char *description; /* for error messages */
|
||||
int nfound; /* How many were found (expect 1) */
|
||||
WCHAR nameW[20]; /* unicode version of name (filled in later) */
|
||||
} testfiles[] = {
|
||||
- { 0, 0, FILE_ATTRIBUTE_NORMAL, "longfilename.tmp", NULL, "normal" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_NORMAL, "n.tmp", NULL, "normal" },
|
||||
- { 1, 0, FILE_ATTRIBUTE_HIDDEN, "h.tmp", NULL, "hidden" },
|
||||
- { 1, 0, FILE_ATTRIBUTE_SYSTEM, "s.tmp", NULL, "system" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, "d.tmp", NULL, "directory" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, ".", NULL, ". directory" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, "..", NULL, ".. directory" },
|
||||
- { 0, 0, 0, NULL }
|
||||
+ { 0, FILE_ATTRIBUTE_NORMAL, "longfilename.tmp", NULL, "normal" },
|
||||
+ { 0, FILE_ATTRIBUTE_NORMAL, "n.tmp", NULL, "normal" },
|
||||
+ { 0, FILE_ATTRIBUTE_HIDDEN, "h.tmp", NULL, "hidden" },
|
||||
+ { 0, FILE_ATTRIBUTE_SYSTEM, "s.tmp", NULL, "system" },
|
||||
+ { 0, FILE_ATTRIBUTE_DIRECTORY, "d.tmp", NULL, "directory" },
|
||||
+ { 0, FILE_ATTRIBUTE_DIRECTORY, ".", NULL, ". directory" },
|
||||
+ { 0, FILE_ATTRIBUTE_DIRECTORY, "..", NULL, ".. directory" },
|
||||
+ { 0, 0, NULL }
|
||||
- { 0, 0, FILE_ATTRIBUTE_NORMAL, {'l','o','n','g','f','i','l','e','n','a','m','e','.','t','m','p'}, "normal" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_NORMAL, {'n','.','t','m','p',}, "normal" },
|
||||
- { 1, 0, FILE_ATTRIBUTE_HIDDEN, {'h','.','t','m','p',}, "hidden" },
|
||||
- { 1, 0, FILE_ATTRIBUTE_SYSTEM, {'s','.','t','m','p',}, "system" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, {'d','.','t','m','p',}, "directory" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_NORMAL, {0xe9,'a','.','t','m','p'}, "normal" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_NORMAL, {0xc9,'b','.','t','m','p'}, "normal" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_NORMAL, {'e','a','.','t','m','p'}, "normal" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, {'.'}, ". directory" },
|
||||
- { 0, 0, FILE_ATTRIBUTE_DIRECTORY, {'.','.'}, ".. directory" }
|
||||
+ { 0, FILE_ATTRIBUTE_NORMAL, {'l','o','n','g','f','i','l','e','n','a','m','e','.','t','m','p'}, "normal" },
|
||||
+ { 0, FILE_ATTRIBUTE_NORMAL, {'n','.','t','m','p',}, "normal" },
|
||||
+ { 0, FILE_ATTRIBUTE_HIDDEN, {'h','.','t','m','p',}, "hidden" },
|
||||
+ { 0, FILE_ATTRIBUTE_SYSTEM, {'s','.','t','m','p',}, "system" },
|
||||
+ { 0, FILE_ATTRIBUTE_DIRECTORY, {'d','.','t','m','p',}, "directory" },
|
||||
+ { 0, FILE_ATTRIBUTE_NORMAL, {0xe9,'a','.','t','m','p'}, "normal" },
|
||||
+ { 0, FILE_ATTRIBUTE_NORMAL, {0xc9,'b','.','t','m','p'}, "normal" },
|
||||
+ { 0, FILE_ATTRIBUTE_NORMAL, {'e','a','.','t','m','p'}, "normal" },
|
||||
+ { 0, FILE_ATTRIBUTE_DIRECTORY, {'.'}, ". directory" },
|
||||
+ { 0, FILE_ATTRIBUTE_DIRECTORY, {'.','.'}, ".. directory" }
|
||||
};
|
||||
static const int max_test_dir_size = 20; /* size of above plus some for .. etc */
|
||||
|
||||
@@ -148,8 +147,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
|
||||
if (namelen != len || memcmp(nameW, testfiles[i].nameW, len*sizeof(WCHAR)))
|
||||
static const int test_dir_count = sizeof(testfiles) / sizeof(testfiles[0]);
|
||||
static const int max_test_dir_size = sizeof(testfiles) / sizeof(testfiles[0]) + 5; /* size of above plus some for .. etc */
|
||||
@@ -162,8 +161,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
|
||||
if (namelen != len || memcmp(nameW, testfiles[i].name, len*sizeof(WCHAR)))
|
||||
continue;
|
||||
if (!testfiles[i].attr_done) {
|
||||
- todo_wine_if (testfiles[i].todo)
|
||||
- ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib);
|
||||
+ ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib);
|
||||
- ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
|
||||
+ ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
|
||||
testfiles[i].attr_done = TRUE;
|
||||
}
|
||||
testfiles[i].nfound++;
|
||||
@@ -216,5 +220,5 @@ index 6918c99..683e7a6 100644
|
||||
+#endif
|
||||
+}
|
||||
--
|
||||
2.7.1
|
||||
2.8.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 866f4f12b34e5dfdf24da8074c5d9d4aa7a7f77a Mon Sep 17 00:00:00 2001
|
||||
From 80ea1e2a8dacb2ca57549236efb236669cc9153f Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 20 Aug 2014 11:26:48 -0600
|
||||
Subject: ntdll: Perform the Unix-style hidden file check within the unified
|
||||
@@ -11,10 +11,10 @@ Subject: ntdll: Perform the Unix-style hidden file check within the unified
|
||||
3 files changed, 10 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
|
||||
index 41e7115..3975612 100644
|
||||
index 223b842..8b13cdc 100644
|
||||
--- a/dlls/ntdll/directory.c
|
||||
+++ b/dlls/ntdll/directory.c
|
||||
@@ -1209,17 +1209,17 @@ static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **contex
|
||||
@@ -1306,17 +1306,17 @@ static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **contex
|
||||
*
|
||||
* Check if the specified file should be hidden based on its name and the show dot files option.
|
||||
*/
|
||||
@@ -37,16 +37,16 @@ index 41e7115..3975612 100644
|
||||
if (p == end || *p != '.') return FALSE;
|
||||
/* make sure it isn't '.' or '..' */
|
||||
if (p + 1 == end) return FALSE;
|
||||
@@ -1434,9 +1434,6 @@ static union file_directory_info *append_entry( void *info_ptr, IO_STATUS_BLOCK
|
||||
TRACE( "ignoring file %s\n", long_name );
|
||||
return NULL;
|
||||
@@ -1548,9 +1548,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
|
||||
TRACE( "ignoring file %s\n", names->unix_name );
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
- if (!show_dot_files && long_name[0] == '.' && long_name[1] && (long_name[1] != '.' || long_name[2]))
|
||||
- if (!show_dot_files && names->long_name[0] == '.' && names->long_name[1] &&
|
||||
- (names->long_name[1] != '.' || names->long_name[2]))
|
||||
- attributes |= FILE_ATTRIBUTE_HIDDEN;
|
||||
-
|
||||
total_len = dir_info_size( class, long_len );
|
||||
if (io->Information + total_len > max_length)
|
||||
{
|
||||
|
||||
if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 0b33acd..24c66bc 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
|
Reference in New Issue
Block a user