Rebase against 3198fb0c1c3779882944659d52a676319ffcc68d.

This commit is contained in:
Sebastian Lackner 2016-01-15 21:13:24 +01:00
parent a7583fd387
commit 6e91988232
5 changed files with 186 additions and 189 deletions

View File

@ -1,4 +1,4 @@
From db0a81d0a3513d169335286471969b1fb9c38be1 Mon Sep 17 00:00:00 2001
From f86aa112cd8f4f4372ea065866f2a98afa5d9d3b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 4 Aug 2014 00:29:26 +0200
Subject: server: Show warning if message mode is not supported.
@ -13,20 +13,20 @@ missing message mode support.
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 5232027..01cef2c 100644
index cd34194..45ff692 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3091,6 +3091,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
{
struct security_descriptor *sd = NULL;
struct object_attributes objattr;
+ unsigned int flags;
@@ -3507,6 +3507,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
NTSTATUS status;
data_size_t len;
struct object_attributes *objattr;
+ unsigned int flags;
TRACE("(%p %x %s %p %x %d %x %d %d %d %d %d %d %p)\n",
@@ -3109,16 +3110,17 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
status = NTDLL_create_struct_sd( attr->SecurityDescriptor, &sd, &objattr.sd_len );
if (status != STATUS_SUCCESS) return status;
handle, access, debugstr_w(attr->ObjectName->Buffer), iosb, sharing, dispo,
@@ -3519,16 +3520,17 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status;
+ flags = (pipe_type ? NAMED_PIPE_MESSAGE_STREAM_WRITE : 0) |
+ (read_mode ? NAMED_PIPE_MESSAGE_STREAM_READ : 0) |
@ -46,8 +46,8 @@ index 5232027..01cef2c 100644
req->maxinstances = max_inst;
req->outsize = outbound_quota;
req->insize = inbound_quota;
@@ -3128,9 +3130,13 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
wine_server_add_data( req, attr->ObjectName->Buffer, attr->ObjectName->Length );
@@ -3536,9 +3538,13 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
wine_server_add_data( req, objattr, len );
status = wine_server_call( req );
if (!status) *handle = wine_server_ptr_handle( reply->handle );
+ flags &= ~reply->flags; /* contains now all unsupported flags */
@ -57,14 +57,14 @@ index 5232027..01cef2c 100644
+ if (!status && (flags & (NAMED_PIPE_MESSAGE_STREAM_WRITE | NAMED_PIPE_MESSAGE_STREAM_READ)))
+ FIXME("Message mode not supported, falling back to byte mode.\n");
+
NTDLL_free_struct_sd( sd );
RtlFreeHeap( GetProcessHeap(), 0, objattr );
return status;
}
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 047b62c..81741de 100644
index 8d5753a..79ca3a1 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -965,6 +965,7 @@ DECL_HANDLER(create_named_pipe)
@@ -933,6 +933,7 @@ DECL_HANDLER(create_named_pipe)
return;
}
@ -73,10 +73,10 @@ index 047b62c..81741de 100644
if (!objattr_is_valid( objattr, get_req_data_size() ))
diff --git a/server/protocol.def b/server/protocol.def
index fc6bec5..503b02f 100644
index ea5bd61..e83e65e 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2283,6 +2283,7 @@ enum message_type
@@ -2382,6 +2382,7 @@ enum message_type
unsigned int flags;
VARARG(objattr,object_attributes); /* object attributes */
@REPLY
@ -85,5 +85,5 @@ index fc6bec5..503b02f 100644
@END
--
2.1.3
2.6.4

View File

@ -1,17 +1,17 @@
From e3b53e0794d83fc9eb39d78ca673c9144dd9873d Mon Sep 17 00:00:00 2001
From ab880fafaf84e637a978a39488413b25e32f5217 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 | 79 ++++++++++++++++++++++++++++----------------
dlls/ntdll/tests/directory.c | 24 +++++---------
dlls/ntdll/file.c | 76 ++++++++++++++++++++++++++++----------------
dlls/ntdll/tests/directory.c | 24 ++++++--------
include/wine/port.h | 2 ++
libs/port/xattr.c | 20 +++++++++++
4 files changed, 81 insertions(+), 44 deletions(-)
libs/port/xattr.c | 20 ++++++++++++
4 files changed, 80 insertions(+), 42 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 7e32087..dd38995 100644
index a5fbda7..a22ca20 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 )
@ -36,29 +36,29 @@ index 7e32087..dd38995 100644
/**************************************************************************
* FILE_CreateFile (internal)
* Open a file.
@@ -230,6 +245,8 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -230,6 +245,9 @@ 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 )
{
+ struct object_attributes objattr;
+ struct security_descriptor *sd;
+ OBJECT_ATTRIBUTES unix_attr;
+ data_size_t len;
+ struct object_attributes *objattr;
ANSI_STRING unix_name;
BOOL created = FALSE;
@@ -273,39 +290,37 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -273,37 +291,35 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->u.Status = STATUS_SUCCESS;
}
- if (io->u.Status == STATUS_SUCCESS)
+ if (io->u.Status != STATUS_SUCCESS)
{
- struct security_descriptor *sd;
- struct object_attributes objattr;
- OBJECT_ATTRIBUTES unix_attr = *attr;
- data_size_t len;
- struct object_attributes *objattr;
-
- objattr.rootdir = wine_server_obj_handle( attr->RootDirectory );
- objattr.name_len = 0;
- io->u.Status = NTDLL_create_struct_sd( attr->SecurityDescriptor, &sd, &objattr.sd_len );
- if (io->u.Status != STATUS_SUCCESS)
- unix_attr.ObjectName = NULL; /* we send the unix name instead */
- if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
- {
- RtlFreeAnsiString( &unix_name );
- return io->u.Status;
@ -75,18 +75,16 @@ index 7e32087..dd38995 100644
- req->create = disposition;
- req->options = options;
- req->attrs = attributes;
- wine_server_add_data( req, &objattr, sizeof(objattr) );
- if (objattr.sd_len) wine_server_add_data( req, sd, objattr.sd_len );
- wine_server_add_data( req, objattr, len );
- wine_server_add_data( req, unix_name.Buffer, unix_name.Length );
- io->u.Status = wine_server_call( req );
- *handle = wine_server_ptr_handle( reply->handle );
- }
- SERVER_END_REQ;
- NTDLL_free_struct_sd( sd );
+ objattr.rootdir = wine_server_obj_handle( attr->RootDirectory );
+ objattr.name_len = 0;
+ io->u.Status = NTDLL_create_struct_sd( attr->SecurityDescriptor, &sd, &objattr.sd_len );
+ if (io->u.Status != STATUS_SUCCESS)
- RtlFreeHeap( GetProcessHeap(), 0, objattr );
+ unix_attr = *attr;
+ unix_attr.ObjectName = NULL; /* we send the unix name instead */
+ if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
+ {
RtlFreeAnsiString( &unix_name );
+ return io->u.Status;
@ -101,18 +99,17 @@ index 7e32087..dd38995 100644
+ req->create = disposition;
+ req->options = options;
+ req->attrs = attributes;
+ wine_server_add_data( req, &objattr, sizeof(objattr) );
+ if (objattr.sd_len) wine_server_add_data( req, sd, objattr.sd_len );
+ wine_server_add_data( req, objattr, len );
+ wine_server_add_data( req, unix_name.Buffer, unix_name.Length );
+ io->u.Status = wine_server_call( req );
+ *handle = wine_server_ptr_handle( reply->handle );
+ }
+ SERVER_END_REQ;
+ NTDLL_free_struct_sd( sd );
+ RtlFreeHeap( GetProcessHeap(), 0, objattr );
if (io->u.Status == STATUS_SUCCESS)
{
@@ -327,6 +342,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -325,6 +341,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->Information = FILE_OVERWRITTEN;
break;
}
@ -124,7 +121,7 @@ index 7e32087..dd38995 100644
}
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
{
@@ -334,6 +354,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -332,6 +353,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" );
}

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "8d0d1e563ca7697902df9c285ff13ce648697537"
echo "3198fb0c1c3779882944659d52a676319ffcc68d"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 0514f064febfdfdd9321c03793e996b6989fb3d0 Mon Sep 17 00:00:00 2001
From cc8a09773c259881d21c67f3b99b07208bee2cbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 19 Mar 2015 01:22:34 +0100
Subject: server: Implement support for global and local shared memory blocks
@ -20,19 +20,19 @@ Subject: server: Implement support for global and local shared memory blocks
12 files changed, 215 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 7eded42..79cc2c1 100644
index 539944e..493246c 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -97,6 +97,7 @@ extern int server_remove_fd_from_cache( HANDLE handle ) DECLSPEC_HIDDEN;
extern int server_get_unix_fd( HANDLE handle, unsigned int access, int *unix_fd,
int *needs_close, enum server_fd_type *type, unsigned int *options ) DECLSPEC_HIDDEN;
@@ -99,6 +99,7 @@ extern int server_get_unix_fd( HANDLE handle, unsigned int access, int *unix_fd,
extern int server_pipe( int fd[2] ) DECLSPEC_HIDDEN;
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len ) DECLSPEC_HIDDEN;
+extern void *server_get_shared_memory( HANDLE thread ) DECLSPEC_HIDDEN;
/* security descriptors */
NTSTATUS NTDLL_create_struct_sd(PSECURITY_DESCRIPTOR nt_sd, struct security_descriptor **server_sd,
/* module handling */
extern LIST_ENTRY tls_links DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 95111ad..955c392 100644
index 356d631..a91e478 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -972,6 +972,66 @@ done:
@ -114,7 +114,7 @@ index 95111ad..955c392 100644
ntdll_get_thread_data()->wow64_redir = is_wow64;
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 7633232..c56ee1d 100644
index 9f8e909..c91b27a 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -376,6 +376,7 @@ void terminate_thread( int status )
@ -158,7 +158,7 @@ index d573d1f..695389a 100644
/* macros for server requests */
diff --git a/include/winternl.h b/include/winternl.h
index 5420391..624da00 100644
index 3494c00..b733f78 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -366,7 +366,7 @@ typedef struct _TEB
@ -171,10 +171,10 @@ index 5420391..624da00 100644
ULONG ImpersonationLocale; /* f98/1788 */
ULONG IsImpersonating; /* f9c/178c */
diff --git a/server/fd.c b/server/fd.c
index fe778f1..f6f9b42 100644
index e3fe292..00731d1 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2472,6 +2472,33 @@ DECL_HANDLER(write)
@@ -2481,6 +2481,33 @@ DECL_HANDLER(write)
}
}
@ -341,7 +341,7 @@ index 16e7c1c..c180ae5 100644
static int create_temp_file( file_pos_t size )
{
diff --git a/server/protocol.def b/server/protocol.def
index c313006..b8c5abf 100644
index ea5bd61..8ce9973 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -69,6 +69,15 @@ struct request_max_size
@ -360,7 +360,7 @@ index c313006..b8c5abf 100644
/* debug event data */
typedef union
@@ -1203,6 +1212,12 @@ enum server_fd_type
@@ -1204,6 +1213,12 @@ enum server_fd_type
};
@ -374,7 +374,7 @@ index c313006..b8c5abf 100644
@REQ(flush)
int blocking; /* whether it's a blocking flush */
diff --git a/server/thread.c b/server/thread.c
index ba84bee..4bb5149 100644
index 251be1c..198c371 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -196,6 +196,8 @@ static inline void init_thread_structure( struct thread *thread )
@ -419,5 +419,5 @@ index ac9af24..59ef250 100644
struct thread_snapshot
--
2.6.1
2.6.4