Fix null sessions in HttpContextWrapper.Session
[mono.git] / mcs / class / corlib / System.Security.AccessControl / MutexAccessRule.cs
index 779444f8fde41ffa5310d51cc00f9ab6a1e43f30..96d49a318d0c7af508766bf5261b8c8e33ca96bf 100644 (file)
@@ -1,10 +1,11 @@
 //
 // System.Security.AccessControl.MutexAccessRule 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 MutexAccessRule : AccessRule
        {
-               MutexRights mutexRights;
-               
                public MutexAccessRule (IdentityReference identity,
-                                       MutexRights mutexRights,
+                                       MutexRights eventRights,
                                        AccessControlType type)
+                       : base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, type)
                {
-                       this.mutexRights = mutexRights;
+
                }
 
                public MutexAccessRule (string identity,
-                                       MutexRights mutexRights,
+                                       MutexRights eventRights,
                                        AccessControlType type)
+                       : this (new NTAccount (identity), eventRights, type)
                {
-                       this.mutexRights = mutexRights;
                }
                
-               public MutexRights MutexRights
-               {
-                       get {
-                               return(mutexRights);
-                       }
+               public MutexRights MutexRights {
+                       get { return (MutexRights)AccessMask; }
                }
        }
 }
 
-#endif