aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/compat_audit.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-11 11:43:17 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-11 11:43:17 -0700
commit05ff0e291af086f4325bac76abad250690bbbd63 (patch)
tree3ea47e8ef5bebc1261302e3d0775414fb78037c4 /arch/powerpc/kernel/compat_audit.c
parent5eea7ee2075b245d505285bb422e2fa8d686e5c8 (diff)
parent55669bfa141b488be865341ed12e188967d11308 (diff)
Merge branch 'audit.b28' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b28' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] audit: AUDIT_PERM support [PATCH] audit: more syscall classes added [PATCH] syscall classes hookup for ppc and s390 [PATCH] update audit rule change messages [PATCH] sanity check audit_buffer [PATCH] fix ppid bug in 2.6.18 kernel
Diffstat (limited to 'arch/powerpc/kernel/compat_audit.c')
-rw-r--r--arch/powerpc/kernel/compat_audit.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compat_audit.c
new file mode 100644
index 00000000000..640d4bb2932
--- /dev/null
+++ b/arch/powerpc/kernel/compat_audit.c
@@ -0,0 +1,38 @@
+#undef __powerpc64__
+#include <asm/unistd.h>
+
+unsigned ppc32_dir_class[] = {
+#include <asm-generic/audit_dir_write.h>
+~0U
+};
+
+unsigned ppc32_chattr_class[] = {
+#include <asm-generic/audit_change_attr.h>
+~0U
+};
+
+unsigned ppc32_write_class[] = {
+#include <asm-generic/audit_write.h>
+~0U
+};
+
+unsigned ppc32_read_class[] = {
+#include <asm-generic/audit_read.h>
+~0U
+};
+
+int ppc32_classify_syscall(unsigned syscall)
+{
+ switch(syscall) {
+ case __NR_open:
+ return 2;
+ case __NR_openat:
+ return 3;
+ case __NR_socketcall:
+ return 4;
+ case __NR_execve:
+ return 5;
+ default:
+ return 1;
+ }
+}