mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-28 00:00:22 +02:00
selinux: Print 'sclass' as string when unrecognized netlink message occurs
commit cded3fffbeab777e6ad2ec05d4a3b62c5caca0f3 upstream. This prints the 'sclass' field as string instead of index in unrecognized netlink message. The textual representation makes it easier to distinguish the right class. Signed-off-by: Marek Milkovic <mmilkovi@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> [PM: 80-char width fixes] Signed-off-by: Paul Moore <pmoore@redhat.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org> Change-Id: If381135745d2b7ab4c838542fcfc0ca0fd148db2
This commit is contained in:
committed by
matteo0026
parent
b9fa31d38f
commit
2fa1eb694c
@@ -4776,8 +4776,9 @@ static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
|
||||
if (err == -EINVAL) {
|
||||
printk(KERN_WARNING
|
||||
"SELinux: unrecognized netlink message:"
|
||||
" protocol=%hu nlmsg_type=%hu sclass=%hu\n",
|
||||
sk->sk_protocol, nlh->nlmsg_type, sksec->sclass);
|
||||
" protocol=%hu nlmsg_type=%hu sclass=%s\n",
|
||||
sk->sk_protocol, nlh->nlmsg_type,
|
||||
secclass_map[sksec->sclass - 1].name);
|
||||
#ifdef CONFIG_ALWAYS_ENFORCE
|
||||
if (security_get_allow_unknown())
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user