aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 20219ef5439..266a2292451 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -14,7 +14,7 @@
14 * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc. 14 * Copyright (C) 2004-2005 Trusted Computer Solutions, Inc.
15 * <dgoeddel@trustedcs.com> 15 * <dgoeddel@trustedcs.com>
16 * Copyright (C) 2006, 2007, 2009 Hewlett-Packard Development Company, L.P. 16 * Copyright (C) 2006, 2007, 2009 Hewlett-Packard Development Company, L.P.
17 * Paul Moore <paul.moore@hp.com> 17 * Paul Moore <paul@paul-moore.com>
18 * Copyright (C) 2007 Hitachi Software Engineering Co., Ltd. 18 * Copyright (C) 2007 Hitachi Software Engineering Co., Ltd.
19 * Yuichi Nakamura <ynakam@hitachisoft.jp> 19 * Yuichi Nakamura <ynakam@hitachisoft.jp>
20 * 20 *
@@ -57,7 +57,7 @@
57#include <net/netlabel.h> 57#include <net/netlabel.h>
58#include <linux/uaccess.h> 58#include <linux/uaccess.h>
59#include <asm/ioctls.h> 59#include <asm/ioctls.h>
60#include <asm/atomic.h> 60#include <linux/atomic.h>
61#include <linux/bitops.h> 61#include <linux/bitops.h>
62#include <linux/interrupt.h> 62#include <linux/interrupt.h>
63#include <linux/netdevice.h> /* for network interface checks */ 63#include <linux/netdevice.h> /* for network interface checks */
@@ -2053,7 +2053,7 @@ static int selinux_bprm_set_creds(struct linux_binprm *bprm)
2053 u32 ptsid = 0; 2053 u32 ptsid = 0;
2054 2054
2055 rcu_read_lock(); 2055 rcu_read_lock();
2056 tracer = tracehook_tracer_task(current); 2056 tracer = ptrace_parent(current);
2057 if (likely(tracer != NULL)) { 2057 if (likely(tracer != NULL)) {
2058 sec = __task_cred(tracer)->security; 2058 sec = __task_cred(tracer)->security;
2059 ptsid = sec->sid; 2059 ptsid = sec->sid;
@@ -2659,12 +2659,13 @@ static int selinux_inode_follow_link(struct dentry *dentry, struct nameidata *na
2659 return dentry_has_perm(cred, dentry, FILE__READ); 2659 return dentry_has_perm(cred, dentry, FILE__READ);
2660} 2660}
2661 2661
2662static int selinux_inode_permission(struct inode *inode, int mask, unsigned flags) 2662static int selinux_inode_permission(struct inode *inode, int mask)
2663{ 2663{
2664 const struct cred *cred = current_cred(); 2664 const struct cred *cred = current_cred();
2665 struct common_audit_data ad; 2665 struct common_audit_data ad;
2666 u32 perms; 2666 u32 perms;
2667 bool from_access; 2667 bool from_access;
2668 unsigned flags = mask & MAY_NOT_BLOCK;
2668 2669
2669 from_access = mask & MAY_ACCESS; 2670 from_access = mask & MAY_ACCESS;
2670 mask &= (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND); 2671 mask &= (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND);
@@ -5319,7 +5320,7 @@ static int selinux_setprocattr(struct task_struct *p,
5319 Otherwise, leave SID unchanged and fail. */ 5320 Otherwise, leave SID unchanged and fail. */
5320 ptsid = 0; 5321 ptsid = 0;
5321 task_lock(p); 5322 task_lock(p);
5322 tracer = tracehook_tracer_task(p); 5323 tracer = ptrace_parent(p);
5323 if (tracer) 5324 if (tracer)
5324 ptsid = task_sid(tracer); 5325 ptsid = task_sid(tracer);
5325 task_unlock(p); 5326 task_unlock(p);