From 96503e88223bb028d483d4068fed65f604cb5762 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 19 Feb 2024 16:23:40 -0600 Subject: [PATCH] Rebase against 1b0d8428dfc13b0fa5ea7d576dfef7aaf8a8c927. --- ...trieve-the-unix-name-on-handles-crea.patch | 102 ------------------ patches/server-unix_name/definition | 3 - ...02-shell32-Add-security-property-tab.patch | 28 ++--- ...t-insert-paste-for-item-context-menu.patch | 28 ++--- ...st-auth-credential-reusage-with-host.patch | 27 ++--- staging/upstream-commit | 2 +- 6 files changed, 40 insertions(+), 150 deletions(-) delete mode 100644 patches/server-unix_name/0001-server-Try-to-retrieve-the-unix-name-on-handles-crea.patch delete mode 100644 patches/server-unix_name/definition diff --git a/patches/server-unix_name/0001-server-Try-to-retrieve-the-unix-name-on-handles-crea.patch b/patches/server-unix_name/0001-server-Try-to-retrieve-the-unix-name-on-handles-crea.patch deleted file mode 100644 index 11cd855b..00000000 --- a/patches/server-unix_name/0001-server-Try-to-retrieve-the-unix-name-on-handles-crea.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 58add0ceab2595c3b309548d94b203659834a38c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= -Date: Mon, 21 Sep 2020 17:27:00 +0300 -Subject: [PATCH] server: Try to retrieve the unix name on handles created from - file descriptors. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46070 -Signed-off-by: Gabriel Ivăncescu ---- - server/fd.c | 39 +++++++++++++++++++++++++++++++++++++++ - server/file.c | 1 + - server/file.h | 2 ++ - 3 files changed, 42 insertions(+) - -diff --git a/server/fd.c b/server/fd.c -index eaebe044f37..db22076944e 100644 ---- a/server/fd.c -+++ b/server/fd.c -@@ -2088,6 +2088,45 @@ struct fd *create_anonymous_fd( const struct fd_ops *fd_user_ops, int unix_fd, s - return NULL; - } - -+void set_unix_name_of_fd( struct fd *fd, const struct stat *fd_st ) -+{ -+#ifdef __linux__ -+ static const char procfs_fmt[] = "/proc/self/fd/%d"; -+ -+ char path[PATH_MAX], procfs_path[sizeof(procfs_fmt) - 2 /* %d */ + 11]; -+ struct stat path_st; -+ ssize_t len; -+ -+ sprintf( procfs_path, procfs_fmt, fd->unix_fd ); -+ len = readlink( procfs_path, path, sizeof(path) ); -+ if (len == -1 || len >= sizeof(path) ) -+ return; -+ path[len] = '\0'; -+ -+ /* Make sure it's an absolute path, has at least one hardlink, and the same inode */ -+ if (path[0] != '/' || stat( path, &path_st ) || path_st.st_nlink < 1 || -+ path_st.st_dev != fd_st->st_dev || path_st.st_ino != fd_st->st_ino) -+ return; -+ -+ if (!(fd->unix_name = mem_alloc( len + 1 ))) -+ return; -+ memcpy( fd->unix_name, path, len + 1 ); -+ -+#elif defined(F_GETPATH) -+ char path[PATH_MAX]; -+ size_t size; -+ -+ if (fcntl( fd->unix_fd, F_GETPATH, path ) == -1 || path[0] != '/') -+ return; -+ -+ size = strlen(path) + 1; -+ if (!(fd->unix_name = mem_alloc( size ))) -+ return; -+ memcpy( fd->unix_name, path, size ); -+ -+#endif -+} -+ - /* retrieve the object that is using an fd */ - void *get_fd_user( struct fd *fd ) - { -diff --git a/server/file.c b/server/file.c -index 76c687833c9..5624e621eac 100644 ---- a/server/file.c -+++ b/server/file.c -@@ -155,6 +155,7 @@ struct file *create_file_for_fd( int fd, unsigned int access, unsigned int shari - release_object( file ); - return NULL; - } -+ set_unix_name_of_fd( file->fd, &st ); - allow_fd_caching( file->fd ); - return file; - } -diff --git a/server/file.h b/server/file.h -index 0ffe0e2c8dc..4d738edc7b7 100644 ---- a/server/file.h -+++ b/server/file.h -@@ -22,6 +22,7 @@ - #define __WINE_SERVER_FILE_H - - #include -+#include - - #include "object.h" - -@@ -85,6 +86,7 @@ extern struct fd *open_fd( struct fd *root, const char *name, struct unicode_str - unsigned int sharing, unsigned int options ); - extern struct fd *create_anonymous_fd( const struct fd_ops *fd_user_ops, - int unix_fd, struct object *user, unsigned int options ); -+extern void set_unix_name_of_fd( struct fd *fd, const struct stat *fd_st ); - extern struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sharing, - unsigned int options ); - extern struct fd *get_fd_object_for_mapping( struct fd *fd, unsigned int access, unsigned int sharing ); --- -2.35.1 - diff --git a/patches/server-unix_name/definition b/patches/server-unix_name/definition deleted file mode 100644 index 41296f24..00000000 --- a/patches/server-unix_name/definition +++ /dev/null @@ -1,3 +0,0 @@ -Fixes: [46070] Basemark Web 3.0 Desktop Launcher crashes -# This is nontrivial to rebase, and upstream is likely to see more churn. -Disabled: true diff --git a/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch b/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch index 01334cff..83624f8d 100644 --- a/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch +++ b/patches/shell32-ACE_Viewer/0002-shell32-Add-security-property-tab.patch @@ -1,4 +1,4 @@ -From b652c99cce554343ab9a25b9b0c043a7ffdf53f6 Mon Sep 17 00:00:00 2001 +From 33f9b705072126232211f32fc7af56d165ad5dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 8 May 2017 23:33:45 +0200 Subject: [PATCH] shell32: Add security property tab. @@ -24,10 +24,10 @@ index 743df597ee4..9342384b6ba 100644 SOURCES = \ diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc -index 264947d337d..90898b7ed98 100644 +index c11ef8f464c..efdfeb7dcf3 100644 --- a/dlls/shell32/shell32.rc +++ b/dlls/shell32/shell32.rc -@@ -202,6 +202,33 @@ the folder?" +@@ -201,6 +201,33 @@ the folder?" IDS_RUNDLG_BROWSE_FILTER_EXE "Executable files (*.exe)" IDS_RUNDLG_BROWSE_FILTER_ALL "All files (*.*)" @@ -62,10 +62,10 @@ index 264947d337d..90898b7ed98 100644 /* FIXME: Some will be unused until desktop.ini support is implemented */ IDS_PROGRAMS "Programs" diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c -index 181ff36787e..cc43b710c29 100644 +index 9057d7c0175..3c71855a3e5 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c -@@ -36,13 +36,132 @@ +@@ -36,15 +36,134 @@ #include "shresdef.h" #include "shlwapi.h" @@ -81,6 +81,8 @@ index 181ff36787e..cc43b710c29 100644 #define FCIDM_BASE 0x7000 + #define VERB_ID_OFFSET 0x200 + +/* According to https://blogs.msdn.microsoft.com/oldnewthing/20070726-00/?p=25833 */ +static const SI_ACCESS access_rights_files[] = +{ @@ -195,11 +197,11 @@ index 181ff36787e..cc43b710c29 100644 + return CONTAINING_RECORD(iface, struct FileSecurity, ISecurityInformation_iface); +} + - typedef struct + struct verb { - IContextMenu3 IContextMenu3_iface; -@@ -634,6 +753,269 @@ error: - free(props); + WCHAR *desc; +@@ -659,6 +778,269 @@ static void get_filetype(LPCITEMIDLIST pidl, WCHAR filetype[MAX_PATH]) + } } +static HRESULT WINAPI filesecurity_QueryInterface(ISecurityInformation *iface, REFIID riid, void **ppv) @@ -468,7 +470,7 @@ index 181ff36787e..cc43b710c29 100644 #define MAX_PROP_PAGES 99 static void DoOpenProperties(ContextMenu *This, HWND hwnd) -@@ -713,6 +1095,7 @@ static void DoOpenProperties(ContextMenu *This, HWND hwnd) +@@ -708,6 +1090,7 @@ static void DoOpenProperties(ContextMenu *This, HWND hwnd) if (SUCCEEDED(ret)) { init_file_properties_pages(lpDo, Properties_AddPropSheetCallback, (LPARAM)&psh); @@ -477,10 +479,10 @@ index 181ff36787e..cc43b710c29 100644 hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletype, MAX_PROP_PAGES - psh.nPages, lpDo); if (hpsxa != NULL) diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h -index 210046e729d..0f3a64f16d2 100644 +index 0a365e62276..ef502a8686f 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h -@@ -155,6 +155,33 @@ +@@ -158,6 +158,33 @@ #define IDS_FILEOP_FROM 337 #define IDS_FILEOP_PREFLIGHT 338 @@ -515,5 +517,5 @@ index 210046e729d..0f3a64f16d2 100644 #define IDS_RECYCLEBIN_FOLDER_NAME 8964 -- -2.42.0 +2.43.0 diff --git a/patches/shell32-Context_Menu/0003-shell32-Implement-insert-paste-for-item-context-menu.patch b/patches/shell32-Context_Menu/0003-shell32-Implement-insert-paste-for-item-context-menu.patch index fece549e..5eab3c0d 100644 --- a/patches/shell32-Context_Menu/0003-shell32-Implement-insert-paste-for-item-context-menu.patch +++ b/patches/shell32-Context_Menu/0003-shell32-Implement-insert-paste-for-item-context-menu.patch @@ -1,4 +1,4 @@ -From bf2a4d41fff53ff3ffccca694b22c051043dde62 Mon Sep 17 00:00:00 2001 +From cb562a6cf3aefe59d6173838e03030d0d882cf75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 2 Apr 2016 01:39:40 +0200 Subject: [PATCH] shell32: Implement insert/paste for item context menus. @@ -9,11 +9,11 @@ Subject: [PATCH] shell32: Implement insert/paste for item context menus. 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc -index c6280edac6b..09b90a9805b 100644 +index a50fab6815d..dc418069100 100644 --- a/dlls/shell32/shell32.rc +++ b/dlls/shell32/shell32.rc -@@ -99,6 +99,7 @@ BEGIN - MENUITEM SEPARATOR +@@ -95,6 +95,7 @@ BEGIN + BEGIN MENUITEM "C&ut", FCIDM_SHVIEW_CUT MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM "&Paste", FCIDM_SHVIEW_INSERT @@ -21,10 +21,10 @@ index c6280edac6b..09b90a9805b 100644 MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK MENUITEM "&Delete", FCIDM_SHVIEW_DELETE diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c -index 43cbea2ec87..047fe00e39d 100644 +index 9057d7c0175..aaa726ec14a 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c -@@ -185,6 +185,8 @@ typedef struct +@@ -73,6 +73,8 @@ typedef struct BOOL desktop; } ContextMenu; @@ -33,7 +33,7 @@ index 43cbea2ec87..047fe00e39d 100644 static inline ContextMenu *impl_from_IContextMenu3(IContextMenu3 *iface) { return CONTAINING_RECORD(iface, ContextMenu, IContextMenu3_iface); -@@ -294,6 +296,30 @@ static UINT max_menu_id(HMENU hmenu, UINT offset, UINT last) +@@ -188,6 +190,30 @@ static UINT max_menu_id(HMENU hmenu, UINT offset, UINT last) return max_id; } @@ -64,15 +64,15 @@ index 43cbea2ec87..047fe00e39d 100644 static HRESULT WINAPI ItemMenu_QueryContextMenu( IContextMenu3 *iface, HMENU hmenu, -@@ -304,6 +330,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu( - { +@@ -199,6 +225,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu( ContextMenu *This = impl_from_IContextMenu3(iface); + MENUITEMINFOW mi; INT uIDMax; + DWORD attr = SFGAO_CANRENAME; TRACE("(%p)->(%p %d 0x%x 0x%x 0x%x )\n", This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags); -@@ -341,6 +368,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu( +@@ -232,6 +259,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu( SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION); @@ -82,7 +82,7 @@ index 43cbea2ec87..047fe00e39d 100644 if(uFlags & ~CMF_CANRENAME) RemoveMenu(hmenu, FCIDM_SHVIEW_RENAME - FCIDM_BASE + idCmdFirst, MF_BYCOMMAND); else -@@ -351,16 +381,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu( +@@ -242,16 +272,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu( if (!This->apidl || This->cidl > 1) enable |= MFS_DISABLED; else @@ -102,7 +102,7 @@ index 43cbea2ec87..047fe00e39d 100644 return MAKE_HRESULT(SEVERITY_SUCCESS, 0, uIDMax-idCmdFirst); } return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0); -@@ -1183,6 +1211,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand( +@@ -791,6 +819,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand( TRACE("Verb FCIDM_SHVIEW_CUT\n"); DoCopyOrCut(This, lpcmi->hwnd, TRUE); break; @@ -113,7 +113,7 @@ index 43cbea2ec87..047fe00e39d 100644 case FCIDM_SHVIEW_PROPERTIES: TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n"); DoOpenProperties(This, lpcmi->hwnd); -@@ -1243,6 +1275,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c +@@ -845,6 +877,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c case FCIDM_SHVIEW_COPY: cmdW = L"copy"; break; @@ -124,5 +124,5 @@ index 43cbea2ec87..047fe00e39d 100644 cmdW = L"link"; break; -- -2.33.0 +2.43.0 diff --git a/patches/wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch b/patches/wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch index 9b7d9d37..ffcd48c0 100644 --- a/patches/wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch +++ b/patches/wininet-Cleanup/0002-wininet-tests-Test-auth-credential-reusage-with-host.patch @@ -1,25 +1,18 @@ -From 303a7d54eca11f350f200bf3747646349a84536f Mon Sep 17 00:00:00 2001 +From ce812bbd59547f6fb224da3351586912f35d2e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 15 May 2015 21:18:37 +0200 Subject: [PATCH] wininet/tests: Test auth credential reusage with host override. --- - dlls/wininet/tests/http.c | 93 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 93 insertions(+) + dlls/wininet/tests/http.c | 92 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 92 insertions(+) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c -index b06bd6c04d1..59689baf87e 100644 +index 4c2c33ddd84..47236d5184d 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c -@@ -2496,12 +2496,27 @@ static DWORD CALLBACK server_thread(LPVOID param) - { - send(c, okmsg, sizeof(okmsg)-1, 0); - } -+ - if (strstr(buffer, "HEAD /test_large_content")) - { - char msg[sizeof(largemsg) + 16]; +@@ -2899,6 +2899,20 @@ static DWORD CALLBACK server_thread(LPVOID param) sprintf(msg, largemsg, content_length); send(c, msg, strlen(msg), 0); } @@ -37,10 +30,10 @@ index b06bd6c04d1..59689baf87e 100644 + else + send(c, noauthmsg, sizeof noauthmsg-1, 0); + } - shutdown(c, 2); - closesocket(c); - c = -1; -@@ -3200,6 +3215,84 @@ static void test_header_override(int port) + if (strstr(buffer, "GET /proxy.pac")) + { + char script[sizeof(proxy_pac) + 16]; +@@ -3609,6 +3623,84 @@ static void test_header_override(int port) InternetCloseHandle(req); InternetCloseHandle(con); InternetCloseHandle(ses); @@ -126,5 +119,5 @@ index b06bd6c04d1..59689baf87e 100644 static void test_connection_closing(int port) -- -2.17.1 +2.43.0 diff --git a/staging/upstream-commit b/staging/upstream-commit index ddd8b274..9650be2d 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -90103fa07e5c23c7500c7d33e538b0610bf3c27d +1b0d8428dfc13b0fa5ea7d576dfef7aaf8a8c927