Commit ee5c0c4c authored by Paul Mackerras's avatar Paul Mackerras

PPC32: add in the architecture-dependent security hooks.

This adds the sys_security entry to the syscall table and
calls the ptrace security op in ptrace.
parent 46979afd
......@@ -1296,6 +1296,7 @@ _GLOBAL(sys_call_table)
.long sys_futex
.long sys_sched_setaffinity
.long sys_sched_getaffinity
.long sys_security
.rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall
.endr
......@@ -28,6 +28,7 @@
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/security.h>
#include <asm/uaccess.h>
#include <asm/page.h>
......@@ -168,6 +169,9 @@ int sys_ptrace(long request, long pid, long addr, long data)
/* are we already being traced? */
if (current->ptrace & PT_PTRACED)
goto out;
ret = security_ops->ptrace(current->parent, current);
if (ret)
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment