From 6851c5fd4337af38884d16c05695da7e4e059dcc Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Thu, 28 Feb 2013 13:17:39 +0100 Subject: bin PATCH_SO_NAME crack In VersionInfo of Windows executables the FileDescription property originally contained 80 times 'x' character. These executables were marked as PATCH_SO_NAME and later the installer maker perl program replaced the xxxxxxxxxxx to the actual file description which was defined in scp2. WHy was it good, I have no idea. The problem was that it happened after postprocess, where we signed the binaries, thus diigital signature became corrupted. It is better to give file descriptions via makefiles. Change-Id: Id5ad4470bb7a6313b33fbba09d72d9a009163a89 --- crashrep/WinResTarget_crashrep.mk | 5 ++++- crashrep/source/win32/rcheader.txt | 15 ++++++++------- desktop/WinResTarget_sbase.mk | 1 + desktop/WinResTarget_scalc.mk | 1 + desktop/WinResTarget_sdraw.mk | 1 + desktop/WinResTarget_simpress.mk | 1 + desktop/WinResTarget_smath.mk | 1 + desktop/WinResTarget_soffice.mk | 1 + desktop/WinResTarget_sofficebin.mk | 1 + desktop/WinResTarget_sweb.mk | 1 + desktop/WinResTarget_swriter.mk | 1 + desktop/util/officeloader.rc | 2 +- desktop/win32/source/applauncher/launcher.rc | 2 +- scp2/source/base/file_base.scp | 5 ----- scp2/source/calc/file_calc.scp | 5 ----- scp2/source/crashrep/file_crashrep.scp | 5 ----- scp2/source/draw/file_draw.scp | 5 ----- scp2/source/impress/file_impress.scp | 5 ----- scp2/source/math/file_math.scp | 5 ----- scp2/source/ooo/common_brand.scp | 8 -------- scp2/source/writer/file_writer.scp | 8 +------- 21 files changed, 24 insertions(+), 55 deletions(-) diff --git a/crashrep/WinResTarget_crashrep.mk b/crashrep/WinResTarget_crashrep.mk index 6206dc752927..6036157c8bea 100644 --- a/crashrep/WinResTarget_crashrep.mk +++ b/crashrep/WinResTarget_crashrep.mk @@ -14,7 +14,10 @@ $(eval $(call gb_WinResTarget_use_custom_headers,crashrep,\ )) $(eval $(call gb_WinResTarget_add_defs,crashrep,\ - -DVERVARIANT=$(BUILD) \ + -DRES_APP_NAME=crashrep \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Crashreporter" \ + -DVERVARIANT=$(BUILD) \ + -DRES_APP_VENDOR="$(OOO_VENDOR)" \ )) $(eval $(call gb_WinResTarget_set_rcfile,crashrep,crashrep/source/win32/crashrep)) diff --git a/crashrep/source/win32/rcheader.txt b/crashrep/source/win32/rcheader.txt index be3c0600d685..bace84b1ff93 100644 --- a/crashrep/source/win32/rcheader.txt +++ b/crashrep/source/win32/rcheader.txt @@ -58,13 +58,14 @@ VS_VERSION_INFO versioninfo block "040904E4" { // International StringTable - value "CompanyName", "The Document Foundation\0" - value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0" - value "FileVersion", PPS(VER_LEVEL) "\0" - value "ProductVersion", PPS(VER_LEVEL) "\0" - value "OriginalFilename", "SOREPORT.EXE\0" - value "InternalName", "CrashReport\0" - value "LegalCopyright", S_CRIGHT " LibreOffice contributors and/or their affiliates. All rights reserved.\0" + VALUE "CompanyName", PPS(RES_APP_VENDOR) "\0" + VALUE "FileDescription", PPS(RES_APP_FILEDESC) "\0" + VALUE "FileVersion", PPS(VER_LEVEL) "\0" + VALUE "ProductVersion", PPS(VER_LEVEL) "\0" + VALUE "ProductName", "LibreOffice\0" + VALUE "OriginalFilename", PPS(RES_APP_NAME) ".exe\0" + VALUE "InternalName", PPS(RES_APP_NAME) "\0" + VALUE "LegalCopyright", S_CRIGHT " LibreOffice contributors and/or their affiliates. All rights reserved.\0" } } diff --git a/desktop/WinResTarget_sbase.mk b/desktop/WinResTarget_sbase.mk index 008e436b5358..f4f49d4dfe8d 100644 --- a/desktop/WinResTarget_sbase.mk +++ b/desktop/WinResTarget_sbase.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,sbase/src,\ $(eval $(call gb_WinResTarget_add_defs,sbase/src,\ -DRES_APP_NAME=sbase \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Base" \ -DRES_APP_ICON=icons/base_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_scalc.mk b/desktop/WinResTarget_scalc.mk index 89a2d2dd66a9..8781d0df0eb5 100644 --- a/desktop/WinResTarget_scalc.mk +++ b/desktop/WinResTarget_scalc.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,scalc/src,\ $(eval $(call gb_WinResTarget_add_defs,scalc/src,\ -DRES_APP_NAME=scalc \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Calc" \ -DRES_APP_ICON=icons/calc_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_sdraw.mk b/desktop/WinResTarget_sdraw.mk index 44ef3062038e..09a8bf29a7fc 100644 --- a/desktop/WinResTarget_sdraw.mk +++ b/desktop/WinResTarget_sdraw.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,sdraw/src,\ $(eval $(call gb_WinResTarget_add_defs,sdraw/src,\ -DRES_APP_NAME=sdraw \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Draw" \ -DRES_APP_ICON=icons/draw_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_simpress.mk b/desktop/WinResTarget_simpress.mk index 224af5b10fc8..eeb869f7259b 100644 --- a/desktop/WinResTarget_simpress.mk +++ b/desktop/WinResTarget_simpress.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,simpress/src,\ $(eval $(call gb_WinResTarget_add_defs,simpress/src,\ -DRES_APP_NAME=simpress \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Impress" \ -DRES_APP_ICON=icons/impress_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_smath.mk b/desktop/WinResTarget_smath.mk index e36eba1f0136..d90ad7d57c77 100644 --- a/desktop/WinResTarget_smath.mk +++ b/desktop/WinResTarget_smath.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,smath/src,\ $(eval $(call gb_WinResTarget_add_defs,smath/src,\ -DRES_APP_NAME=smath \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Math" \ -DRES_APP_ICON=icons/math_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_soffice.mk b/desktop/WinResTarget_soffice.mk index 5dac62c4334b..54395bc4e0b8 100644 --- a/desktop/WinResTarget_soffice.mk +++ b/desktop/WinResTarget_soffice.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,soffice/src,\ $(eval $(call gb_WinResTarget_add_defs,soffice/src,\ -DRES_APP_NAME=soffice \ + -DRES_APP_FILEDESC="$(PRODUCTNAME)" \ -DRES_APP_ICON=icons/main_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_sofficebin.mk b/desktop/WinResTarget_sofficebin.mk index 54f289bf91c4..98580fb7c1b7 100644 --- a/desktop/WinResTarget_sofficebin.mk +++ b/desktop/WinResTarget_sofficebin.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,sofficebin/src,\ $(eval $(call gb_WinResTarget_add_defs,sofficebin/src,\ -DRES_APP_NAME=soffice \ + -DRES_APP_FILEDESC="$(PRODUCTNAME)" \ -DRES_APP_ICON=icons/main_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_sweb.mk b/desktop/WinResTarget_sweb.mk index 36ba61847e63..845879f198de 100644 --- a/desktop/WinResTarget_sweb.mk +++ b/desktop/WinResTarget_sweb.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,sweb/src,\ $(eval $(call gb_WinResTarget_add_defs,sweb/src,\ -DRES_APP_NAME=sweb \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Writer (Web)" \ -DRES_APP_ICON=icons/writer_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/WinResTarget_swriter.mk b/desktop/WinResTarget_swriter.mk index fc68b9cd3e9a..92f16e98a9cf 100644 --- a/desktop/WinResTarget_swriter.mk +++ b/desktop/WinResTarget_swriter.mk @@ -34,6 +34,7 @@ $(eval $(call gb_WinResTarget_set_include,swriter/src,\ $(eval $(call gb_WinResTarget_add_defs,swriter/src,\ -DRES_APP_NAME=swriter \ + -DRES_APP_FILEDESC="$(PRODUCTNAME) Writer" \ -DRES_APP_ICON=icons/writer_app.ico \ -DVERVARIANT=$(BUILD) \ -DRES_APP_VENDOR="$(OOO_VENDOR)" \ diff --git a/desktop/util/officeloader.rc b/desktop/util/officeloader.rc index bc19b69f6e88..df747b6704bc 100644 --- a/desktop/util/officeloader.rc +++ b/desktop/util/officeloader.rc @@ -44,7 +44,7 @@ VS_VERSION_INFO VERSIONINFO { // International StringTable VALUE "CompanyName", PPS(RES_APP_VENDOR) "\0" - VALUE "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0" + VALUE "FileDescription", PPS(RES_APP_FILEDESC) "\0" VALUE "FileVersion", PPS(VER_LEVEL) "\0" VALUE "ProductVersion", PPS(VER_LEVEL) "\0" VALUE "ProductName", "LibreOffice\0" diff --git a/desktop/win32/source/applauncher/launcher.rc b/desktop/win32/source/applauncher/launcher.rc index a391cd1cb1ae..d2ad4ee2a704 100644 --- a/desktop/win32/source/applauncher/launcher.rc +++ b/desktop/win32/source/applauncher/launcher.rc @@ -44,7 +44,7 @@ VS_VERSION_INFO VERSIONINFO { // International StringTable VALUE "CompanyName", PPS(RES_APP_VENDOR) "\0" - VALUE "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0" + VALUE "FileDescription", PPS(RES_APP_FILEDESC) "\0" VALUE "FileVersion", PPS(VER_LEVEL) "\0" VALUE "ProductVersion", PPS(VER_LEVEL) "\0" VALUE "ProductName", "LibreOffice\0" diff --git a/scp2/source/base/file_base.scp b/scp2/source/base/file_base.scp index 59b0f74d3be5..f684e1d5319c 100644 --- a/scp2/source/base/file_base.scp +++ b/scp2/source/base/file_base.scp @@ -31,12 +31,7 @@ File gid_File_Exe_Sbase BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; Name = EXENAME(sbase); - #ifdef WNT - FileDescription = "%PRODUCTNAME Base"; - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif End #if defined WNT diff --git a/scp2/source/calc/file_calc.scp b/scp2/source/calc/file_calc.scp index 5c4105698489..f5985567846f 100644 --- a/scp2/source/calc/file_calc.scp +++ b/scp2/source/calc/file_calc.scp @@ -82,10 +82,5 @@ File gid_File_Exe_Scalc BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; Name = EXENAME(scalc); - #ifdef WNT - FileDescription = "%PRODUCTNAME Calc"; - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif End diff --git a/scp2/source/crashrep/file_crashrep.scp b/scp2/source/crashrep/file_crashrep.scp index 481d9fcbb119..81c9c497d2ab 100644 --- a/scp2/source/crashrep/file_crashrep.scp +++ b/scp2/source/crashrep/file_crashrep.scp @@ -33,12 +33,7 @@ File gid_Brand_File_Bin_Crashreport BIN_FILE_BODY; Name = EXENAME(crashrep); Dir = gid_Brand_Dir_Program; - #ifdef WNT - FileDescription = "%PRODUCTNAME Crashreporter"; - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif End #ifdef WNT diff --git a/scp2/source/draw/file_draw.scp b/scp2/source/draw/file_draw.scp index 26428ab53ad4..676112f33285 100644 --- a/scp2/source/draw/file_draw.scp +++ b/scp2/source/draw/file_draw.scp @@ -47,10 +47,5 @@ File gid_File_Exe_Sdraw BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; Name = EXENAME(sdraw); - #ifdef WNT - FileDescription = "%PRODUCTNAME Draw"; - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif End diff --git a/scp2/source/impress/file_impress.scp b/scp2/source/impress/file_impress.scp index 1958046e84fe..88cbf694d05e 100644 --- a/scp2/source/impress/file_impress.scp +++ b/scp2/source/impress/file_impress.scp @@ -68,12 +68,7 @@ File gid_File_Exe_Simpress BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; Name = EXENAME(simpress); - #ifdef WNT - FileDescription = "%PRODUCTNAME Impress"; - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif End // configuration files for custom animation effects diff --git a/scp2/source/math/file_math.scp b/scp2/source/math/file_math.scp index 8da10318744f..acbb3c9362a7 100644 --- a/scp2/source/math/file_math.scp +++ b/scp2/source/math/file_math.scp @@ -63,10 +63,5 @@ File gid_File_Exe_Smath BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; Name = EXENAME(smath); - #ifdef WNT - FileDescription = "%PRODUCTNAME Math"; - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif End diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index 5f9f957ccd8f..4194becac3bb 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -495,11 +495,7 @@ File gid_Brand_File_Bin_Soffice Styles = (PACKED, SUBST_FILENAME); #else Name = EXENAME(soffice); - #ifdef WNT - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif #endif End @@ -515,11 +511,7 @@ End File gid_Brand_File_Bin_Soffice_Bin BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; -#if defined WNT - Styles = (PACKED, PATCH_SO_NAME); -#else Styles = (PACKED); -#endif Name = "soffice.bin"; End diff --git a/scp2/source/writer/file_writer.scp b/scp2/source/writer/file_writer.scp index 4d8e65a264aa..d02047f72354 100644 --- a/scp2/source/writer/file_writer.scp +++ b/scp2/source/writer/file_writer.scp @@ -35,12 +35,7 @@ File gid_File_Exe_Swriter BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; Name = EXENAME(swriter); - #ifdef WNT - FileDescription = "%PRODUCTNAME Writer"; - Styles = (PACKED, PATCH_SO_NAME); - #else Styles = (PACKED); - #endif End #ifdef WNT @@ -48,8 +43,7 @@ File gid_File_Exe_Sweb BIN_FILE_BODY; Dir = gid_Brand_Dir_Program; Name = EXENAME(sweb); - FileDescription = "%PRODUCTNAME Writer(Web)"; - Styles = (PACKED, PATCH_SO_NAME); + Styles = (PACKED); End #endif -- cgit