summaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/compat_audit.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2013-10-15 17:25:46 (GMT)
committerHelge Deller <deller@gmx.de>2013-11-07 21:27:20 (GMT)
commit527973c84077eb9273d0b2408655620de2e30136 (patch)
treed70e6bb6f4c4f1eed2dd9fcdadded6d000ad19c5 /arch/parisc/kernel/compat_audit.c
parent61dbbaeb86c2181c79efae2d186193e0f8008af1 (diff)
downloadlinux-527973c84077eb9273d0b2408655620de2e30136.tar.xz
parisc: add kernel audit feature
Implement missing functions for parisc to provide kernel audit feature. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/compat_audit.c')
-rw-r--r--arch/parisc/kernel/compat_audit.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/parisc/kernel/compat_audit.c b/arch/parisc/kernel/compat_audit.c
new file mode 100644
index 0000000..c74478f6
--- /dev/null
+++ b/arch/parisc/kernel/compat_audit.c
@@ -0,0 +1,40 @@
+#include <asm/unistd.h>
+
+unsigned int parisc32_dir_class[] = {
+#include <asm-generic/audit_dir_write.h>
+~0U
+};
+
+unsigned int parisc32_chattr_class[] = {
+#include <asm-generic/audit_change_attr.h>
+~0U
+};
+
+unsigned int parisc32_write_class[] = {
+#include <asm-generic/audit_write.h>
+~0U
+};
+
+unsigned int parisc32_read_class[] = {
+#include <asm-generic/audit_read.h>
+~0U
+};
+
+unsigned int parisc32_signal_class[] = {
+#include <asm-generic/audit_signal.h>
+~0U
+};
+
+int parisc32_classify_syscall(unsigned syscall)
+{
+ switch (syscall) {
+ case __NR_open:
+ return 2;
+ case __NR_openat:
+ return 3;
+ case __NR_execve:
+ return 5;
+ default:
+ return 1;
+ }
+}