diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wixext/Symbols/SecureObjectsSymbol.cs | 14 | ||||
| -rw-r--r-- | src/wixext/UtilCompiler.cs | 15 |
2 files changed, 16 insertions, 13 deletions
diff --git a/src/wixext/Symbols/SecureObjectsSymbol.cs b/src/wixext/Symbols/SecureObjectsSymbol.cs index b90df521..25fc6dca 100644 --- a/src/wixext/Symbols/SecureObjectsSymbol.cs +++ b/src/wixext/Symbols/SecureObjectsSymbol.cs | |||
| @@ -25,6 +25,7 @@ namespace WixToolset.Util | |||
| 25 | 25 | ||
| 26 | namespace WixToolset.Util.Symbols | 26 | namespace WixToolset.Util.Symbols |
| 27 | { | 27 | { |
| 28 | using System; | ||
| 28 | using WixToolset.Data; | 29 | using WixToolset.Data; |
| 29 | 30 | ||
| 30 | public enum SecureObjectsSymbolFields | 31 | public enum SecureObjectsSymbolFields |
| @@ -38,6 +39,13 @@ namespace WixToolset.Util.Symbols | |||
| 38 | ComponentRef, | 39 | ComponentRef, |
| 39 | } | 40 | } |
| 40 | 41 | ||
| 42 | [Flags] | ||
| 43 | public enum WixPermissionExAttributes | ||
| 44 | { | ||
| 45 | None = 0x0, | ||
| 46 | Inheritable = 0x01 | ||
| 47 | } | ||
| 48 | |||
| 41 | public class SecureObjectsSymbol : IntermediateSymbol | 49 | public class SecureObjectsSymbol : IntermediateSymbol |
| 42 | { | 50 | { |
| 43 | public SecureObjectsSymbol() : base(UtilSymbolDefinitions.SecureObjects, null, null) | 51 | public SecureObjectsSymbol() : base(UtilSymbolDefinitions.SecureObjects, null, null) |
| @@ -74,10 +82,10 @@ namespace WixToolset.Util.Symbols | |||
| 74 | set => this.Set((int)SecureObjectsSymbolFields.User, value); | 82 | set => this.Set((int)SecureObjectsSymbolFields.User, value); |
| 75 | } | 83 | } |
| 76 | 84 | ||
| 77 | public int Attributes | 85 | public WixPermissionExAttributes Attributes |
| 78 | { | 86 | { |
| 79 | get => this.Fields[(int)SecureObjectsSymbolFields.Attributes].AsNumber(); | 87 | get => (WixPermissionExAttributes)this.Fields[(int)SecureObjectsSymbolFields.Attributes].AsNumber(); |
| 80 | set => this.Set((int)SecureObjectsSymbolFields.Attributes, value); | 88 | set => this.Set((int)SecureObjectsSymbolFields.Attributes, (int)value); |
| 81 | } | 89 | } |
| 82 | 90 | ||
| 83 | public int? Permission | 91 | public int? Permission |
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs index f1faf4a8..c0312f48 100644 --- a/src/wixext/UtilCompiler.cs +++ b/src/wixext/UtilCompiler.cs | |||
| @@ -49,11 +49,6 @@ namespace WixToolset.Util | |||
| 49 | TypeMask = 0xf, | 49 | TypeMask = 0xf, |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | internal enum WixPermissionExAttributes | ||
| 53 | { | ||
| 54 | Inheritable = 0x01 | ||
| 55 | } | ||
| 56 | |||
| 57 | internal enum WixRemoveFolderExOn | 52 | internal enum WixRemoveFolderExOn |
| 58 | { | 53 | { |
| 59 | Install = 1, | 54 | Install = 1, |
| @@ -2465,8 +2460,7 @@ namespace WixToolset.Util | |||
| 2465 | string domain = null; | 2460 | string domain = null; |
| 2466 | string[] specialPermissions = null; | 2461 | string[] specialPermissions = null; |
| 2467 | string user = null; | 2462 | string user = null; |
| 2468 | var inheritable = YesNoType.NotSet; | 2463 | var attributes = WixPermissionExAttributes.Inheritable; // default to inheritable. |
| 2469 | int attributes = 0; | ||
| 2470 | 2464 | ||
| 2471 | var permissionType = PermissionType.SecureObjects; | 2465 | var permissionType = PermissionType.SecureObjects; |
| 2472 | 2466 | ||
| @@ -2508,7 +2502,10 @@ namespace WixToolset.Util | |||
| 2508 | domain = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 2502 | domain = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| 2509 | break; | 2503 | break; |
| 2510 | case "Inheritable": | 2504 | case "Inheritable": |
| 2511 | inheritable = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 2505 | if (this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) == YesNoType.No) |
| 2506 | { | ||
| 2507 | attributes &= ~WixPermissionExAttributes.Inheritable; | ||
| 2508 | } | ||
| 2512 | break; | 2509 | break; |
| 2513 | case "User": | 2510 | case "User": |
| 2514 | user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 2511 | user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
| @@ -2547,8 +2544,6 @@ namespace WixToolset.Util | |||
| 2547 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); | 2544 | this.Messaging.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers)); |
| 2548 | } | 2545 | } |
| 2549 | 2546 | ||
| 2550 | attributes |= inheritable == YesNoType.No ? 0 : (int)WixPermissionExAttributes.Inheritable; // default to inheritable. | ||
| 2551 | |||
| 2552 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | 2547 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |
| 2553 | 2548 | ||
| 2554 | if (!this.Messaging.EncounteredError) | 2549 | if (!this.Messaging.EncounteredError) |
