Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 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 | |
Al Viro | dc104fb | 2006-08-31 19:05:56 -0400 | [diff] [blame^] | 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 | |
Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 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_COMPAT |
| 29 | extern __u32 s390_dir_class[]; |
Al Viro | dc104fb | 2006-08-31 19:05:56 -0400 | [diff] [blame^] | 30 | extern __u32 s390_write_class[]; |
| 31 | extern __u32 s390_read_class[]; |
Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 32 | extern __u32 s390_chattr_class[]; |
Al Viro | dc104fb | 2006-08-31 19:05:56 -0400 | [diff] [blame^] | 33 | audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); |
| 34 | audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); |
Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 35 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class); |
| 36 | audit_register_class(AUDIT_CLASS_CHATTR_32, s390_chattr_class); |
| 37 | #endif |
Al Viro | dc104fb | 2006-08-31 19:05:56 -0400 | [diff] [blame^] | 38 | audit_register_class(AUDIT_CLASS_WRITE, write_class); |
| 39 | audit_register_class(AUDIT_CLASS_READ, read_class); |
Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 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); |