selinux: remove pointless cast in selinux_inode_setsecurity()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 21 Oct 2015 21:44:26 +0000 (17:44 -0400)
committerPaul Moore <pmoore@redhat.com>
Wed, 21 Oct 2015 21:44:26 +0000 (17:44 -0400)
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>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/hooks.c

index 9ed1b5dbcb39f12723ee7a5d1dd4239416de0a3f..1530f661ef8576d6ce38931c4ab7cca38a343eb4 100644 (file)
@@ -3163,7 +3163,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;