Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1233099 > unrolled thread

[PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity()

Started byRasmus Villemoes <linux@rasmusvillemoes.dk>
First post2015-09-26 00:40 +0200
Last post2015-09-30 18:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-09-26 00:40 +0200
    Re: [PATCH 2/5] selinux: remove pointless cast in  selinux_inode_setsecurity() Stephen Smalley <sds@tycho.nsa.gov> - 2015-09-29 20:10 +0200
    Re: [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity() Paul Moore <paul@paul-moore.com> - 2015-09-30 18:40 +0200

#1233099 — [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity()

FromRasmus Villemoes <linux@rasmusvillemoes.dk>
Date2015-09-26 00:40 +0200
Subject[PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity()
Message-ID<qcJOO-6x2-21@gated-at.bofh.it>
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(-)

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;
 
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1235447 — Re: [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity()

FromStephen Smalley <sds@tycho.nsa.gov>
Date2015-09-29 20:10 +0200
SubjectRe: [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity()
Message-ID<qe7vI-5CQ-11@gated-at.bofh.it>
In reply to#1233099
On 09/25/2015 06:34 PM, 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>

Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>

> ---
>   security/selinux/hooks.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1236521

FromPaul Moore <paul@paul-moore.com>
Date2015-09-30 18:40 +0200
Message-ID<qesA9-23w-11@gated-at.bofh.it>
In reply to#1233099
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web