Updated patchset for ObjectTypeInformation and fix typename for various additional wineserver object types.

This commit is contained in:
Sebastian Lackner 2015-06-03 18:32:16 +02:00
parent 32f681f893
commit 2412d1f4eb
10 changed files with 355 additions and 86 deletions

2
debian/changelog vendored
View File

@ -7,6 +7,8 @@ wine-staging (1.7.45) UNRELEASED; urgency=low
RegGetValueW.
* Updated patch to fix opening clipboard from multiple threads (partially
fixed upstream).
* Updated patchset for ObjectTypeInformation and fix typename for various
additional wineserver object types.
* Added patches for FileRenameInformation support (fixes Wine Staging Bug
#296).
* Added additional tests for behaviour of opening readonly files.

View File

@ -1723,9 +1723,13 @@ if test "$enable_server_ACL_Compat" -eq 1; then
fi
if test "$enable_server_Inherited_ACLs" -eq 1; then
if test "$enable_server_ObjectTypeInformation" -gt 1; then
abort "Patchset server-ObjectTypeInformation disabled, but server-Inherited_ACLs depends on that."
fi
if test "$enable_server_Stored_ACLs" -gt 1; then
abort "Patchset server-Stored_ACLs disabled, but server-Inherited_ACLs depends on that."
fi
enable_server_ObjectTypeInformation=1
enable_server_Stored_ACLs=1
fi
@ -4198,6 +4202,27 @@ if test "$enable_secur32_ANSI_NTLM_Credentials" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-ObjectTypeInformation
# |
# | Modified files:
# | * dlls/ntdll/om.c, dlls/ntdll/tests/om.c, server/change.c, server/completion.c, server/directory.c, server/file.c,
# | server/handle.c, server/object.h, server/protocol.def
# |
if test "$enable_server_ObjectTypeInformation" -eq 1; then
patch_apply server-ObjectTypeInformation/0001-ntdll-Implemenent-ObjectTypeInformation-class-suppor.patch
patch_apply server-ObjectTypeInformation/0002-ntdll-tests-Add-a-few-more-ObjectTypeInformation-tes.patch
patch_apply server-ObjectTypeInformation/0003-server-Fix-type-name-of-IoCompletion.patch
patch_apply server-ObjectTypeInformation/0004-server-Fix-type-name-of-File.patch
patch_apply server-ObjectTypeInformation/0005-server-Fix-type-name-of-directory-file.patch
(
echo '+ { "Qian Hong", "ntdll: Implemenent ObjectTypeInformation class support in NtQueryObject.", 2 },';
echo '+ { "Qian Hong", "ntdll/tests: Add a few more ObjectTypeInformation tests.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of IoCompletion.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of File.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of directory file.", 1 },';
) >> "$patchlist"
fi
# Patchset server-RootDirectory_File
# |
# | Modified files:
@ -4366,18 +4391,6 @@ if test "$enable_server_Key_State" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-ObjectTypeInformation
# |
# | Modified files:
# | * dlls/ntdll/om.c, dlls/ntdll/tests/om.c, server/directory.c, server/handle.c, server/object.h, server/protocol.def
# |
if test "$enable_server_ObjectTypeInformation" -eq 1; then
patch_apply server-ObjectTypeInformation/0001-ntdll-Implemenent-ObjectTypeInformation-class-suppor.patch
(
echo '+ { "Qian Hong", "ntdll: Implemenent ObjectTypeInformation class support in NtQueryObject.", 1 },';
) >> "$patchlist"
fi
# Patchset server-OpenClipboard
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,4 +1,4 @@
From 5779586de8e1059d7f88edf45d5d9ed59eca1b46 Mon Sep 17 00:00:00 2001
From ded8679bb992d9d82bdeeb5a78b38100586906a0 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 18 Apr 2014 15:21:00 -0600
Subject: server: Add compatibility code for handling the old method of storing
@ -9,7 +9,7 @@ Subject: server: Add compatibility code for handling the old method of storing
1 file changed, 167 insertions(+), 3 deletions(-)
diff --git a/server/file.c b/server/file.c
index 617c373..9adca0d 100644
index 6fbb71c..3b56a9b 100644
--- a/server/file.c
+++ b/server/file.c
@@ -72,6 +72,7 @@ struct file
@ -19,8 +19,8 @@ index 617c373..9adca0d 100644
+static struct security_descriptor *get_xattr_acls( int fd, const SID *user, const SID *group );
static void file_dump( struct object *obj, int verbose );
static struct fd *file_get_fd( struct object *obj );
@@ -308,6 +309,7 @@ static struct security_descriptor *file_get_parent_sd( struct fd *root, const ch
static struct object_type *file_get_type( struct object *obj );
@@ -313,6 +314,7 @@ static struct security_descriptor *file_get_parent_sd( struct fd *root, const ch
mode_t parent_mode = 0555;
char *p, *parent_name;
struct fd *parent_fd;
@ -28,7 +28,7 @@ index 617c373..9adca0d 100644
int unix_fd;
if (!(parent_name = mem_alloc( child_len + 1 ))) return NULL;
@@ -340,6 +342,9 @@ static struct security_descriptor *file_get_parent_sd( struct fd *root, const ch
@@ -345,6 +347,9 @@ static struct security_descriptor *file_get_parent_sd( struct fd *root, const ch
if (unix_fd != -1)
{
parent_sd = get_xattr_sd( unix_fd );
@ -38,7 +38,7 @@ index 617c373..9adca0d 100644
if (parent_sd)
{
sd = inherit_sd( parent_sd, is_dir );
@@ -623,6 +628,163 @@ static void convert_generic_sd( struct security_descriptor *sd )
@@ -636,6 +641,163 @@ static void convert_generic_sd( struct security_descriptor *sd )
}
}
@ -202,7 +202,7 @@ index 617c373..9adca0d 100644
static struct security_descriptor *get_xattr_sd( int fd )
{
struct security_descriptor *sd;
@@ -652,6 +814,7 @@ struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode
@@ -665,6 +827,7 @@ struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode
int unix_fd = get_unix_fd( fd );
struct stat st;
struct security_descriptor *sd;
@ -210,7 +210,7 @@ index 617c373..9adca0d 100644
if (unix_fd == -1 || fstat( unix_fd, &st ) == -1)
return obj->sd;
@@ -661,10 +824,11 @@ struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode
@@ -674,10 +837,11 @@ struct security_descriptor *get_file_sd( struct object *obj, struct fd *fd, mode
(st.st_uid == *uid))
return obj->sd;
@ -226,5 +226,5 @@ index 617c373..9adca0d 100644
*mode = st.st_mode;
--
2.3.5
2.4.2

View File

@ -1,4 +1,4 @@
From a6f078d87958db4e0eb404e7f7cc2d603b92869c Mon Sep 17 00:00:00 2001
From ae940533d113a6419605d09c874561af4cd292d4 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 18 Apr 2014 14:08:36 -0600
Subject: server: Inherit security attributes from parent directories on
@ -10,7 +10,7 @@ Subject: server: Inherit security attributes from parent directories on
2 files changed, 141 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 945542e..403c637 100644
index a85bb38..7be1db6 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3280,7 +3280,7 @@ static void test_CreateDirectoryA(void)
@ -50,7 +50,7 @@ index 945542e..403c637 100644
CloseHandle(hTemp);
diff --git a/server/file.c b/server/file.c
index 8bcf6ee..617c373 100644
index 49f193d..6fbb71c 100644
--- a/server/file.c
+++ b/server/file.c
@@ -71,6 +71,7 @@ struct file
@ -60,8 +60,8 @@ index 8bcf6ee..617c373 100644
+static struct security_descriptor *get_xattr_sd( int fd );
static void file_dump( struct object *obj, int verbose );
static struct fd *file_get_fd( struct object *obj );
@@ -220,11 +221,142 @@ static void set_xattr_sd( int fd, const struct security_descriptor *sd )
static struct object_type *file_get_type( struct object *obj );
@@ -225,11 +226,142 @@ static void set_xattr_sd( int fd, const struct security_descriptor *sd )
xattr_fset( fd, WINE_XATTR_SD, buffer, len );
}
@ -204,7 +204,7 @@ index 8bcf6ee..617c373 100644
struct object *obj = NULL;
struct fd *fd;
int flags;
@@ -253,6 +385,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
@@ -258,6 +390,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
default: set_error( STATUS_INVALID_PARAMETER ); goto done;
}
@ -215,7 +215,7 @@ index 8bcf6ee..617c373 100644
if (sd)
{
const SID *owner = sd_get_owner( sd );
@@ -292,6 +428,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
@@ -297,6 +433,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
release_object( fd );
done:
@ -224,5 +224,5 @@ index 8bcf6ee..617c373 100644
return obj;
}
--
2.3.5
2.4.2

View File

@ -1,2 +1,3 @@
Depends: server-Stored_ACLs
Depends: server-ObjectTypeInformation
Fixes: [34406] Support for inherited file ACLs

View File

@ -1,57 +1,29 @@
From 01286698557b8f3b0515d94fd03d3866f0a3ede9 Mon Sep 17 00:00:00 2001
From f9347e49de382cb0fd257333f23a5cbc4a8b1de5 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Fri, 8 May 2015 18:03:24 +0800
Date: Tue, 2 Jun 2015 22:09:48 +0800
Subject: ntdll: Implemenent ObjectTypeInformation class support in
NtQueryObject.
NtQueryObject. (try 2)
---
dlls/ntdll/om.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/om.c | 28 +++++++++++-----------
server/directory.c | 5 ----
server/handle.c | 18 +++++++++++++++
server/object.h | 5 ++++
server/protocol.def | 9 ++++++++
6 files changed, 110 insertions(+), 19 deletions(-)
dlls/ntdll/om.c | 36 ++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/om.c | 22 +++++++++++-----------
server/directory.c | 5 -----
server/handle.c | 18 ++++++++++++++++++
server/object.h | 5 +++++
server/protocol.def | 9 +++++++++
6 files changed, 79 insertions(+), 16 deletions(-)
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index b337444..00820ce 100644
index b337444..5acc3cd 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -150,6 +150,70 @@ NTSTATUS WINAPI NtQueryObject(IN HANDLE handle,
@@ -150,6 +150,42 @@ NTSTATUS WINAPI NtQueryObject(IN HANDLE handle,
SERVER_END_REQ;
}
break;
+ case ObjectTypeInformation:
+ {
+ OBJECT_TYPE_INFORMATION *p = ptr;
+ ANSI_STRING unix_name;
+
+ /* first try as a file object */
+
+ if (!(status = server_get_unix_name( handle, &unix_name )))
+ {
+ static const WCHAR type_fileW[] = {'F','i','l','e','\0'};
+ int type_size = sizeof(type_fileW);
+
+ if (len < sizeof(*p))
+ status = STATUS_INFO_LENGTH_MISMATCH;
+ else if (len < sizeof(*p) + type_size)
+ status = STATUS_BUFFER_OVERFLOW;
+ else
+ {
+ p->TypeName.Buffer = (WCHAR *)(p + 1);
+ p->TypeName.Length = type_size - sizeof(WCHAR);
+ p->TypeName.MaximumLength = type_size;
+ memcpy( p->TypeName.Buffer, type_fileW, type_size );
+
+ }
+ if (used_len) *used_len = sizeof(*p) + type_size;
+ RtlFreeAnsiString( &unix_name );
+ break;
+ }
+ else if (status != STATUS_OBJECT_TYPE_MISMATCH) break;
+
+ /* not a file, treat as a generic object */
+
+ SERVER_START_REQ( get_object_typename )
+ {
@ -89,10 +61,10 @@ index b337444..00820ce 100644
{
OBJECT_DATA_INFORMATION* p = ptr;
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 96e1e6e..d3bdbdc 100644
index a7ac95f..945effa 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -688,8 +688,8 @@ static void test_query_object(void)
@@ -690,8 +690,8 @@ static void test_query_object(void)
len = 0;
status = pNtQueryObject( handle, ObjectTypeInformation, buffer, 0, &len );
@ -103,7 +75,7 @@ index 96e1e6e..d3bdbdc 100644
len = 0;
status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(UNICODE_STRING), &len );
@@ -698,8 +698,8 @@ static void test_query_object(void)
@@ -700,8 +700,8 @@ static void test_query_object(void)
len = 0;
status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(OBJECT_TYPE_INFORMATION), &len );
@ -114,7 +86,7 @@ index 96e1e6e..d3bdbdc 100644
len = 0;
status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len );
@@ -720,17 +720,17 @@ static void test_query_object(void)
@@ -722,17 +722,17 @@ static void test_query_object(void)
len = 0;
memset( buffer, 0, sizeof(buffer) );
status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
@ -138,25 +110,17 @@ index 96e1e6e..d3bdbdc 100644
pNtClose( handle );
@@ -775,12 +775,12 @@ static void test_query_object(void)
@@ -777,7 +777,7 @@ static void test_query_object(void)
len = 0;
memset( buffer, 0, sizeof(buffer) );
status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
- todo_wine ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
- todo_wine ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
+ ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
+ ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
todo_wine ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
str = (UNICODE_STRING *)buffer;
expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
- todo_wine ok( len >= expected_len, "unexpected len %u\n", len );
- todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ),
+ ok( len >= expected_len, "unexpected len %u\n", len );
+ ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ),
"wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
pNtClose( handle );
diff --git a/server/directory.c b/server/directory.c
index 7c5e7db..00cac46 100644
index 471b844..4fd7c6c 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -41,11 +41,6 @@
@ -201,7 +165,7 @@ index 5043ff7..3fc608d 100644
{
data_size_t sd_size = get_req_data_size();
diff --git a/server/object.h b/server/object.h
index 00bef38..50f19b7 100644
index b59811f..bf956e1 100644
--- a/server/object.h
+++ b/server/object.h
@@ -105,6 +105,11 @@ struct object
@ -237,5 +201,5 @@ index 9c4dab4..7d2a345 100644
@REQ(unlink_object)
obj_handle_t handle; /* handle to the object */
--
2.4.0
2.4.2

View File

@ -0,0 +1,117 @@
From 43ed4ed6ee16114f8b313cf1f7d717c51bb08df6 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 2 Jun 2015 22:10:06 +0800
Subject: ntdll/tests: Add a few more ObjectTypeInformation tests.
---
dlls/ntdll/tests/om.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 67 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 945effa..8470238 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -54,6 +54,7 @@ static NTSTATUS (WINAPI *pNtCreateKeyedEvent)( HANDLE *, ACCESS_MASK, const OBJE
static NTSTATUS (WINAPI *pNtOpenKeyedEvent)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES * );
static NTSTATUS (WINAPI *pNtWaitForKeyedEvent)( HANDLE, const void *, BOOLEAN, const LARGE_INTEGER * );
static NTSTATUS (WINAPI *pNtReleaseKeyedEvent)( HANDLE, const void *, BOOLEAN, const LARGE_INTEGER * );
+static NTSTATUS (WINAPI *pNtCreateIoCompletion)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, ULONG);
#define KEYEDEVENT_WAIT 0x0001
#define KEYEDEVENT_WAKE 0x0002
@@ -674,12 +675,16 @@ static void test_query_object(void)
'\\','t','e','s','t','_','e','v','e','n','t'};
static const WCHAR type_event[] = {'E','v','e','n','t'};
static const WCHAR type_file[] = {'F','i','l','e'};
+ static const WCHAR type_iocompletion[] = {'I','o','C','o','m','p','l','e','t','i','o','n'};
+ static const WCHAR type_directory[] = {'D','i','r','e','c','t','o','r','y'};
+ static const WCHAR type_section[] = {'S','e','c','t','i','o','n'};
HANDLE handle;
char buffer[1024];
NTSTATUS status;
ULONG len, expected_len;
UNICODE_STRING *str;
- char dir[MAX_PATH];
+ char dir[MAX_PATH], tmp_path[MAX_PATH], file1[MAX_PATH + 16];
+ LARGE_INTEGER size;
handle = CreateEventA( NULL, FALSE, FALSE, "test_event" );
@@ -786,6 +791,66 @@ static void test_query_object(void)
"wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
pNtClose( handle );
+
+ GetTempPathA(MAX_PATH, tmp_path);
+ GetTempFileNameA(tmp_path, "foo", 0, file1);
+ handle = CreateFileA(file1, GENERIC_WRITE | DELETE, 0, NULL, CREATE_ALWAYS, 0, 0);
+ len = 0;
+ memset( buffer, 0, sizeof(buffer) );
+ status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
+ ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
+ todo_wine ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
+ str = (UNICODE_STRING *)buffer;
+ expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
+ todo_wine ok( len >= expected_len, "unexpected len %u\n", len );
+ todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ),
+ "wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
+ DeleteFileA( file1 );
+ pNtClose( handle );
+
+ status = pNtCreateIoCompletion( &handle, IO_COMPLETION_ALL_ACCESS, NULL, 0 );
+ ok( status == STATUS_SUCCESS, "NtCreateIoCompletion failed %x\n", status);
+ len = 0;
+ memset( buffer, 0, sizeof(buffer) );
+ status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
+ ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
+ ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
+ str = (UNICODE_STRING *)buffer;
+ expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
+ ok( len >= expected_len, "unexpected len %u\n", len );
+ todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_iocompletion, sizeof(type_iocompletion) ),
+ "wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
+ pNtClose( handle );
+
+ status = pNtCreateDirectoryObject( &handle, DIRECTORY_QUERY, NULL );
+ ok(status == STATUS_SUCCESS, "Failed to create Directory %08x\n", status);
+ len = 0;
+ memset( buffer, 0, sizeof(buffer) );
+ status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
+ ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
+ ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
+ str = (UNICODE_STRING *)buffer;
+ expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
+ ok( len >= expected_len, "unexpected len %u\n", len );
+ ok( str->Buffer && !memcmp( str->Buffer, type_directory, sizeof(type_directory) ),
+ "wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
+ pNtClose( handle );
+
+ size.u.LowPart = 256;
+ size.u.HighPart = 0;
+ status = pNtCreateSection( &handle, SECTION_MAP_WRITE, NULL, &size, PAGE_READWRITE, SEC_COMMIT, 0 );
+ ok( status == STATUS_SUCCESS , "NtCreateSection returned %x\n", status );
+ len = 0;
+ memset( buffer, 0, sizeof(buffer) );
+ status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
+ ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
+ ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
+ str = (UNICODE_STRING *)buffer;
+ expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
+ ok( len >= expected_len, "unexpected len %u\n", len );
+ ok( str->Buffer && !memcmp( str->Buffer, type_section, sizeof(type_section) ),
+ "wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
+ pNtClose( handle );
}
static void test_type_mismatch(void)
@@ -1164,6 +1229,7 @@ START_TEST(om)
pNtOpenKeyedEvent = (void *)GetProcAddress(hntdll, "NtOpenKeyedEvent");
pNtWaitForKeyedEvent = (void *)GetProcAddress(hntdll, "NtWaitForKeyedEvent");
pNtReleaseKeyedEvent = (void *)GetProcAddress(hntdll, "NtReleaseKeyedEvent");
+ pNtCreateIoCompletion = (void *)GetProcAddress(hntdll, "NtCreateIoCompletion");
test_case_sensitive();
test_namespace_pipe();
--
2.4.2

View File

@ -0,0 +1,39 @@
From 91dff1ddeeec333d99dced491b362ada546a73f7 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 2 Jun 2015 22:10:14 +0800
Subject: server: Fix type name of IoCompletion.
---
dlls/ntdll/tests/om.c | 2 +-
server/completion.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 8470238..b7ef99e 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -818,7 +818,7 @@ static void test_query_object(void)
str = (UNICODE_STRING *)buffer;
expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
ok( len >= expected_len, "unexpected len %u\n", len );
- todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_iocompletion, sizeof(type_iocompletion) ),
+ ok( str->Buffer && !memcmp( str->Buffer, type_iocompletion, sizeof(type_iocompletion) ),
"wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
pNtClose( handle );
diff --git a/server/completion.c b/server/completion.c
index 0c26c37..77c72cc 100644
--- a/server/completion.c
+++ b/server/completion.c
@@ -109,7 +109,7 @@ static void completion_dump( struct object *obj, int verbose )
static struct object_type *completion_get_type( struct object *obj )
{
- static const WCHAR name[] = {'C','o','m','p','l','e','t','i','o','n'};
+ static const WCHAR name[] = {'I','o','C','o','m','p','l','e','t','i','o','n'};
static const struct unicode_str str = { name, sizeof(name) };
return get_object_type( &str );
}
--
2.4.2

View File

@ -0,0 +1,67 @@
From b5241b8f1a33a215b4695bcf7b5abc7e9967c347 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 2 Jun 2015 22:10:25 +0800
Subject: server: Fix type name of File.
---
dlls/ntdll/tests/om.c | 6 +++---
server/file.c | 10 +++++++++-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index b7ef99e..1fa9c47 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -799,11 +799,11 @@ static void test_query_object(void)
memset( buffer, 0, sizeof(buffer) );
status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
- todo_wine ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
+ ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
str = (UNICODE_STRING *)buffer;
expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
- todo_wine ok( len >= expected_len, "unexpected len %u\n", len );
- todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ),
+ ok( len >= expected_len, "unexpected len %u\n", len );
+ ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ),
"wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
DeleteFileA( file1 );
pNtClose( handle );
diff --git a/server/file.c b/server/file.c
index 792bbe0..e70304f 100644
--- a/server/file.c
+++ b/server/file.c
@@ -64,6 +64,7 @@ struct file
static unsigned int generic_file_map_access( unsigned int access );
static void file_dump( struct object *obj, int verbose );
+static struct object_type *file_get_type( struct object *obj );
static struct fd *file_get_fd( struct object *obj );
static struct security_descriptor *file_get_sd( struct object *obj );
static int file_set_sd( struct object *obj, const struct security_descriptor *sd, unsigned int set_info );
@@ -77,7 +78,7 @@ static const struct object_ops file_ops =
{
sizeof(struct file), /* size */
file_dump, /* dump */
- no_get_type, /* get_type */
+ file_get_type, /* get_type */
add_queue, /* add_queue */
remove_queue, /* remove_queue */
default_fd_signaled, /* signaled */
@@ -273,6 +274,13 @@ static void file_dump( struct object *obj, int verbose )
fprintf( stderr, "File fd=%p\n", file->fd );
}
+static struct object_type *file_get_type( struct object *obj )
+{
+ static const WCHAR name[] = {'F','i','l','e'};
+ static const struct unicode_str str = { name, sizeof(name) };
+ return get_object_type( &str );
+}
+
static int file_get_poll_events( struct fd *fd )
{
struct file *file = get_fd_user( fd );
--
2.4.2

View File

@ -0,0 +1,66 @@
From 66b8b246b653b67230e6cd030b0733da1fb2de5b Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 2 Jun 2015 22:10:37 +0800
Subject: server: Fix type name of directory file.
---
dlls/ntdll/tests/om.c | 6 +++---
server/change.c | 10 +++++++++-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 1fa9c47..0f9008a 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -783,11 +783,11 @@ static void test_query_object(void)
memset( buffer, 0, sizeof(buffer) );
status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len );
ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status );
- todo_wine ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
+ ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len );
str = (UNICODE_STRING *)buffer;
expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR);
- todo_wine ok( len >= expected_len, "unexpected len %u\n", len );
- todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ),
+ ok( len >= expected_len, "unexpected len %u\n", len );
+ ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ),
"wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer );
pNtClose( handle );
diff --git a/server/change.c b/server/change.c
index 11d9b93..59d1819 100644
--- a/server/change.c
+++ b/server/change.c
@@ -148,13 +148,14 @@ static struct security_descriptor *dir_get_sd( struct object *obj );
static int dir_set_sd( struct object *obj, const struct security_descriptor *sd,
unsigned int set_info );
static void dir_dump( struct object *obj, int verbose );
+static struct object_type *dir_get_type( struct object *obj );
static void dir_destroy( struct object *obj );
static const struct object_ops dir_ops =
{
sizeof(struct dir), /* size */
dir_dump, /* dump */
- no_get_type, /* get_type */
+ dir_get_type, /* get_type */
add_queue, /* add_queue */
remove_queue, /* remove_queue */
default_fd_signaled, /* signaled */
@@ -250,6 +251,13 @@ static void dir_dump( struct object *obj, int verbose )
fprintf( stderr, "Dirfile fd=%p filter=%08x\n", dir->fd, dir->filter );
}
+static struct object_type *dir_get_type( struct object *obj )
+{
+ static const WCHAR name[] = {'F','i','l','e'};
+ static const struct unicode_str str = { name, sizeof(name) };
+ return get_object_type( &str );
+}
+
/* enter here directly from SIGIO signal handler */
void do_change_notify( int unix_fd )
{
--
2.4.2