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 (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 (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 /*
27 * This file contains the declarations of the various data structures
28 * used by the auditing module(s).
29 */
30
31 #ifndef _BSM_AUDIT_H
32 #define _BSM_AUDIT_H
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #include <sys/types.h>
39 #include <sys/proc.h>
40
41 struct t_audit_sacl;
42 void audit_sacl(char *, cred_t *, uint32_t, boolean_t, struct t_audit_sacl *);
43
44 typedef uint_t au_asid_t;
45 typedef uid_t au_id_t;
46 struct au_mask {
47 unsigned int am_success; /* success bits */
48 unsigned int am_failure; /* failure bits */
49 };
50 typedef struct au_mask au_mask_t;
51
52 /*
53 * The structure of the terminal ID (ipv6)
54 */
55 struct au_tid_addr {
56 dev_t at_port;
57 uint_t at_type;
58 uint_t at_addr[4];
59 };
60
61 struct au_port_s {
62 uint32_t at_major; /* major # */
63 uint32_t at_minor; /* minor # */
64 };
65 typedef struct au_port_s au_port_t;
66
67 struct au_tid_addr64 {
68 au_port_t at_port;
69 uint_t at_type;
70 uint_t at_addr[4];
71 };
72 typedef struct au_tid_addr64 au_tid64_addr_t;
73 typedef struct au_tid_addr au_tid_addr_t;
74
75
76 #ifdef __cplusplus
77 }
78 #endif
79
80 #endif /* _BSM_AUDIT_H */