]>
Commit | Line | Data |
---|---|---|
de355530 | 1 | /* |
de355530 A |
2 | * @APPLE_LICENSE_HEADER_START@ |
3 | * | |
37839358 A |
4 | * Copyright (c) 1999-2004 Apple Computer, Inc. All Rights Reserved. |
5 | * | |
43866e37 A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
12 | * | |
13 | * The Original Code and all software distributed under the License are | |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
de355530 A |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
43866e37 A |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
de355530 A |
20 | * |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
de355530 | 23 | |
e5568f75 A |
24 | #ifndef _BSM_AUDIT_KLIB_H_ |
25 | #define _BSM_AUDIT_KLIB_H_ | |
de355530 | 26 | |
55e303ae A |
27 | #define AU_PRS_SUCCESS 1 |
28 | #define AU_PRS_FAILURE 2 | |
29 | #define AU_PRS_BOTH (AU_PRS_SUCCESS|AU_PRS_FAILURE) | |
de355530 | 30 | |
55e303ae | 31 | #ifdef KERNEL |
e5568f75 A |
32 | #include <bsm/audit_kernel.h> |
33 | /* | |
34 | * Some of the BSM tokenizer functions take different parameters in the | |
35 | * kernel implementations in order to save the copying of large kernel | |
36 | * data structures. The prototypes of these functions are declared here. | |
37 | */ | |
38 | token_t *kau_to_socket(struct socket_au_info *soi); | |
39 | token_t *kau_to_attr32(struct vnode_au_info *vni); | |
40 | token_t *kau_to_attr64(struct vnode_au_info *vni); | |
91447636 | 41 | int auditon_command_event(int cmd); |
55e303ae | 42 | int au_preselect(au_event_t event, au_mask_t *mask_p, int sorf); |
e5568f75 | 43 | au_event_t flags_and_error_to_openevent(int oflags, int error); |
91447636 A |
44 | au_event_t ctlname_to_sysctlevent(int name[], uint64_t valid_arg); |
45 | au_event_t msgctl_to_event(int cmd); | |
46 | au_event_t semctl_to_event(int cmd); | |
47 | void au_evclassmap_init(void); | |
e5568f75 A |
48 | void au_evclassmap_insert(au_event_t event, au_class_t class); |
49 | au_class_t au_event_class(au_event_t event); | |
50 | ||
51 | int canon_path(struct proc *p, char *path, char *cpath); | |
91447636 A |
52 | |
53 | ||
54 | ||
55 | ||
55e303ae A |
56 | /* |
57 | * Define a system call to audit event mapping table. | |
58 | */ | |
59 | extern au_event_t sys_au_event[]; | |
60 | extern int nsys_au_event; /* number of entries in this table */ | |
de355530 | 61 | |
55e303ae | 62 | #endif /*KERNEL*/ |
de355530 | 63 | |
e5568f75 | 64 | #endif /* ! _BSM_AUDIT_KLIB_H_ */ |