[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 2 Mar 2011 20:56:03 -0600
From: "Serge E. Hallyn" <serge.hallyn@...onical.com>
To: Andrew Morton <akpm@...l.org>
Cc: Stephen Smalley <sds@...ch.ncsc.mil>, Nathan Lynch <ntl@...ox.com>,
lkml <linux-kernel@...r.kernel.org>, serge.hallyn@...onical.com
Subject: [PATCH mmotm 1/3] userns: remove unneeded extra argument in
selinux's task_has_capability
The user_namespace argument is not used by task_has_capability, so get
rid of it. Note that it was spuriously added by the user namespace
patchset, so we're just cleaning up our own mess.
Signed-off-by: Serge E. Hallyn <serge.hallyn@...onical.com>
---
security/selinux/hooks.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Index: linux-2.6/security/selinux/hooks.c
===================================================================
--- linux-2.6.orig/security/selinux/hooks.c 2011-03-03 01:47:01.113745084 +0000
+++ linux-2.6/security/selinux/hooks.c 2011-03-03 01:47:48.017090039 +0000
@@ -1419,7 +1419,6 @@
/* Check whether a task is allowed to use a capability. */
static int task_has_capability(struct task_struct *tsk,
const struct cred *cred,
- struct user_namespace *ns,
int cap, int audit)
{
struct common_audit_data ad;
@@ -1856,7 +1855,7 @@
if (rc)
return rc;
- return task_has_capability(tsk, cred, ns, cap, audit);
+ return task_has_capability(tsk, cred, cap, audit);
}
static int selinux_quotactl(int cmds, int type, int id, struct super_block *sb)
@@ -2886,8 +2885,8 @@
case KDSKBENT:
case KDSKBSENT:
- error = task_has_capability(current, cred, &init_user_ns,
- CAP_SYS_TTY_CONFIG, SECURITY_CAP_AUDIT);
+ error = task_has_capability(current, cred, CAP_SYS_TTY_CONFIG,
+ SECURITY_CAP_AUDIT);
break;
/* default case assumes that the command will go
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists