Merge pull request #2097 from steffen-kiess/posix-sockets-3
[mono.git] / mcs / class / corlib / System.Security.AccessControl / AuditRule.cs
index d346c20fa2e53d62bc3317f6b6a817ff9cc38e5d..0ea9ad243d3e0ffb32af6999d92bad607aea0169 100644 (file)
@@ -42,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;
                }