From: "Serge E. Hallyn" <serge.hallyn@canonical.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>,
Nathan Lynch <ntl@pobox.com>, lkml <linux-kernel@vger.kernel.org>,
serge.hallyn@canonical.com
Subject: [PATCH mmotm 1/3] userns: remove unneeded extra argument in selinux's task_has_capability
Date: Wed, 2 Mar 2011 20:56:03 -0600 [thread overview]
Message-ID: <20110303025603.GA10071@peq.hallyn.com> (raw)
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@canonical.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
next reply other threads:[~2011-03-03 2:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 2:56 Serge E. Hallyn [this message]
2011-03-03 2:57 ` [PATCH mmotm 2/3] userns: don't define init_user_ns in ipc_namespace.h Serge E. Hallyn
2011-03-03 2:58 ` [PATCH mmotm 3/3] userns: make has_capability* into real functions Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110303025603.GA10071@peq.hallyn.com \
--to=serge.hallyn@canonical.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ntl@pobox.com \
--cc=sds@epoch.ncsc.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®