public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@parisplace.org>,
	James Morris <james.l.morris@oracle.com>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity()
Date: Wed, 30 Sep 2015 12:31:39 -0400	[thread overview]
Message-ID: <2233926.skpAMzzEuY@sifl> (raw)
In-Reply-To: <1443220459-11042-3-git-send-email-linux@rasmusvillemoes.dk>

On Saturday, September 26, 2015 12:34:16 AM Rasmus Villemoes wrote:
> security_context_to_sid() expects a const char* argument, so there's
> no point in casting away the const qualifier of value.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
>  security/selinux/hooks.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied.

> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index fd50cd5ac2ec..5edb57df86f8 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -3162,7 +3162,7 @@ static int selinux_inode_setsecurity(struct inode
> *inode, const char *name, if (!value || !size)
>  		return -EACCES;
> 
> -	rc = security_context_to_sid((void *)value, size, &newsid, GFP_KERNEL);
> +	rc = security_context_to_sid(value, size, &newsid, GFP_KERNEL);
>  	if (rc)
>  		return rc;

-- 
paul moore
www.paul-moore.com


  parent reply	other threads:[~2015-09-30 16:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 22:34 [PATCH 0/5] selinux: minor cleanup suggestions Rasmus Villemoes
2015-09-25 22:34 ` [PATCH 1/5] selinux: introduce security_context_str_to_sid Rasmus Villemoes
2015-09-29 18:02   ` Stephen Smalley
2015-09-30 16:28   ` Paul Moore
2015-09-25 22:34 ` [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity() Rasmus Villemoes
2015-09-29 18:08   ` Stephen Smalley
2015-09-30 16:31   ` Paul Moore [this message]
2015-09-25 22:34 ` [PATCH 3/5] selinux: use kmemdup in security_sid_to_context_core() Rasmus Villemoes
2015-09-29 18:11   ` Stephen Smalley
2015-09-30 16:37   ` Paul Moore
2015-09-25 22:34 ` [PATCH 4/5] selinux: use kstrdup() in security_get_bools() Rasmus Villemoes
2015-09-29 18:12   ` Stephen Smalley
2015-09-30 16:40   ` Paul Moore
2015-09-25 22:34 ` [PATCH 5/5] selinux: use sprintf return value Rasmus Villemoes
2015-09-29 18:17   ` Stephen Smalley
2015-09-30 15:00     ` Rasmus Villemoes
2015-09-30 16:43   ` Paul Moore
2015-09-29 17:59 ` [PATCH 0/5] selinux: minor cleanup suggestions Stephen Smalley

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=2233926.skpAMzzEuY@sifl \
    --to=paul@paul-moore.com \
    --cc=eparis@parisplace.org \
    --cc=james.l.morris@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serge@hallyn.com \
    /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