Commit 31358bf7 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

LSM: change all usages of security_ops->ptrace() to security_ptrace()

parent e6ebd8d6
......@@ -719,8 +719,7 @@ asmlinkage 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)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -160,8 +160,7 @@ asmlinkage 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)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -1101,8 +1101,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
/* are we already being traced? */
if (current->ptrace & PT_PTRACED)
goto out;
ret = security_ops->ptrace(current->parent, current);
if (ret)
if ((ret = security_ptrace(current->parent, current)))
goto out;
current->ptrace |= PT_PTRACED;
ret = 0;
......
......@@ -166,8 +166,7 @@ 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)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -59,8 +59,7 @@ 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)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -48,8 +48,7 @@ int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data)
/* are we already being traced? */
if (current->ptrace & PT_PTRACED)
goto out;
ret = security_ops->ptrace(current->parent, current);
if (ret)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -330,8 +330,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
ret = -EPERM;
if (current->ptrace & PT_PTRACED)
goto out;
ret = security_ops->ptrace(current->parent, current);
if (ret)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -569,8 +569,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
ret = -EPERM;
if (current->ptrace & PT_PTRACED)
goto out;
ret = security_ops->ptrace(current->parent, current);
if (ret)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -291,8 +291,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
pt_error_return(regs, EPERM);
goto out;
}
ret = security_ops->ptrace(current->parent, current);
if (ret) {
if ((ret = security_ptrace(current->parent, current))) {
pt_error_return(regs, -ret);
goto out;
}
......
......@@ -140,8 +140,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
pt_error_return(regs, EPERM);
goto out;
}
ret = security_ops->ptrace(current->parent, current);
if (ret) {
if ((ret = security_ptrace(current->parent, current))) {
pt_error_return(regs, -ret);
goto out;
}
......
......@@ -33,8 +33,7 @@ int sys_ptrace(long request, long pid, long addr, long data)
if (current->ptrace & PT_PTRACED)
goto out;
ret = security_ops->ptrace(current->parent, current);
if(ret)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
......
......@@ -178,8 +178,7 @@ asmlinkage long 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)
if ((ret = security_ptrace(current->parent, current)))
goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
......
......@@ -101,8 +101,7 @@ int ptrace_attach(struct task_struct *task)
/* the same process cannot be attached many times */
if (task->ptrace & PT_PTRACED)
goto bad;
retval = security_ops->ptrace(current, task);
if (retval)
if ((retval = security_ptrace(current, task)))
goto bad;
/* Go */
......
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