4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #ifndef _AUDITRT_H
27 #define _AUDITRT_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /*
34 * Auditreduce data structures.
35 */
36
37 /*
38 * File Control Block
39 * Controls a single file.
40 * These are held by the pcb's in audit_pcbs[] in a linked list.
41 * There is one fcb for each file controlled by the pcb,
42 * and all of the files in a list have the same suffix in their names.
43 */
138
139 #define OBJ_LP 0x00001 /* 'o' lp object */
140 #define OBJ_MSG 0x00002 /* 'o' msgq object */
141 #define OBJ_PATH 0x00004 /* 'o' file system object */
142 #define OBJ_PROC 0x00008 /* 'o' process object */
143 #define OBJ_SEM 0x00010 /* 'o' semaphore object */
144 #define OBJ_SHM 0x00020 /* 'o' shared memory object */
145 #define OBJ_SOCK 0x00040 /* 'o' socket object */
146 #define OBJ_FGROUP 0x00080 /* 'o' file group */
147 #define OBJ_FOWNER 0x00100 /* 'o' file owner */
148 #define OBJ_MSGGROUP 0x00200 /* 'o' msgq [c]group */
149 #define OBJ_MSGOWNER 0x00400 /* 'o' msgq [c]owner */
150 #define OBJ_PGROUP 0x00800 /* 'o' process [e]group */
151 #define OBJ_POWNER 0x01000 /* 'o' process [e]owner */
152 #define OBJ_SEMGROUP 0x02000 /* 'o' semaphore [c]group */
153 #define OBJ_SEMOWNER 0x04000 /* 'o' semaphore [c]owner */
154 #define OBJ_SHMGROUP 0x08000 /* 'o' shared memory [c]group */
155 #define OBJ_SHMOWNER 0x10000 /* 'o' shared memory [c]owner */
156 #define OBJ_FMRI 0x20000 /* 'o' fmri object */
157 #define OBJ_USER 0x40000 /* 'o' user object */
158
159 #define SOCKFLG_MACHINE 0 /* search socket token by machine name */
160 #define SOCKFLG_PORT 1 /* search socket token by port number */
161
162 /*
163 * Global variables
164 */
165 extern unsigned short m_type; /* 'm' message type */
166 extern gid_t m_groupr; /* 'g' real group-id */
167 extern gid_t m_groupe; /* 'f' effective group-id */
168 extern uid_t m_usera; /* 'u' audit user */
169 extern uid_t m_userr; /* 'r' real user */
170 extern uid_t m_usere; /* 'f' effective user */
171 extern au_asid_t m_sid; /* 's' session-id */
172 extern time_t m_after; /* 'a' after a time */
173 extern time_t m_before; /* 'b' before a time */
174 extern audit_state_t mask; /* used with m_class */
175 extern char *zonename; /* 'z' zonename */
176
177 extern m_range_t *m_label; /* 'l' mandatory label range */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 *
25 * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
26 */
27
28 #ifndef _AUDITRT_H
29 #define _AUDITRT_H
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 /*
36 * Auditreduce data structures.
37 */
38
39 /*
40 * File Control Block
41 * Controls a single file.
42 * These are held by the pcb's in audit_pcbs[] in a linked list.
43 * There is one fcb for each file controlled by the pcb,
44 * and all of the files in a list have the same suffix in their names.
45 */
140
141 #define OBJ_LP 0x00001 /* 'o' lp object */
142 #define OBJ_MSG 0x00002 /* 'o' msgq object */
143 #define OBJ_PATH 0x00004 /* 'o' file system object */
144 #define OBJ_PROC 0x00008 /* 'o' process object */
145 #define OBJ_SEM 0x00010 /* 'o' semaphore object */
146 #define OBJ_SHM 0x00020 /* 'o' shared memory object */
147 #define OBJ_SOCK 0x00040 /* 'o' socket object */
148 #define OBJ_FGROUP 0x00080 /* 'o' file group */
149 #define OBJ_FOWNER 0x00100 /* 'o' file owner */
150 #define OBJ_MSGGROUP 0x00200 /* 'o' msgq [c]group */
151 #define OBJ_MSGOWNER 0x00400 /* 'o' msgq [c]owner */
152 #define OBJ_PGROUP 0x00800 /* 'o' process [e]group */
153 #define OBJ_POWNER 0x01000 /* 'o' process [e]owner */
154 #define OBJ_SEMGROUP 0x02000 /* 'o' semaphore [c]group */
155 #define OBJ_SEMOWNER 0x04000 /* 'o' semaphore [c]owner */
156 #define OBJ_SHMGROUP 0x08000 /* 'o' shared memory [c]group */
157 #define OBJ_SHMOWNER 0x10000 /* 'o' shared memory [c]owner */
158 #define OBJ_FMRI 0x20000 /* 'o' fmri object */
159 #define OBJ_USER 0x40000 /* 'o' user object */
160 #define OBJ_WSID 0x80000 /* 'o' windows sid object */
161
162 #define SOCKFLG_MACHINE 0 /* search socket token by machine name */
163 #define SOCKFLG_PORT 1 /* search socket token by port number */
164
165 /*
166 * Global variables
167 */
168 extern unsigned short m_type; /* 'm' message type */
169 extern gid_t m_groupr; /* 'g' real group-id */
170 extern gid_t m_groupe; /* 'f' effective group-id */
171 extern uid_t m_usera; /* 'u' audit user */
172 extern uid_t m_userr; /* 'r' real user */
173 extern uid_t m_usere; /* 'f' effective user */
174 extern au_asid_t m_sid; /* 's' session-id */
175 extern time_t m_after; /* 'a' after a time */
176 extern time_t m_before; /* 'b' before a time */
177 extern audit_state_t mask; /* used with m_class */
178 extern char *zonename; /* 'z' zonename */
179
180 extern m_range_t *m_label; /* 'l' mandatory label range */
|