[Patch lsm/dev-staging] selinux: Fix pointer use in selinux_dentry_init_security

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The cast used while calling security_sid_to_context() is just wrong.
Use the address of the pointer instead.

Signed-off-by: Casey Schaufler <casey@xxxxxxxxxxxxxxxx>
---
 security/selinux/hooks.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 996e765b6823..93d2773bfda5 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2886,8 +2886,7 @@ static int selinux_dentry_init_security(struct dentry *dentry, int mode,
 		*xattr_name = XATTR_NAME_SELINUX;
 
 	cp->id = LSM_ID_SELINUX;
-	return security_sid_to_context(newsid, (char **)cp->context,
-				       &cp->len);
+	return security_sid_to_context(newsid, &cp->context, &cp->len);
 }
 
 static int selinux_dentry_create_files_as(struct dentry *dentry, int mode,





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux