From e31c6d9643c0578e22db4df1e64d6672248fd0c7 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sun, 18 Apr 2021 21:06:02 -0400 Subject: Add `Wix4` table prefixes. Per https://github.com/wixtoolset/issues/issues/5933. --- src/ca/firewall.cpp | 10 +++++----- src/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs | 12 ++++++------ src/wixext/FirewallTableDefinitions.cs | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ca/firewall.cpp b/src/ca/firewall.cpp index 038f4ea5..caae21a1 100644 --- a/src/ca/firewall.cpp +++ b/src/ca/firewall.cpp @@ -3,7 +3,7 @@ #include "precomp.h" LPCWSTR vcsFirewallExceptionQuery = - L"SELECT `Name`, `RemoteAddresses`, `Port`, `Protocol`, `Program`, `Attributes`, `Profile`, `Component_`, `Description`, `Direction` FROM `WixFirewallException`"; + L"SELECT `Name`, `RemoteAddresses`, `Port`, `Protocol`, `Program`, `Attributes`, `Profile`, `Component_`, `Description`, `Direction` FROM `Wix4FirewallException`"; enum eFirewallExceptionQuery { feqName = 1, feqRemoteAddresses, feqPort, feqProtocol, feqProgram, feqAttributes, feqProfile, feqComponent, feqDescription }; enum eFirewallExceptionTarget { fetPort = 1, fetApplication, fetUnknown }; enum eFirewallExceptionAttributes { feaIgnoreFailures = 1 }; @@ -43,15 +43,15 @@ static UINT SchedFirewallExceptions( ExitOnFailure(hr, "failed to initialize"); // anything to do? - if (S_OK != WcaTableExists(L"WixFirewallException")) + if (S_OK != WcaTableExists(L"Wix4FirewallException")) { - WcaLog(LOGMSG_STANDARD, "WixFirewallException table doesn't exist, so there are no firewall exceptions to configure."); + WcaLog(LOGMSG_STANDARD, "Wix4FirewallException table doesn't exist, so there are no firewall exceptions to configure."); ExitFunction(); } // query and loop through all the firewall exceptions hr = WcaOpenExecuteView(vcsFirewallExceptionQuery, &hView); - ExitOnFailure(hr, "failed to open view on WixFirewallException table"); + ExitOnFailure(hr, "failed to open view on Wix4FirewallException table"); while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { @@ -141,7 +141,7 @@ static UINT SchedFirewallExceptions( { hr = S_OK; } - ExitOnFailure(hr, "failure occured while processing WixFirewallException table"); + ExitOnFailure(hr, "failure occured while processing Wix4FirewallException table"); // schedule ExecFirewallExceptions if there's anything to do if (pwzCustomActionData && *pwzCustomActionData) diff --git a/src/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs b/src/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs index dd7a4d67..ffdc1326 100644 --- a/src/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs +++ b/src/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs @@ -16,7 +16,7 @@ namespace WixToolsetTest.Firewall var folder = TestData.Get(@"TestData\UsingFirewall"); var build = new Builder(folder, typeof(FirewallExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(Build, "WixFirewallException", "CustomAction"); + var results = build.BuildAndQuery(Build, "Wix4FirewallException", "CustomAction"); Assert.Equal(new[] { "CustomAction:Wix4ExecFirewallExceptionsInstall_X86\t3073\tWix4FWCA_X86\tExecFirewallExceptions\t", @@ -25,7 +25,7 @@ namespace WixToolsetTest.Firewall "CustomAction:Wix4RollbackFirewallExceptionsUninstall_X86\t3329\tWix4FWCA_X86\tExecFirewallExceptions\t", "CustomAction:Wix4SchedFirewallExceptionsInstall_X86\t1\tWix4FWCA_X86\tSchedFirewallExceptionsInstall\t", "CustomAction:Wix4SchedFirewallExceptionsUninstall_X86\t1\tWix4FWCA_X86\tSchedFirewallExceptionsUninstall\t", - "WixFirewallException:ExampleFirewall\texample\t*\t42\t6\t\t0\t2147483647\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example firewall\t1", + "Wix4FirewallException:ExampleFirewall\texample\t*\t42\t6\t\t0\t2147483647\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example firewall\t1", }, results); } @@ -35,7 +35,7 @@ namespace WixToolsetTest.Firewall var folder = TestData.Get(@"TestData\UsingFirewall"); var build = new Builder(folder, typeof(FirewallExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(BuildARM64, "WixFirewallException", "CustomAction"); + var results = build.BuildAndQuery(BuildARM64, "Wix4FirewallException", "CustomAction"); Assert.Equal(new[] { "CustomAction:Wix4ExecFirewallExceptionsInstall_A64\t3073\tWix4FWCA_A64\tExecFirewallExceptions\t", @@ -44,7 +44,7 @@ namespace WixToolsetTest.Firewall "CustomAction:Wix4RollbackFirewallExceptionsUninstall_A64\t3329\tWix4FWCA_A64\tExecFirewallExceptions\t", "CustomAction:Wix4SchedFirewallExceptionsInstall_A64\t1\tWix4FWCA_A64\tSchedFirewallExceptionsInstall\t", "CustomAction:Wix4SchedFirewallExceptionsUninstall_A64\t1\tWix4FWCA_A64\tSchedFirewallExceptionsUninstall\t", - "WixFirewallException:ExampleFirewall\texample\t*\t42\t6\t\t0\t2147483647\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example firewall\t1", + "Wix4FirewallException:ExampleFirewall\texample\t*\t42\t6\t\t0\t2147483647\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example firewall\t1", }, results); } @@ -54,10 +54,10 @@ namespace WixToolsetTest.Firewall var folder = TestData.Get(@"TestData\UsingOutboundFirewall"); var build = new Builder(folder, typeof(FirewallExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(Build, "WixFirewallException"); + var results = build.BuildAndQuery(Build, "Wix4FirewallException"); Assert.Equal(new[] { - "WixFirewallException:fex.5c8b_4C0THcQTvn8tpwhoRrgck\texample\t*\t42\t6\t\t0\t2147483647\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example outbound firewall\t2", + "Wix4FirewallException:fex.5c8b_4C0THcQTvn8tpwhoRrgck\texample\t*\t42\t6\t\t0\t2147483647\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tAn example outbound firewall\t2", }, results); } diff --git a/src/wixext/FirewallTableDefinitions.cs b/src/wixext/FirewallTableDefinitions.cs index eae897d5..04918f5f 100644 --- a/src/wixext/FirewallTableDefinitions.cs +++ b/src/wixext/FirewallTableDefinitions.cs @@ -7,11 +7,11 @@ namespace WixToolset.Firewall public static class FirewallTableDefinitions { public static readonly TableDefinition WixFirewallException = new TableDefinition( - "WixFirewallException", + "Wix4FirewallException", FirewallSymbolDefinitions.WixFirewallException, new[] { - new ColumnDefinition("WixFirewallException", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The primary key, a non-localized token.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Wix4FirewallException", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The primary key, a non-localized token.", modularizeType: ColumnModularizeType.Column), new ColumnDefinition("Name", ColumnType.Localized, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Localizable display name.", modularizeType: ColumnModularizeType.Property), new ColumnDefinition("RemoteAddresses", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Remote address to accept incoming connections from.", modularizeType: ColumnModularizeType.Property), new ColumnDefinition("Port", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 1, description: "Port number.", modularizeType: ColumnModularizeType.Property), -- cgit v1.2.3-55-g6feb