From 6fb052e890eae7855f48dca7cd2fdcf720943534 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 16 Jan 2016 05:23:16 +0100 Subject: [PATCH] Rebase against 7350682aa6ec7702f26f76ccbaa7d2f11a85c93d. --- ...ing-if-message-mode-is-not-supported.patch | 19 +++++----- ...storing-DOS-attributes-in-NtCreateFi.patch | 16 ++++---- patches/patchinstall.sh | 2 +- ...ly-store-the-full-security-descripto.patch | 38 +++++++++---------- 4 files changed, 36 insertions(+), 39 deletions(-) diff --git a/patches/kernel32-Named_Pipe/0005-server-Show-warning-if-message-mode-is-not-supported.patch b/patches/kernel32-Named_Pipe/0005-server-Show-warning-if-message-mode-is-not-supported.patch index 047b429d..ea93862e 100644 --- a/patches/kernel32-Named_Pipe/0005-server-Show-warning-if-message-mode-is-not-supported.patch +++ b/patches/kernel32-Named_Pipe/0005-server-Show-warning-if-message-mode-is-not-supported.patch @@ -1,4 +1,4 @@ -From f86aa112cd8f4f4372ea065866f2a98afa5d9d3b Mon Sep 17 00:00:00 2001 +From 71b17871cc75d035ca35b9f8641b6604cc9bb600 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 4 Aug 2014 00:29:26 +0200 Subject: server: Show warning if message mode is not supported. @@ -13,10 +13,10 @@ missing message mode support. 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index cd34194..45ff692 100644 +index 4cac2ca..d585d6c 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c -@@ -3507,6 +3507,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access, +@@ -3506,6 +3506,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access, NTSTATUS status; data_size_t len; struct object_attributes *objattr; @@ -24,7 +24,7 @@ index cd34194..45ff692 100644 TRACE("(%p %x %s %p %x %d %x %d %d %d %d %d %d %p)\n", handle, access, debugstr_w(attr->ObjectName->Buffer), iosb, sharing, dispo, -@@ -3519,16 +3520,17 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access, +@@ -3518,15 +3519,16 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access, if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status; @@ -35,7 +35,6 @@ index cd34194..45ff692 100644 SERVER_START_REQ( create_named_pipe ) { req->access = access; - req->attributes = attr->Attributes; req->options = options; req->sharing = sharing; - req->flags = @@ -46,7 +45,7 @@ index cd34194..45ff692 100644 req->maxinstances = max_inst; req->outsize = outbound_quota; req->insize = inbound_quota; -@@ -3536,9 +3538,13 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access, +@@ -3534,9 +3536,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 ); @@ -61,10 +60,10 @@ index cd34194..45ff692 100644 return status; } diff --git a/server/named_pipe.c b/server/named_pipe.c -index 8d5753a..79ca3a1 100644 +index acedcc5..94c28b1 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c -@@ -933,6 +933,7 @@ DECL_HANDLER(create_named_pipe) +@@ -937,6 +937,7 @@ DECL_HANDLER(create_named_pipe) return; } @@ -73,10 +72,10 @@ index 8d5753a..79ca3a1 100644 if (!objattr_is_valid( objattr, get_req_data_size() )) diff --git a/server/protocol.def b/server/protocol.def -index ea5bd61..e83e65e 100644 +index 4becb8f..9facc59 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -2382,6 +2382,7 @@ enum message_type +@@ -2376,6 +2376,7 @@ enum message_type unsigned int flags; VARARG(objattr,object_attributes); /* object attributes */ @REPLY diff --git a/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch b/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch index 2202e5f3..3cd71720 100644 --- a/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch +++ b/patches/ntdll-DOS_Attributes/0004-ntdll-Implement-storing-DOS-attributes-in-NtCreateFi.patch @@ -1,17 +1,17 @@ -From ab880fafaf84e637a978a39488413b25e32f5217 Mon Sep 17 00:00:00 2001 +From 12b1d27763ce61ee38b3694e68c44a96d9b17102 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 20 Aug 2014 15:28:00 -0600 Subject: ntdll: Implement storing DOS attributes in NtCreateFile. --- - dlls/ntdll/file.c | 76 ++++++++++++++++++++++++++++---------------- + dlls/ntdll/file.c | 74 ++++++++++++++++++++++++++++---------------- dlls/ntdll/tests/directory.c | 24 ++++++-------- include/wine/port.h | 2 ++ libs/port/xattr.c | 20 ++++++++++++ - 4 files changed, 80 insertions(+), 42 deletions(-) + 4 files changed, 79 insertions(+), 41 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index a5fbda7..a22ca20 100644 +index 3dfcbf8..13787ba 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 ) @@ -46,7 +46,7 @@ index a5fbda7..a22ca20 100644 ANSI_STRING unix_name; BOOL created = FALSE; -@@ -273,37 +291,35 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT +@@ -273,36 +291,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT io->u.Status = STATUS_SUCCESS; } @@ -70,7 +70,6 @@ index a5fbda7..a22ca20 100644 - SERVER_START_REQ( create_file ) - { - req->access = access; -- req->attributes = attr->Attributes; - req->sharing = sharing; - req->create = disposition; - req->options = options; @@ -94,7 +93,6 @@ index a5fbda7..a22ca20 100644 + SERVER_START_REQ( create_file ) + { + req->access = access; -+ req->attributes = attr->Attributes; + req->sharing = sharing; + req->create = disposition; + req->options = options; @@ -109,7 +107,7 @@ index a5fbda7..a22ca20 100644 if (io->u.Status == STATUS_SUCCESS) { -@@ -325,6 +341,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT +@@ -324,6 +340,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT io->Information = FILE_OVERWRITTEN; break; } @@ -121,7 +119,7 @@ index a5fbda7..a22ca20 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 +@@ -331,6 +352,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" ); } diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index e9e5fc18..efc8aed6 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "3198fb0c1c3779882944659d52a676319ffcc68d" + echo "7350682aa6ec7702f26f76ccbaa7d2f11a85c93d" } # Show version information diff --git a/patches/server-Stored_ACLs/0004-server-Temporarily-store-the-full-security-descripto.patch b/patches/server-Stored_ACLs/0004-server-Temporarily-store-the-full-security-descripto.patch index b1e02269..ee07b9a0 100644 --- a/patches/server-Stored_ACLs/0004-server-Temporarily-store-the-full-security-descripto.patch +++ b/patches/server-Stored_ACLs/0004-server-Temporarily-store-the-full-security-descripto.patch @@ -1,4 +1,4 @@ -From 2884ad4a99443701819564254dc21289d6f13aec Mon Sep 17 00:00:00 2001 +From e3abe63e7f3f1c3543e9bafb4b06ac41b4f4273f Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 30 Mar 2015 12:50:21 +0200 Subject: server: Temporarily store the full security descriptor for file @@ -12,10 +12,10 @@ Subject: server: Temporarily store the full security descriptor for file 4 files changed, 74 insertions(+), 40 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c -index 40cf23c..57adc4e 100644 +index eb9e816..77a1fcf 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c -@@ -3311,7 +3311,6 @@ static void test_CreateDirectoryA(void) +@@ -3318,7 +3318,6 @@ static void test_CreateDirectoryA(void) ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); @@ -23,7 +23,7 @@ index 40cf23c..57adc4e 100644 ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", acl_size.AceCount); LocalFree(pSD); -@@ -3387,7 +3386,6 @@ static void test_CreateDirectoryA(void) +@@ -3394,7 +3393,6 @@ static void test_CreateDirectoryA(void) ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); @@ -31,7 +31,7 @@ index 40cf23c..57adc4e 100644 ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", acl_size.AceCount); LocalFree(pSD); -@@ -3533,7 +3531,6 @@ static void test_CreateDirectoryA(void) +@@ -3540,7 +3538,6 @@ static void test_CreateDirectoryA(void) ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error); bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); ok(bret, "GetAclInformation failed\n"); @@ -39,7 +39,7 @@ index 40cf23c..57adc4e 100644 ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n", acl_size.AceCount); LocalFree(pSD); -@@ -4508,22 +4505,22 @@ static void test_GetSecurityInfo(void) +@@ -4517,22 +4514,22 @@ static void test_GetSecurityInfo(void) bret = pGetAce(pDacl, 0, (VOID **)&ace); ok(bret, "Failed to get Current User ACE.\n"); bret = EqualSid(&ace->SidStart, user_sid); @@ -69,10 +69,10 @@ index 40cf23c..57adc4e 100644 LocalFree(pSD); CloseHandle(obj); diff --git a/server/change.c b/server/change.c -index b334fd1..2e98f5c 100644 +index b3ee681..a631925 100644 --- a/server/change.c +++ b/server/change.c -@@ -1022,7 +1022,8 @@ static int dir_add_to_existing_notify( struct dir *dir ) +@@ -1030,7 +1030,8 @@ static int dir_add_to_existing_notify( struct dir *dir ) #endif /* USE_INOTIFY */ @@ -82,7 +82,7 @@ index b334fd1..2e98f5c 100644 { struct dir *dir; -@@ -1041,6 +1042,11 @@ struct object *create_dir_obj( struct fd *fd, unsigned int access, mode_t mode ) +@@ -1049,6 +1050,11 @@ struct object *create_dir_obj( struct fd *fd, unsigned int access, mode_t mode ) dir->uid = ~(uid_t)0; set_fd_user( fd, &dir_fd_ops, &dir->obj ); @@ -95,10 +95,10 @@ index b334fd1..2e98f5c 100644 return &dir->obj; diff --git a/server/file.c b/server/file.c -index 011c29f..175fbce 100644 +index 5d1466b..7c5e02b 100644 --- a/server/file.c +++ b/server/file.c -@@ -172,7 +172,8 @@ struct file *create_file_for_fd_obj( struct fd *fd, unsigned int access, unsigne +@@ -173,7 +173,8 @@ struct file *create_file_for_fd_obj( struct fd *fd, unsigned int access, unsigne return file; } @@ -108,7 +108,7 @@ index 011c29f..175fbce 100644 { struct file *file = alloc_object( &file_ops ); -@@ -183,6 +184,12 @@ static struct object *create_file_obj( struct fd *fd, unsigned int access, mode_ +@@ -184,6 +185,12 @@ static struct object *create_file_obj( struct fd *fd, unsigned int access, mode_ file->fd = fd; grab_object( fd ); set_fd_user( fd, &file_fd_ops, &file->obj ); @@ -121,7 +121,7 @@ index 011c29f..175fbce 100644 return &file->obj; } -@@ -249,11 +256,11 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si +@@ -250,11 +257,11 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si if (!fd) goto done; if (S_ISDIR(mode)) @@ -135,7 +135,7 @@ index 011c29f..175fbce 100644 release_object( fd ); -@@ -562,46 +569,66 @@ mode_t sd_to_mode( const struct security_descriptor *sd, const SID *owner ) +@@ -570,46 +577,66 @@ mode_t sd_to_mode( const struct security_descriptor *sd, const SID *owner ) int set_file_sd( struct object *obj, struct fd *fd, mode_t *mode, uid_t *uid, const struct security_descriptor *sd, unsigned int set_info ) { @@ -227,15 +227,15 @@ index 011c29f..175fbce 100644 } static struct object *file_open_file( struct object *obj, unsigned int access, -@@ -733,7 +760,10 @@ DECL_HANDLER(create_file) +@@ -741,7 +768,10 @@ DECL_HANDLER(create_file) if ((file = create_file( root_fd, name, name_len, req->access, req->sharing, req->create, req->options, req->attrs, sd ))) { -- reply->handle = alloc_handle( current->process, file, req->access, req->attributes ); +- reply->handle = alloc_handle( current->process, file, req->access, objattr->attributes ); + if (get_error() == STATUS_OBJECT_NAME_EXISTS) -+ reply->handle = alloc_handle( current->process, file, req->access, req->attributes ); ++ reply->handle = alloc_handle( current->process, file, req->access, objattr->attributes ); + else -+ reply->handle = alloc_handle_no_access_check( current->process, file, req->access, req->attributes ); ++ reply->handle = alloc_handle_no_access_check( current->process, file, req->access, objattr->attributes ); release_object( file ); } if (root_fd) release_object( root_fd ); @@ -254,5 +254,5 @@ index b9e27e2..3274c5c 100644 /* completion */ -- -2.4.2 +2.6.4