Print this page
NEX-13644 File access audit logging
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

@@ -19,10 +19,12 @@
  * CDDL HEADER END
  */
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  */
 
 /*
  * Main processor for auditreduce.
  * Mproc() is the entry point for this module. It is the only visible

@@ -805,15 +807,25 @@
                 /* Are we finished? */
                 if (flags == checkflags)
                         return (0);
         }
 
+        /* let PAD_FAILURE satisfy success/failure selection */
+        if ((flags & M_SORF) != 0 && (checkflags & M_SORF) == 0 &&
+            (((global_class & mask.am_success) != 0 &&
+            (id_modifier & PAD_FAILURE) == 0) ||
+            ((global_class & mask.am_failure) != 0 &&
+            (id_modifier & PAD_FAILURE) != 0))) {
+                checkflags |= M_SORF;
+        }
+
+
         /*
-         * So, we haven't seen all that we need to see.  Reject record.
+         * If we haven't seen all that we need to see, reject the record.
          */
 
-        return (-1);
+        return ((checkflags == flags) ? 0 : -1);
 }
 
 
 /*
  * .func check_order - Check temporal sequence.