@joebigelow / wix / commits / 5ee3e626

Fix lock permissions

Rob Mensching committed Oct 14, 2019 at 14:48 UTC 5ee3e62691e09ffd3edc9bfafa4deddb26f155c5
2 files changed +3 -4
src/WixToolset.Core/Compiler_2.cs
+2 -3
@@ -1053,7 +1053,6 @@ namespace WixToolset.Core
1053 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1054 var bits = new BitArray(32);
1055 string domain = null;
1056 - var permission = 0;
1056 string[] specialPermissions = null;
1057 string user = null;
1058
@@ -1115,13 +1114,13 @@ namespace WixToolset.Core
1114 }
1115 }
1116
1118 - permission = this.Core.CreateIntegerFromBitArray(bits);
1119 -
1117 if (null == user)
1118 {
1119 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "User"));
1120 }
1121
1122 + var permission = this.Core.CreateIntegerFromBitArray(bits);
1123 +
1124 if (Int32.MinValue == permission) // just GENERIC_READ, which is MSI_NULL
1125 {
1126 this.Core.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers));
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+1 -1
@@ -412,7 +412,7 @@ namespace WixToolsetTest.CoreIntegration
412 }
413 }
414
415 - [Fact(Skip = "Test demonstrates failure")]
415 + [Fact]
416 public void PopulatesLockPermissionsTableWithEmptyPermissions()
417 {
418 var folder = TestData.Get(@"TestData");