From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935368AbbI2SJm (ORCPT ); Tue, 29 Sep 2015 14:09:42 -0400 Received: from emvm-gh1-uea09.nsa.gov ([63.239.67.10]:62241 "EHLO emvm-gh1-uea09.nsa.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935258AbbI2SJ3 (ORCPT ); Tue, 29 Sep 2015 14:09:29 -0400 X-TM-IMSS-Message-ID: <331acedf00004523@nsa.gov> Subject: Re: [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity() To: Rasmus Villemoes , Paul Moore , Eric Paris , James Morris , "Serge E. Hallyn" References: <1443220459-11042-1-git-send-email-linux@rasmusvillemoes.dk> <1443220459-11042-3-git-send-email-linux@rasmusvillemoes.dk> Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov From: Stephen Smalley X-Enigmail-Draft-Status: N1110 Organization: National Security Agency Message-ID: <560AD3AF.3060304@tycho.nsa.gov> Date: Tue, 29 Sep 2015 14:08:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1443220459-11042-3-git-send-email-linux@rasmusvillemoes.dk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Stephen Smalley > --- > 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; > >