blob: cde57039334cdd50f775a02b8400b5f381b60051 [file] [log] [blame]
Al Viroc0803792006-08-31 19:02:42 -04001#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
Al Virodc104fb2006-08-31 19:05:56 -040011static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
Al Viroc0803792006-08-31 19:02:42 -040021static unsigned chattr_class[] = {
22#include <asm-generic/audit_change_attr.h>
23~0U
24};
25
26static int __init audit_classes_init(void)
27{
28#ifdef CONFIG_COMPAT
29 extern __u32 s390_dir_class[];
Al Virodc104fb2006-08-31 19:05:56 -040030 extern __u32 s390_write_class[];
31 extern __u32 s390_read_class[];
Al Viroc0803792006-08-31 19:02:42 -040032 extern __u32 s390_chattr_class[];
Al Virodc104fb2006-08-31 19:05:56 -040033 audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class);
34 audit_register_class(AUDIT_CLASS_READ_32, s390_read_class);
Al Viroc0803792006-08-31 19:02:42 -040035 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 Virodc104fb2006-08-31 19:05:56 -040038 audit_register_class(AUDIT_CLASS_WRITE, write_class);
39 audit_register_class(AUDIT_CLASS_READ, read_class);
Al Viroc0803792006-08-31 19:02:42 -040040 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);