Merge pull request #439 from mono-soc-2012/garyb/iconfix
[mono.git] / mcs / class / corlib / System.Security.AccessControl / AuditRule.cs
index 38fe74f4dcbea729bac656b990caccfc6ebf24d6..0ea9ad243d3e0ffb32af6999d92bad607aea0169 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Security.Principal;
 
 namespace System.Security.AccessControl {
@@ -35,11 +33,6 @@ namespace System.Security.AccessControl {
        {
                AuditFlags auditFlags;
                
-               protected AuditRule ()
-               {
-                       /* Give it a 0-param constructor */
-               }
-               
                protected AuditRule (IdentityReference identity,
                                     int accessMask,
                                     bool isInherited,
@@ -49,17 +42,8 @@ namespace System.Security.AccessControl {
                        : base (identity, accessMask, isInherited,
                                inheritanceFlags, propagationFlags)
                {
-                       if (!(identity is SecurityIdentifier)) {
-                               /* FIXME: check auditFlags too */
-                               throw new ArgumentException ("identity");
-                       }
-                       
-                       if (accessMask == 0) {
-                               /* FIXME: check inheritance and
-                                * propagation flags too
-                                */
-                               throw new ArgumentOutOfRangeException ();
-                       }
+                       if (auditFlags != ((AuditFlags.Success | AuditFlags.Failure) & auditFlags))
+                               throw new ArgumentException ("Invalid audit flags.", "auditFlags");
 
                        this.auditFlags = auditFlags;
                }
@@ -72,5 +56,3 @@ namespace System.Security.AccessControl {
                }
        }
 }
-
-#endif