From 168c9879a03d178c87bab44153a32b560d77c1fc Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 31 Mar 2015 20:59:38 +0200 Subject: [PATCH] Rebase against upstream changes. --- ...Add-SetNamedSecurityInfo-test-with-e.patch | 28 ++-- ...ecurity-attributes-from-parent-direc.patch | 121 +++++++++--------- .../wined3d-CSMT_Main/9999-IfDefined.patch | 8 +- 3 files changed, 78 insertions(+), 79 deletions(-) diff --git a/patches/advapi32-Revert_DACL/0003-Revert-advapi32-Add-SetNamedSecurityInfo-test-with-e.patch b/patches/advapi32-Revert_DACL/0003-Revert-advapi32-Add-SetNamedSecurityInfo-test-with-e.patch index 7c048731..28f9757b 100644 --- a/patches/advapi32-Revert_DACL/0003-Revert-advapi32-Add-SetNamedSecurityInfo-test-with-e.patch +++ b/patches/advapi32-Revert_DACL/0003-Revert-advapi32-Add-SetNamedSecurityInfo-test-with-e.patch @@ -1,4 +1,4 @@ -From 99244514ca0c26e263e14d7fdf095083e4686166 Mon Sep 17 00:00:00 2001 +From 0f1815d016ff6cce3fae3e49f7ddb18121e469c4 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 27 Mar 2015 15:32:32 +0100 Subject: Revert "advapi32: Add SetNamedSecurityInfo test with empty DACL." @@ -9,26 +9,26 @@ This reverts commit 02c4f5bd275d70d1dcb48bf95775efa376b50c22. 1 file changed, 4 insertions(+), 75 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c -index dbe52b0..e3c1659 100644 +index bd552d6..7ee881f 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c -@@ -147,7 +147,6 @@ static BOOL (WINAPI *pCreateRestrictedToken)(HANDLE, DWORD, DWORD, PSID_AND_ATTR +@@ -125,7 +125,6 @@ static BOOL (WINAPI *pCreateRestrictedToken)(HANDLE, DWORD, DWORD, PSID_AND_ATTR PLUID_AND_ATTRIBUTES, DWORD, PSID_AND_ATTRIBUTES, PHANDLE); static BOOL (WINAPI *pGetAclInformation)(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS); static BOOL (WINAPI *pGetAce)(PACL,DWORD,LPVOID*); -static NTSTATUS (WINAPI *pNtSetSecurityObject)(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); - - static HMODULE hmod; - static int myARGC; -@@ -174,7 +173,6 @@ static void init(void) + static NTSTATUS (WINAPI *pNtCreateFile)(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG); + static BOOL (WINAPI *pRtlDosPathNameToNtPathName_U)(LPCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*); + static NTSTATUS (WINAPI *pRtlAnsiStringToUnicodeString)(PUNICODE_STRING,PCANSI_STRING,BOOLEAN); +@@ -155,7 +154,6 @@ static void init(void) hntdll = GetModuleHandleA("ntdll.dll"); pNtQueryObject = (void *)GetProcAddress( hntdll, "NtQueryObject" ); pNtAccessCheck = (void *)GetProcAddress( hntdll, "NtAccessCheck" ); - pNtSetSecurityObject = (void *)GetProcAddress(hntdll, "NtSetSecurityObject"); - - hmod = GetModuleHandleA("advapi32.dll"); - pAddAccessAllowedAceEx = (void *)GetProcAddress(hmod, "AddAccessAllowedAceEx"); -@@ -3231,7 +3229,7 @@ static void test_GetNamedSecurityInfoA(void) + pNtCreateFile = (void *)GetProcAddress(hntdll, "NtCreateFile"); + pRtlDosPathNameToNtPathName_U = (void *)GetProcAddress(hntdll, "RtlDosPathNameToNtPathName_U"); + pRtlAnsiStringToUnicodeString = (void *)GetProcAddress(hntdll, "RtlAnsiStringToUnicodeString"); +@@ -3394,7 +3392,7 @@ static void test_GetNamedSecurityInfoA(void) char invalid_path[] = "/an invalid file path"; int users_ace_id = -1, admins_ace_id = -1, i; char software_key[] = "MACHINE\\Software"; @@ -37,7 +37,7 @@ index dbe52b0..e3c1659 100644 SECURITY_DESCRIPTOR_CONTROL control; ACL_SIZE_INFORMATION acl_size; CHAR windows_dir[MAX_PATH]; -@@ -3243,12 +3241,11 @@ static void test_GetNamedSecurityInfoA(void) +@@ -3406,12 +3404,11 @@ static void test_GetNamedSecurityInfoA(void) BOOL owner_defaulted; BOOL group_defaulted; BOOL dacl_defaulted; @@ -51,7 +51,7 @@ index dbe52b0..e3c1659 100644 if (!pSetNamedSecurityInfoA || !pGetNamedSecurityInfoA || !pCreateWellKnownSid) { -@@ -3353,8 +3350,8 @@ static void test_GetNamedSecurityInfoA(void) +@@ -3516,8 +3513,8 @@ static void test_GetNamedSecurityInfoA(void) bret = SetSecurityDescriptorDacl(pSD, TRUE, pDacl, FALSE); ok(bret, "Failed to add ACL to security desciptor.\n"); GetTempFileNameA(".", "foo", 0, tmpfile); @@ -62,7 +62,7 @@ index dbe52b0..e3c1659 100644 SetLastError(0xdeadbeef); error = pSetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pDacl, NULL); -@@ -3406,74 +3403,6 @@ static void test_GetNamedSecurityInfoA(void) +@@ -3569,74 +3566,6 @@ static void test_GetNamedSecurityInfoA(void) } LocalFree(pSD); HeapFree(GetProcessHeap(), 0, user); diff --git a/patches/server-Inherited_ACLs/0001-server-Inherit-security-attributes-from-parent-direc.patch b/patches/server-Inherited_ACLs/0001-server-Inherit-security-attributes-from-parent-direc.patch index 008c8578..e0f94c7f 100644 --- a/patches/server-Inherited_ACLs/0001-server-Inherit-security-attributes-from-parent-direc.patch +++ b/patches/server-Inherited_ACLs/0001-server-Inherit-security-attributes-from-parent-direc.patch @@ -1,77 +1,76 @@ -From 342e7b54a72ca30753ee0b7e2651582574869887 Mon Sep 17 00:00:00 2001 +From 7c47d281a127ddb60ac73cdc373afb3f2a27e2cd Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Fri, 18 Apr 2014 14:08:36 -0600 Subject: server: Inherit security attributes from parent directories on creation. (try 7) --- - dlls/advapi32/tests/security.c | 40 +++++++++++- + dlls/advapi32/tests/security.c | 10 --- server/file.c | 137 +++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 176 insertions(+), 1 deletion(-) + 2 files changed, 137 insertions(+), 10 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c -index df6f8ca..b2f6052 100644 +index 5209c13..e78e5f6 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c -@@ -3116,10 +3116,11 @@ static void test_CreateDirectoryA(void) - ACL_SIZE_INFORMATION acl_size; - ACCESS_ALLOWED_ACE *ace; - SECURITY_ATTRIBUTES sa; -+ char tmpfile[MAX_PATH]; - char tmpdir[MAX_PATH]; -+ HANDLE token, hTemp; - struct _SID *owner; - BOOL bret = TRUE; -- HANDLE token; - DWORD error; - PACL pDacl; +@@ -3234,7 +3234,6 @@ static void test_CreateDirectoryA(void) -@@ -3212,6 +3213,43 @@ static void test_CreateDirectoryA(void) - } - LocalFree(pSD); + bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); + ok(bret, "GetAclInformation failed\n"); +- todo_wine + ok(acl_size.AceCount == 2, "GetAclInformation returned unexpected entry count (%d != 2).\n", + acl_size.AceCount); + if (acl_size.AceCount > 0) +@@ -3242,9 +3241,7 @@ static void test_CreateDirectoryA(void) + bret = pGetAce(pDacl, 0, (VOID **)&ace); + ok(bret, "Inherited Failed to get Current User ACE.\n"); + bret = EqualSid(&ace->SidStart, user_sid); +- todo_wine + ok(bret, "Inherited Current User ACE != Current User SID.\n"); +- todo_wine + ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, + "Inherited Current User ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); + ok(ace->Mask == 0x1f01ff, +@@ -3255,9 +3252,7 @@ static void test_CreateDirectoryA(void) + bret = pGetAce(pDacl, 1, (VOID **)&ace); + ok(bret, "Inherited Failed to get Administators Group ACE.\n"); + bret = EqualSid(&ace->SidStart, admin_sid); +- todo_wine + ok(bret, "Inherited Administators Group ACE != Administators Group SID.\n"); +- todo_wine + ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, + "Inherited Administators Group ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); + ok(ace->Mask == 0x1f01ff, +@@ -3290,7 +3285,6 @@ static void test_CreateDirectoryA(void) -+ /* Test inheritance of ACLs */ -+ strcpy(tmpfile, tmpdir); -+ lstrcatA(tmpfile, "/tmpfile"); -+ hTemp = CreateFileA(tmpfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, -+ FILE_FLAG_DELETE_ON_CLOSE, NULL); -+ error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT, -+ OWNER_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, (PSID*)&owner, -+ NULL, &pDacl, NULL, &pSD); -+ ok(error == ERROR_SUCCESS, "Failed to get permissions on file.\n"); -+ bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); -+ ok(bret, "GetAclInformation failed\n"); -+ ok(acl_size.AceCount == 2, "GetAclInformation returned unexpected entry count (%d != 2).\n", -+ acl_size.AceCount); -+ if (acl_size.AceCount > 0) -+ { -+ bret = pGetAce(pDacl, 0, (VOID **)&ace); -+ ok(bret, "Inherited Failed to get Current User ACE.\n"); -+ bret = EqualSid(&ace->SidStart, user_sid); -+ ok(bret, "Inherited Current User ACE != Current User SID.\n"); -+ ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, -+ "Inherited Current User ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); -+ ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", -+ ace->Mask); -+ } -+ if (acl_size.AceCount > 1) -+ { -+ bret = pGetAce(pDacl, 1, (VOID **)&ace); -+ ok(bret, "Inherited Failed to get Administators Group ACE.\n"); -+ bret = EqualSid(&ace->SidStart, admin_sid); -+ ok(bret, "Inherited Administators Group ACE != Administators Group SID.\n"); -+ ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, -+ "Inherited Administators Group ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); -+ ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", -+ ace->Mask); -+ } -+ CloseHandle(hTemp); -+ - done: - HeapFree(GetProcessHeap(), 0, user); - bret = RemoveDirectoryA(tmpdir); + bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation); + ok(bret, "GetAclInformation failed\n"); +- todo_wine + ok(acl_size.AceCount == 2, "GetAclInformation returned unexpected entry count (%d != 2).\n", + acl_size.AceCount); + if (acl_size.AceCount > 0) +@@ -3298,9 +3292,7 @@ static void test_CreateDirectoryA(void) + bret = pGetAce(pDacl, 0, (VOID **)&ace); + ok(bret, "Inherited Failed to get Current User ACE.\n"); + bret = EqualSid(&ace->SidStart, user_sid); +- todo_wine + ok(bret, "Inherited Current User ACE != Current User SID.\n"); +- todo_wine + ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, + "Inherited Current User ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); + ok(ace->Mask == 0x1f01ff, +@@ -3311,9 +3303,7 @@ static void test_CreateDirectoryA(void) + bret = pGetAce(pDacl, 1, (VOID **)&ace); + ok(bret, "Inherited Failed to get Administators Group ACE.\n"); + bret = EqualSid(&ace->SidStart, admin_sid); +- todo_wine + ok(bret, "Inherited Administators Group ACE != Administators Group SID.\n"); +- todo_wine + ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE, + "Inherited Administators Group ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags); + ok(ace->Mask == 0x1f01ff, diff --git a/server/file.c b/server/file.c -index 09b7811..188e352 100644 +index b6435d1..43be63b 100644 --- a/server/file.c +++ b/server/file.c @@ -71,6 +71,7 @@ struct file @@ -245,5 +244,5 @@ index 09b7811..188e352 100644 return obj; } -- -2.3.2 +2.3.3 diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index fb250315..1c5750dc 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -4508,7 +4508,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -1061,8 +1061,15 @@ +@@ -1070,8 +1070,15 @@ const struct wined3d_shader_reg_maps *reg_maps, const struct shader_glsl_ctx_priv *ctx_priv) { const struct wined3d_shader_version *version = ®_maps->shader_version; @@ -4524,7 +4524,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c unsigned int i, extra_constants_needed = 0; const struct wined3d_shader_lconst *lconst; const char *prefix; -@@ -1303,7 +1310,11 @@ +@@ -1312,7 +1319,11 @@ { UINT in_count = min(vec4_varyings(version->major, gl_info), shader->limits->packed_input); @@ -4536,7 +4536,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c shader_addline(buffer, "varying vec4 %s_link[%u];\n", prefix, in_count); shader_addline(buffer, "vec4 %s_in[%u];\n", prefix, in_count); } -@@ -1344,6 +1355,7 @@ +@@ -1353,6 +1364,7 @@ } else { @@ -4544,7 +4544,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c /* This happens because we do not have proper tracking of the * constant registers that are actually used, only the max * limit of the shader version. -@@ -1352,6 +1364,23 @@ +@@ -1361,6 +1373,23 @@ * it and just create the uniform. */ FIXME("Cannot find a free uniform for vpos correction params\n");