5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
25 # Automagically generate the audit_uevents.h header file.
27 DATABASE
=audit_event.txt
28 HEADER_FILE
=audit_uevents.h
29 CR_YEAR
=`/usr/bin/date '+%Y'`
31 cat <<EOF > $HEADER_FILE
35 * The contents of this file are subject to the terms of the
36 * Common Development and Distribution License (the "License").
37 * You may not use this file except in compliance with the License.
39 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
40 * or http://www.opensolaris.org/os/licensing.
41 * See the License for the specific language governing permissions
42 * and limitations under the License.
44 * When distributing Covered Code, include this CDDL HEADER in each
45 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
46 * If applicable, add the following below this CDDL HEADER, with the
47 * fields enclosed by brackets "[]" replaced with your own identifying
48 * information: Portions Copyright [yyyy] [name of copyright owner]
53 * Copyright (c) 1992, $CR_YEAR, Oracle and/or its affiliates. All rights reserved.
56 #ifndef _BSM_AUDIT_UEVENTS_H
57 #define _BSM_AUDIT_UEVENTS_H
61 cat <<EOF >> $HEADER_FILE
64 * User level audit event numbers.
66 * 0 Reserved as an invalid event number.
67 * 1 - 2047 Reserved for the Solaris Kernel events.
68 * 2048 - 32767 Reserved for the Solaris TCB programs.
69 * 32768 - 65535 Available for third party TCB applications.
79 nawk
-F: '{if ((NF == 4) && substr($1,0,1) != "#")
83 printf("#define\t%s\t", $2)
93 < $DATABASE >> $HEADER_FILE
95 cat <<EOF >> $HEADER_FILE
101 #endif /* _BSM_AUDIT_UEVENTS_H */