Skip to content

selinux: minor cleanup suggestions

Rasmus Villemoes lkml selinux 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 12 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5selinux: introduce security_context_str_to_sidsecurity/selinux/hooks.c security/selinux/include/security.h security/selinux/selinuxfs.c +1 more+20 -252 replies
2/5selinux: remove pointless cast in selinux_inode_setsecurity()security/selinux/hooks.c+1 -12 replies
3/5selinux: use kmemdup in security_sid_to_context_core()security/selinux/ss/services.c+2 -22 replies
4/5selinux: use kstrdup() in security_get_bools()security/selinux/ss/services.c+1 -72 replies
5/5selinux: use sprintf return valuesecurity/selinux/ss/services.c+1 -43 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchStephen Smalley
1/5A-b
2/5A-b
3/5A-b
4/5A-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] selinux: minor cleanup suggestions

A few random things I stumbled on.

While I'm pretty sure of the change in 1/5, I'm also confused, because the doc for the reverse security_sid_to_context state that @scontext_len is set to "the length of the string", which one would normally interpret as being what strlen() would give (i.e., without the \0). However, security_sid_to_context_core clearly includes the \0 in the return value, and I think callers rely on that.

Rasmus Villemoes (5):
selinux: introduce security_context_str_to_sid
selinux: remove pointless cast in selinux_inode_setsecurity()
selinux: use kmemdup in security_sid_to_context_core()
selinux: use kstrdup() in security_get_bools()
selinux: use sprintf return value

 security/selinux/hooks.c            | 14 +++++---------
 security/selinux/include/security.h |  2 ++
 security/selinux/selinuxfs.c        | 26 +++++++++-----------------
 security/selinux/ss/services.c      | 22 +++++++++-------------
 4 files changed, 25 insertions(+), 39 deletions(-)
Signature · 1 line
2.1.3