[PATCH] audit: more syscall classes added
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / powerpc / kernel / audit.c
1 #include <linux/init.h>
2 #include <linux/types.h>
3 #include <linux/audit.h>
4 #include <asm/unistd.h>
5
6 static unsigned dir_class[] = {
7 #include <asm-generic/audit_dir_write.h>
8 ~0U
9 };
10
11 static unsigned read_class[] = {
12 #include <asm-generic/audit_read.h>
13 ~0U
14 };
15
16 static unsigned write_class[] = {
17 #include <asm-generic/audit_write.h>
18 ~0U
19 };
20
21 static unsigned chattr_class[] = {
22 #include <asm-generic/audit_change_attr.h>
23 ~0U
24 };
25
26 static int __init audit_classes_init(void)
27 {
28 #ifdef CONFIG_PPC64
29 extern __u32 ppc32_dir_class[];
30 extern __u32 ppc32_write_class[];
31 extern __u32 ppc32_read_class[];
32 extern __u32 ppc32_chattr_class[];
33 audit_register_class(AUDIT_CLASS_WRITE_32, ppc32_write_class);
34 audit_register_class(AUDIT_CLASS_READ_32, ppc32_read_class);
35 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ppc32_dir_class);
36 audit_register_class(AUDIT_CLASS_CHATTR_32, ppc32_chattr_class);
37 #endif
38 audit_register_class(AUDIT_CLASS_WRITE, write_class);
39 audit_register_class(AUDIT_CLASS_READ, read_class);
40 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
41 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
42 return 0;
43 }
44
45 __initcall(audit_classes_init);