Merge pull request #3545 from ntherning/throw-AbandonedMutexException-on-unix
[mono.git] / mcs / class / corlib / System.Security.AccessControl / RegistryAuditRule.cs
index 73edde38d406e47ff6b36b8f3f6099dc293d14db..5efb11ad5e4b3914604a695e99d4e5cb8fa1e217 100644 (file)
@@ -33,16 +33,23 @@ namespace System.Security.AccessControl
 {
        public sealed class RegistryAuditRule : AuditRule
        {
-               RegistryRights rights;
-               
                public RegistryAuditRule (IdentityReference identity,
                                          RegistryRights registryRights,
                                          InheritanceFlags inheritanceFlags,
                                          PropagationFlags propagationFlags,
                                          AuditFlags flags)
-                       : base (identity, 0, false, inheritanceFlags, propagationFlags, flags)
+                       : this (identity, registryRights, false, inheritanceFlags, propagationFlags, flags)
+               {
+               }
+               
+               internal RegistryAuditRule (IdentityReference identity,
+                                           RegistryRights registryRights,
+                                           bool isInherited,
+                                           InheritanceFlags inheritanceFlags,
+                                           PropagationFlags propagationFlags,
+                                           AuditFlags flags)
+                       : base (identity, (int)registryRights, isInherited, inheritanceFlags, propagationFlags, flags)
                {
-                       this.rights = registryRights;
                }
                
                public RegistryAuditRule (string identity,
@@ -50,12 +57,12 @@ namespace System.Security.AccessControl
                                          InheritanceFlags inheritanceFlags,
                                          PropagationFlags propagationFlags,
                                          AuditFlags flags)
-                       : this (new SecurityIdentifier (identity), registryRights, inheritanceFlags, propagationFlags, flags)
+                       : this (new NTAccount (identity), registryRights, inheritanceFlags, propagationFlags, flags)
                {
                }
                
                public RegistryRights RegistryRights {
-                       get { return rights; }
+                       get { return (RegistryRights)AccessMask; }
                }
        }
 }