mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
selinux: use correct type for context length
[ Upstream commit b97df7c098
]
security_sid_to_context() expects a pointer to an u32 as the address
where to store the length of the computed context.
Reported by sparse:
security/selinux/xfrm.c:359:39: warning: incorrect type in arg 4
(different signedness)
security/selinux/xfrm.c:359:39: expected unsigned int
[usertype] *scontext_len
security/selinux/xfrm.c:359:39: got int *
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: wrapped commit description]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c4f5a678ad
commit
799f22279e
1 changed files with 1 additions and 1 deletions
|
@ -346,7 +346,7 @@ int selinux_xfrm_state_alloc_acquire(struct xfrm_state *x,
|
||||||
int rc;
|
int rc;
|
||||||
struct xfrm_sec_ctx *ctx;
|
struct xfrm_sec_ctx *ctx;
|
||||||
char *ctx_str = NULL;
|
char *ctx_str = NULL;
|
||||||
int str_len;
|
u32 str_len;
|
||||||
|
|
||||||
if (!polsec)
|
if (!polsec)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue