PERFORCE change 103183 for review
Robert Watson
rwatson at FreeBSD.org
Fri Aug 4 18:05:04 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103183
Change 103183 by rwatson at rwatson_zoo on 2006/08/04 18:00:28
Remove HEADER_VERSION, which is a poorly named define for a public
header file.
Add new version constants, and allocate a specific constant for
OpenBSM, as well as list some constants used by other
implementations.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#22 edit
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#50 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#22 (text+ko) ====
@@ -30,7 +30,7 @@
*
* @APPLE_BSD_LICENSE_HEADER_END@
*
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#21 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#22 $
*/
#ifndef _BSM_AUDIT_RECORD_H_
@@ -199,9 +199,19 @@
#define PAD_NOTATTR 0x4000 /* nonattributable event */
#define PAD_FAILURE 0x8000 /* fail audit event */
+#define BSM_MAX_GROUPS 16
-#define BSM_MAX_GROUPS 16
-#define HEADER_VERSION 1
+/*
+ * A number of BSM versions are floating around and defined. Here are
+ * constants for them. OpenBSM uses the same token types, etc, used in the
+ * Solaris BSM version, but has a separate version number in order to
+ * identify a potentially different event identifier name space.
+ */
+#define BSM_HEADER_VERSION_OLDDARWIN 1 /* In retrospect, a mistake. */
+#define BSM_HEADER_VERSION_SOLARIS 2
+#define BSM_HEADER_VERSION_TSOL25 3
+#define BSM_HEADER_VERSION_TSOL 4
+#define BSM_HEADER_VERSION_OPENBSM 10
/*
* BSM define is AUT_TRAILER_MAGIC; Apple BSM define is TRAILER_PAD_MAGIC; we
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#50 (text+ko) ====
@@ -30,7 +30,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#49 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#50 $
*/
#include <sys/types.h>
@@ -1155,7 +1155,7 @@
ADD_U_CHAR(dptr, AUT_HEADER32);
ADD_U_INT32(dptr, rec_size);
- ADD_U_CHAR(dptr, HEADER_VERSION);
+ ADD_U_CHAR(dptr, BSM_HEADER_VERSION_OPENBSM);
ADD_U_INT16(dptr, e_type);
ADD_U_INT16(dptr, e_mod);
More information about the trustedbsd-cvs
mailing list