mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian Göttsche" <cgzones@googlemail.com>
To: selinux@vger.kernel.org
Cc: "Paul Moore" <paul@paul-moore.com>,
	"Stephen Smalley" <stephen.smalley.work@gmail.com>,
	"Eric Paris" <eparis@parisplace.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Ondrej Mosnacek" <omosnace@redhat.com>,
	"Mickaël Salaün" <mic@linux.microsoft.com>,
	"Serge Hallyn" <serge@hallyn.com>,
	"Yang Li" <yang.lee@linux.alibaba.com>,
	"Casey Schaufler" <casey@schaufler-ca.com>,
	"Lakshmi Ramasubramanian" <nramas@linux.microsoft.com>,
	"Jeff Vander Stoep" <jeffv@google.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: [PATCH 5/9] selinux: drop cast to same type
Date: Tue, 25 Jan 2022 15:14:15 +0100	[thread overview]
Message-ID: <20220125141422.32655-4-cgzones@googlemail.com> (raw)
In-Reply-To: <20220125141422.32655-1-cgzones@googlemail.com>

Both the lvalue scontextp and rvalue scontext are of the type char*.
Drop the redundant explicit cast not needed since commit 9a59daa03df7
("SELinux: fix sleeping allocation in security_context_to_sid"), where
the type of scontext changed from const char* to char*.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 security/selinux/ss/services.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 5a7df45bdab1..2f8db93e53b2 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1452,7 +1452,7 @@ static int string_to_context_struct(struct policydb *pol,
 	/* Parse the security context. */
 
 	rc = -EINVAL;
-	scontextp = (char *) scontext;
+	scontextp = scontext;
 
 	/* Extract the user. */
 	p = scontextp;
-- 
2.34.1


  parent reply	other threads:[~2022-01-25 14:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 14:14 [PATCH 2/9] selinux: declare path parameters of _genfs_sid const Christian Göttsche
2022-01-25 14:14 ` [PATCH 3/9] selinux: declare name parameter of hash_eval const Christian Göttsche
2022-01-26 19:34   ` Paul Moore
2022-01-25 14:14 ` [PATCH 4/9] selinux: enclose macro arguments in parenthesis Christian Göttsche
2022-01-25 20:40   ` Nick Desaulniers
2022-01-26 20:16   ` Paul Moore
2022-01-25 14:14 ` Christian Göttsche [this message]
2022-01-26 20:27   ` [PATCH 5/9] selinux: drop cast to same type Paul Moore
2022-01-25 14:14 ` [PATCH 6/9] selinux: drop unused parameter of avtab_insert_node Christian Göttsche
2022-01-26 20:39   ` Paul Moore
2022-01-25 14:14 ` [PATCH 7/9] selinux: do not discard const qualifier in cast Christian Göttsche
2022-01-26 20:56   ` Paul Moore
2022-01-25 14:14 ` [PATCH 8/9] selinux: simplify cred_init_security Christian Göttsche
2022-01-26 20:58   ` Paul Moore
2022-01-25 14:14 ` [PATCH 9/9] selinux: drop unused macro Christian Göttsche
2022-01-25 22:47   ` Nick Desaulniers
2022-01-26 21:20   ` Paul Moore
2022-01-25 14:14 ` [PATCH 1/9] selinux: check return value of sel_make_avc_files Christian Göttsche
2022-01-25 19:46   ` Nick Desaulniers
2022-01-26  0:35   ` Paul Moore
2022-01-26  1:04 ` [PATCH 2/9] selinux: declare path parameters of _genfs_sid const Paul Moore

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=20220125141422.32655-4-cgzones@googlemail.com \
    --to=cgzones@googlemail.com \
    --cc=casey@schaufler-ca.com \
    --cc=eparis@parisplace.org \
    --cc=jeffv@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mic@linux.microsoft.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nramas@linux.microsoft.com \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=selinux@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=stephen.smalley.work@gmail.com \
    --cc=yang.lee@linux.alibaba.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

all inboxes | Powered by JetHome®