diff options
Diffstat (limited to 'security/selinux/hooks.c')
| -rw-r--r-- | security/selinux/hooks.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index ad8dd4e8657e..b29059ecc045 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
| @@ -1592,9 +1592,10 @@ static int selinux_vm_enough_memory(long pages) | |||
| 1592 | rc = secondary_ops->capable(current, CAP_SYS_ADMIN); | 1592 | rc = secondary_ops->capable(current, CAP_SYS_ADMIN); |
| 1593 | if (rc == 0) | 1593 | if (rc == 0) |
| 1594 | rc = avc_has_perm_noaudit(tsec->sid, tsec->sid, | 1594 | rc = avc_has_perm_noaudit(tsec->sid, tsec->sid, |
| 1595 | SECCLASS_CAPABILITY, | 1595 | SECCLASS_CAPABILITY, |
| 1596 | CAP_TO_MASK(CAP_SYS_ADMIN), | 1596 | CAP_TO_MASK(CAP_SYS_ADMIN), |
| 1597 | NULL); | 1597 | 0, |
| 1598 | NULL); | ||
| 1598 | 1599 | ||
| 1599 | if (rc == 0) | 1600 | if (rc == 0) |
| 1600 | cap_sys_admin = 1; | 1601 | cap_sys_admin = 1; |
| @@ -4626,7 +4627,7 @@ static int selinux_setprocattr(struct task_struct *p, | |||
| 4626 | if (p->ptrace & PT_PTRACED) { | 4627 | if (p->ptrace & PT_PTRACED) { |
| 4627 | error = avc_has_perm_noaudit(tsec->ptrace_sid, sid, | 4628 | error = avc_has_perm_noaudit(tsec->ptrace_sid, sid, |
| 4628 | SECCLASS_PROCESS, | 4629 | SECCLASS_PROCESS, |
| 4629 | PROCESS__PTRACE, &avd); | 4630 | PROCESS__PTRACE, 0, &avd); |
| 4630 | if (!error) | 4631 | if (!error) |
| 4631 | tsec->sid = sid; | 4632 | tsec->sid = sid; |
| 4632 | task_unlock(p); | 4633 | task_unlock(p); |
