xref: /titanic_51/usr/src/lib/auditd_plugins/syslog/systoken.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYSTOKEN_H
28 #define	_SYSTOKEN_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include "sysplugin.h"
37 #include <bsm/adt.h>
38 
39 /*
40  * parse_context -- doc and cur are for XML input, chunk and
41  * remaining for "plain text input, i.e., the traditiona
42  * output from praudit
43  */
44 
45 struct parse_context {
46 	adr_t		adr;	/* input buffer pointers */
47 	uint32_t	id;	/* message sequence number */
48 	tosyslog_t	out;	/* output data */
49 };
50 typedef struct parse_context parse_context_t;
51 
52 #define	AU_TEXT_NAME	" text "
53 
54 #ifdef useless
55 /*
56  * the following *_ar_token() functions parallel the *_token()(
57  * functions defined in praudit/toktable.h
58  */
59 
60 /*
61  * These tokens are the same for all versions of Solaris
62  */
63 
64 /*
65  * Control tokens
66  */
67 
68 extern void	file_token(adr_t *, uint64_t, uint64_t);
69 extern void	trailer_token(adr_t *, parse_context_t *);
70 extern void	header_token(adr_t *, parse_context_t *);
71 extern void	header32_ex_token(adr_t *, parse_context_t *);
72 
73 /*
74  * Data tokens
75  */
76 
77 extern void	arbitrary_data_token(adr_t *, parse_context_t *);
78 extern void	s5_IPC_token(adr_t *, parse_context_t *);
79 extern void	path_token(adr_t *, parse_context_t *);
80 extern void	subject32_token();
81 extern void	process32_token();
82 extern void	return_value32_token();
83 extern void	text_token(adr_t *, parse_context_t *);
84 extern void	opaque_token(adr_t *, parse_context_t *);
85 extern void	ip_addr_token();
86 extern void	ip_token(adr_t *, parse_context_t *);
87 extern void	iport_token(adr_t *, parse_context_t *);
88 extern void	argument32_token();
89 extern void	socket_token();
90 extern void	sequence_token(adr_t *, parse_context_t *);
91 
92 /*
93  * Modifier tokens
94  */
95 
96 extern void	acl_token(adr_t *, parse_context_t *);
97 extern void	attribute_token(adr_t *, parse_context_t *);
98 extern void	s5_IPC_perm_token(adr_t *, parse_context_t *);
99 extern void	group_token();
100 extern void	ilabel_token(adr_t *, parse_context_t *);
101 extern void	slabel_token(adr_t *, parse_context_t *);
102 extern void	clearance_token(adr_t *, parse_context_t *);
103 extern void	privilege_token(adr_t *, parse_context_t *);
104 extern void	useofpriv_token(adr_t *, parse_context_t *);
105 extern void	zonename_token(adr_t *, parse_context_t *);
106 extern void	liaison_token(adr_t *, parse_context_t *);
107 extern void	newgroup_token(adr_t *, parse_context_t *);
108 extern void	exec_args_token(adr_t *, parse_context_t *);
109 extern void	exec_env_token(adr_t *, parse_context_t *);
110 extern void	attribute32_token(adr_t *, parse_context_t *);
111 extern void	useofauth_token(adr_t *, parse_context_t *);
112 
113 /*
114  * X windows tokens
115  */
116 
117 extern void	xatom_token(adr_t *, parse_context_t *);
118 extern void	xselect_token(adr_t *, parse_context_t *);
119 extern void	xcolormap_token(adr_t *, parse_context_t *);
120 extern void	xcursor_token(adr_t *, parse_context_t *);
121 extern void	xfont_token(adr_t *, parse_context_t *);
122 extern void	xgc_token(adr_t *, parse_context_t *);
123 extern void	xpixmap_token(adr_t *, parse_context_t *);
124 extern void	xproperty_token(adr_t *, parse_context_t *);
125 extern void	xwindow_token(adr_t *, parse_context_t *);
126 extern void	xclient_token(adr_t *, parse_context_t *);
127 
128 /*
129  * Command tokens
130  */
131 
132 extern void	cmd_token(adr_t *, parse_context_t *);
133 extern void	exit_token(adr_t *, parse_context_t *);
134 
135 /*
136  * Miscellaneous tokens
137  */
138 
139 extern void	host_token(adr_t *, parse_context_t *);
140 
141 /*
142  * Solaris64 tokens
143  */
144 
145 extern void	argument64_token(adr_t *, parse_context_t *);
146 extern void	return64_token(adr_t *, parse_context_t *);
147 extern void	attribute64_token(adr_t *, parse_context_t *);
148 extern void	header64_token(adr_t *, parse_context_t *);
149 extern void	subject64_token(adr_t *, parse_context_t *);
150 extern void	process64_token(adr_t *, parse_context_t *);
151 extern void	file64_token(adr_t *, parse_context_t *);
152 
153 /*
154  * Extended network address tokens
155  */
156 
157 extern void	header64_ex_token();
158 extern void	subject32_ex_token();
159 extern void	process32_ex_token();
160 extern void	subject64_ex_token(adr_t *, parse_context_t *);
161 extern void	process64_ex_token(adr_t *, parse_context_t *);
162 extern void	ip_addr_ex_token(adr_t *, parse_context_t *);
163 extern void	socket_ex_token(adr_t *, parse_context_t *);
164 #endif
165 
166 #ifdef __cplusplus
167 }
168 #endif
169 
170 #endif	/* _SYSTOKEN_H */
171