xref: /illumos-gate/usr/src/lib/auditd_plugins/syslog/sysplugin.h (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
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	_SYSPLUGIN_H
28 #define	_SYSPLUGIN_H
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include <sys/types.h>
35 #include <bsm/audit.h>
36 
37 struct selected_fields {
38 	/* from header token */
39 	au_event_t	sf_eventid;	/* 0 if no value */
40 	uint32_t	sf_reclen;	/* 0 if no value */
41 
42 	/* from exit or return token */
43 	int		sf_pass;	/* 0 no value, -1 fail, 1 pass */
44 
45 	/* from subject token */
46 	uint32_t	sf_asid;	/* 0 no value */
47 	uid_t		sf_auid;	/* -2 no value, > -1 otherwise */
48 	uid_t		sf_euid;	/* -2 no value, > -1 otherwise */
49 	gid_t		sf_egid;	/* -2 no value, > -1 otherwise */
50 	au_tid_addr_t	sf_tid;		/* tid.at_type = 0 no value */
51 
52 	/* from process token */
53 	uid_t		sf_pauid;	/* -2 no value */
54 	uid_t		sf_peuid;	/* -2 no value */
55 
56 	/* data that may be truncated goes after this point */
57 
58 	/* from uauth token */
59 	size_t		sf_uauthlen;
60 	char		*sf_uauth;	/* NULL no value */
61 
62 	/* from text token */
63 	size_t		sf_textlen;
64 	char		*sf_text;	/* NULL no value */
65 
66 	/* from path and atpath token */
67 	size_t		sf_pathlen;
68 	char		*sf_path;		/* NULL no value */
69 	size_t		sf_atpathlen;
70 	char		*sf_atpath;	/* NULL no value */
71 
72 	/* from sequence token */
73 	int32_t		sf_sequence;	/* -1 no value */
74 
75 	/* from zonename token */
76 	size_t		sf_zonelen;
77 	char		*sf_zonename;	/* NULL no value */
78 };
79 typedef struct selected_fields tosyslog_t;
80 
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif	/* _SYSPLUGIN_H */
87