Merge pull request #3545 from ntherning/throw-AbandonedMutexException-on-unix
[mono.git] / mcs / class / corlib / System.Security.AccessControl / RegistryAuditRule.cs
index 46cf5c27d6bcb5d169f8c716ba032a632ce40911..5efb11ad5e4b3914604a695e99d4e5cb8fa1e217 100644 (file)
@@ -1,10 +1,11 @@
 //
 // System.Security.AccessControl.RegistryAuditRule implementation
 //
-// Author:
+// Authors:
 //     Dick Porter  <dick@ximian.com>
+//     Atsushi Enomoto  <atsushi@ximian.com>
 //
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2006-2007 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Security.Principal;
 
-namespace System.Security.AccessControl {
+namespace System.Security.AccessControl 
+{
        public sealed class RegistryAuditRule : AuditRule
        {
-               RegistryRights registryRights;
-               
                public RegistryAuditRule (IdentityReference identity,
                                          RegistryRights registryRights,
                                          InheritanceFlags inheritanceFlags,
                                          PropagationFlags propagationFlags,
                                          AuditFlags 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.registryRights = registryRights;
                }
                
                public RegistryAuditRule (string identity,
@@ -49,17 +57,13 @@ namespace System.Security.AccessControl {
                                          InheritanceFlags inheritanceFlags,
                                          PropagationFlags propagationFlags,
                                          AuditFlags flags)
+                       : this (new NTAccount (identity), registryRights, inheritanceFlags, propagationFlags, flags)
                {
-                       this.registryRights = registryRights;
                }
                
-               public RegistryRights RegistryRights
-               {
-                       get {
-                               return(registryRights);
-                       }
+               public RegistryRights RegistryRights {
+                       get { return (RegistryRights)AccessMask; }
                }
        }
 }
 
-#endif