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