Skip to content

Commit b99231f

Browse files
committed
build: Fix condition to run SchedSecureObjects action for MSI build
1 parent e18a7be commit b99231f

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Changes

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ packaging:
7878
1.7.3 not yet released
7979

8080
packaging:
81-
* Fix LOCAL is set to installation folder when LOCAL is not used on MSI windows
82-
installation, and even if it was set empty in installer UI
83-
* Enhanced CVE-2024-28241 fix to only apply folder security if folder is not a
84-
subfolder of system "Program Files" folder
81+
* Fix LOCAL was set to installation folder during windows MSI installation v1.7.2,
82+
even if LOCAL was not used or it was set empty in installer UI
83+
* Enhanced CVE-2024-28241 fix to only apply folder security if install folder and
84+
eventually LOCAL folder are subfolders of system "Program Files" folder
8585

8686
1.7.2 Mon, 25 Mar 2024
8787

contrib/windows/packaging/MSI_main-v2.wxs.tt

+12-12
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@
9797
<RegistrySearch Id="Local" Root="HKLM" Key="[%agent_regpath%]" Name="local" Type="raw"/>
9898
</Property>
9999
<SetProperty Id="CMDLINE_LOCAL" Before="AppSearch" Value="[LOCAL]" />
100-
<!-- Also compare to UPGRADEDIR to fix wrongly set LOCAL in 1.7.2 -->
101-
<SetProperty Id="LOCAL" After="AppSearch" Value="[CMDLINE_LOCAL]"><![CDATA[CMDLINE_LOCAL<>"" OR (UPGRADEDIR<>"" AND LOCAL=UPGRADEDIR) OR CMDLINE_CONFIG="reset"]]></SetProperty>
100+
<!-- Also compare to INSTALLDIR to fix wrongly set LOCAL in 1.7.2 -->
101+
<SetProperty Id="LOCAL" After="AppSearch" Value="[CMDLINE_LOCAL]"><![CDATA[CMDLINE_LOCAL<>"" OR LOCAL=INSTALLDIR OR CMDLINE_CONFIG="reset"]]></SetProperty>
102102
<SetDirectory Id="_LOCALDIR" Before="CostFinalize" Value="[LOCAL]" />
103103

104104
<Property Id="ADDITIONAL_CONTENT" Secure="yes">
@@ -525,17 +525,17 @@
525525
<LaunchConditions Sequence="400" />
526526

527527
[%- IF bits==32 %]
528-
<Custom Action="SchedSecureObjects" After="CreateFolders"><![CDATA[(NOT INSTALLDIR<<ProgramFilesFolder OR (LOCAL<>"" AND NOT LOCAL<<ProgramFiles64Folder)) AND NOT REMOVE~="ALL"]]></Custom>
529-
<Custom Action="SetFixInstallDir" After="SchedSecureObjects"><![CDATA[NOT INSTALLDIR<<ProgramFilesFolder AND NOT REMOVE~="ALL"]]></Custom>
530-
<Custom Action="FixInstallDir" After="SetFixInstallDir"><![CDATA[NOT INSTALLDIR<<ProgramFilesFolder AND NOT REMOVE~="ALL"]]></Custom>
531-
<Custom Action="SetFixLocalDir" After="SchedSecureObjects"><![CDATA[LOCAL<>"" AND NOT LOCAL<<ProgramFilesFolder AND NOT REMOVE~="ALL"]]></Custom>
532-
<Custom Action="FixLocalDir" After="SetFixLocalDir"><![CDATA[LOCAL<>"" AND NOT LOCAL<<ProgramFilesFolder AND NOT REMOVE~="ALL"]]></Custom>
528+
<Custom Action="SchedSecureObjects" After="CreateFolders"><![CDATA[NOT (INSTALLDIR<<ProgramFilesFolder AND (NOT LOCAL OR LOCAL<<ProgramFilesFolder)) AND NOT REMOVE~="ALL"]]></Custom>
529+
<Custom Action="SetFixInstallDir" After="SchedSecureObjects"><![CDATA[NOT (INSTALLDIR<<ProgramFilesFolder AND (NOT LOCAL OR LOCAL<<ProgramFilesFolder)) AND NOT REMOVE~="ALL"]]></Custom>
530+
<Custom Action="FixInstallDir" After="SetFixInstallDir"><![CDATA[NOT (INSTALLDIR<<ProgramFilesFolder AND (NOT LOCAL OR LOCAL<<ProgramFilesFolder)) AND NOT REMOVE~="ALL"]]></Custom>
531+
<Custom Action="SetFixLocalDir" After="SchedSecureObjects"><![CDATA[LOCAL<>"" AND NOT (INSTALLDIR<<ProgramFilesFolder AND LOCAL<<ProgramFilesFolder) AND NOT REMOVE~="ALL"]]></Custom>
532+
<Custom Action="FixLocalDir" After="SetFixLocalDir"><![CDATA[LOCAL<>"" AND NOT (INSTALLDIR<<ProgramFilesFolder AND LOCAL<<ProgramFilesFolder) AND NOT REMOVE~="ALL"]]></Custom>
533533
[%- ELSE %]
534-
<Custom Action="SchedSecureObjects_x64" After="CreateFolders"><![CDATA[(NOT INSTALLDIR<<ProgramFiles64Folder OR (LOCAL<>"" AND NOT LOCAL<<ProgramFiles64Folder)) AND NOT REMOVE~="ALL"]]></Custom>
535-
<Custom Action="SetFixInstallDir" After="SchedSecureObjects_x64"><![CDATA[NOT INSTALLDIR<<ProgramFiles64Folder AND NOT REMOVE~="ALL"]]></Custom>
536-
<Custom Action="FixInstallDir" After="SetFixInstallDir"><![CDATA[NOT INSTALLDIR<<ProgramFiles64Folder AND NOT REMOVE~="ALL"]]></Custom>
537-
<Custom Action="SetFixLocalDir" After="SchedSecureObjects_x64"><![CDATA[LOCAL<>"" AND NOT LOCAL<<ProgramFiles64Folder AND NOT REMOVE~="ALL"]]></Custom>
538-
<Custom Action="FixLocalDir" After="SetFixLocalDir"><![CDATA[LOCAL<>"" AND NOT LOCAL<<ProgramFiles64Folder AND NOT REMOVE~="ALL"]]></Custom>
534+
<Custom Action="SchedSecureObjects_x64" After="CreateFolders"><![CDATA[NOT (INSTALLDIR<<ProgramFiles64Folder AND (NOT LOCAL OR LOCAL<<ProgramFiles64Folder)) AND NOT REMOVE~="ALL"]]></Custom>
535+
<Custom Action="SetFixInstallDir" After="SchedSecureObjects_x64"><![CDATA[NOT (INSTALLDIR<<ProgramFiles64Folder AND (NOT LOCAL OR LOCAL<<ProgramFiles64Folder)) AND NOT REMOVE~="ALL"]]></Custom>
536+
<Custom Action="FixInstallDir" After="SetFixInstallDir"><![CDATA[NOT (INSTALLDIR<<ProgramFiles64Folder AND (NOT LOCAL OR LOCAL<<ProgramFiles64Folder)) AND NOT REMOVE~="ALL"]]></Custom>
537+
<Custom Action="SetFixLocalDir" After="SchedSecureObjects_x64"><![CDATA[LOCAL<>"" AND NOT (INSTALLDIR<<ProgramFiles64Folder AND LOCAL<<ProgramFiles64Folder) AND NOT REMOVE~="ALL"]]></Custom>
538+
<Custom Action="FixLocalDir" After="SetFixLocalDir"><![CDATA[LOCAL<>"" AND NOT (INSTALLDIR<<ProgramFiles64Folder AND LOCAL<<ProgramFiles64Folder) AND NOT REMOVE~="ALL"]]></Custom>
539539
[%- END %]
540540
<Custom Action="UpdateLocalDir" Before="CostFinalize"><![CDATA[LOCAL<>"" AND NOT LOCAL>>"\" AND NOT REMOVE~="ALL"]]></Custom>
541541

0 commit comments

Comments
 (0)